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

@@ -26,6 +26,7 @@
package kendall
import (
"jsonresume/model"
"jsonresume/themes"
"path"
"text/template"
@@ -44,6 +45,7 @@ var Theme = themes.Theme{
Functions: template.FuncMap{
"css": getCSS,
"printcss": getPrintCSS,
"md2html": md2html,
},
}
@@ -62,3 +64,7 @@ func getPrintCSS() string {
r, _ := Asset(path.Join(packageDirectory, fileCSSPrint))
return string(r)
}
func md2html(s string) string {
return model.MarkdownURLRegexp.ReplaceAllString(s, `<a href="$2" target="_blank">$1</a>`)
}

View File

@@ -125,10 +125,10 @@
<ul class="list-group">
{{range .Highlights -}}
<li class="list-group-item">
{{.Title}}
{{md2html .Title}}
{{if .Items -}}
<ul>
{{range .Items}}<li>{{.}}</li>{{end}}
{{range .Items}}<li>{{md2html .}}</li>{{end}}
</ul>
{{- end}}
</li>