Add initial latex theme

This commit is contained in:
2018-05-10 17:23:38 +02:00
parent 6bfd12756d
commit 9c0cded9e3
10 changed files with 276 additions and 4 deletions

View File

@@ -266,10 +266,10 @@
{{if $v.Highlights}}
<ul class="highlights">
{{range $v.Highlights -}}
<li>{{.Title}}
<li>{{md2html .Title}}
{{if .Items -}}
<ul>
{{range .Items}}<li>{{.}}</li>{{end}}
{{range .Items}}<li>{{md2html .}}</li>{{end}}
</ul>
{{- end}}
</li>

View File

@@ -26,6 +26,7 @@
package stackoverflow
import (
"jsonresume/model"
"jsonresume/themes"
"path"
"strings"
@@ -44,6 +45,7 @@ var Theme = themes.Theme{
Functions: template.FuncMap{
"css": getCSS,
"tolower": strings.ToLower,
"md2html": md2html,
},
}
@@ -57,3 +59,7 @@ func getCSS() string {
r, _ := Asset(path.Join(packageDirectory, fileCSS))
return string(r)
}
func md2html(s string) string {
return model.MarkdownURLRegexp.ReplaceAllString(s, `<a href="$2" target="_blank">$1</a>`)
}