From fb990c182cb656290af3b7d5bc5d01686b7f23c5 Mon Sep 17 00:00:00 2001 From: Azareal Date: Wed, 5 Jun 2019 01:33:44 +1000 Subject: [PATCH] Fix the order of the stylesheets. --- routes/common.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/routes/common.go b/routes/common.go index 14596ef1..07caa2ea 100644 --- a/routes/common.go +++ b/routes/common.go @@ -112,7 +112,13 @@ func FootHeaders(w http.ResponseWriter, header *c.Header) { } func renderTemplate3(tmplName string, hookName string, w http.ResponseWriter, r *http.Request, h *c.Header, pi interface{}) error { + s := h.Stylesheets + h.Stylesheets = nil c.PrepResources(&h.CurrentUser, h, h.Theme) + for _, ss := range s { + h.Stylesheets = append(h.Stylesheets,ss) + } + if h.CurrentUser.Loggedin { h.MetaDesc = "" h.OGDesc = "" @@ -135,4 +141,4 @@ func renderTemplate3(tmplName string, hookName string, w http.ResponseWriter, r } // TODO: Rename renderTemplate to RenderTemplate instead of using this hack to avoid breaking things -var RenderTemplate = renderTemplate3 +var RenderTemplate = renderTemplate3 \ No newline at end of file