mirror of
https://git.freesoftwareextremist.com/bloat
synced 2024-12-22 09:10:42 +00:00
Fix custom CSS
This commit is contained in:
parent
471701f029
commit
4ad71587d8
2 changed files with 6 additions and 1 deletions
|
@ -129,6 +129,10 @@ func raw(s string) template.HTML {
|
|||
return template.HTML(s)
|
||||
}
|
||||
|
||||
func rawCSS(s string) template.CSS {
|
||||
return template.CSS(s)
|
||||
}
|
||||
|
||||
type Renderer interface {
|
||||
Render(ctx *Context, writer io.Writer, page string, data interface{}) (err error)
|
||||
}
|
||||
|
@ -150,6 +154,7 @@ func NewRenderer(templateGlobPattern string) (r *renderer, err error) {
|
|||
"WithContext": withContext,
|
||||
"HTML": template.HTMLEscapeString,
|
||||
"Raw": raw,
|
||||
"RawCSS": rawCSS,
|
||||
}).ParseGlob(templateGlobPattern)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<script src="/static/fluoride.js"></script>
|
||||
{{end}}
|
||||
{{if $.Ctx.UserCSS}}
|
||||
<style>{{$.Ctx.UserCSS}}</style>
|
||||
<style>{{RawCSS $.Ctx.UserCSS}}</style>
|
||||
{{end}}
|
||||
</head>
|
||||
<body {{if $.Ctx.DarkMode}}class="dark"{{end}}>
|
||||
|
|
Loading…
Reference in a new issue