Fixed pre-line issue in chrome
This commit is contained in:
parent
b995df4533
commit
4c1daae5e1
|
@ -37,8 +37,8 @@
|
||||||
{{/* content */}}
|
{{/* content */}}
|
||||||
|
|
||||||
{{ if .Description }}
|
{{ if .Description }}
|
||||||
<div class="mt3 overflow-hidden relative pre-line {{ if .TruncateDescription }}mh-5{{ end }}">
|
<div class="mt3 overflow-hidden relative {{ if .TruncateDescription }}mh-5{{ end }}">
|
||||||
<div class="post-content">{{ .Description }}</div>
|
<div class="post-content pre-line">{{ trim .Description }}</div>
|
||||||
{{ if .TruncateDescription }}
|
{{ if .TruncateDescription }}
|
||||||
<div class="excerpt-fade absolute w-100 h4 bottom-0 z-999"></div>
|
<div class="excerpt-fade absolute w-100 h4 bottom-0 z-999"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -226,6 +226,9 @@ var HMNTemplateFuncs = template.FuncMap{
|
||||||
"cleancontrolchars": func(str template.HTML) template.HTML {
|
"cleancontrolchars": func(str template.HTML) template.HTML {
|
||||||
return template.HTML(controlCharRegex.ReplaceAllString(string(str), ""))
|
return template.HTML(controlCharRegex.ReplaceAllString(string(str), ""))
|
||||||
},
|
},
|
||||||
|
"trim": func(str template.HTML) template.HTML {
|
||||||
|
return template.HTML(strings.TrimSpace(string(str)))
|
||||||
|
},
|
||||||
|
|
||||||
// NOTE(asaf): Template specific functions:
|
// NOTE(asaf): Template specific functions:
|
||||||
"projectcarddata": func(project Project, classes string) ProjectCardData {
|
"projectcarddata": func(project Project, classes string) ProjectCardData {
|
||||||
|
|
Loading…
Reference in New Issue