aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2022-05-10 17:25:58 +0000
committerr <r@freesoftwareextremist.com>2022-05-10 17:25:58 +0000
commit4ad71587d821d8586d1fe648ad15f601a318662f (patch)
treeca60578c6711008f77d83d6f6e61c7c36b6497bf /renderer
parent471701f0294a4327dacc8d99bc1d8ec04ffc1392 (diff)
downloadbloat-4ad71587d821d8586d1fe648ad15f601a318662f.tar.gz
bloat-4ad71587d821d8586d1fe648ad15f601a318662f.zip
Fix custom CSS
Diffstat (limited to 'renderer')
-rw-r--r--renderer/renderer.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/renderer/renderer.go b/renderer/renderer.go
index f1595a5..c6b3189 100644
--- a/renderer/renderer.go
+++ b/renderer/renderer.go
@@ -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