From 39dbe314d6c88e3fcc9d47ccab3b856bb2c8813d Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 7 Mar 2016 20:25:29 -0500 Subject: [PATCH] ammend theme changing --- contrib/static/nntpchan.js | 8 +------- contrib/templates/default/board.mustache | 2 +- contrib/templates/default/frontpage.mustache | 2 +- contrib/templates/default/modlogin.mustache | 2 +- contrib/templates/default/modpage.mustache | 2 +- contrib/templates/default/navbar.mustache | 1 - contrib/templates/default/thread.mustache | 2 +- contrib/templates/default/ukko.mustache | 2 +- 8 files changed, 7 insertions(+), 14 deletions(-) diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 00e94eb..1f18f67 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -29,12 +29,6 @@ function enable_theme(prefix, name) { var theme = document.getElementById("current_theme"); if (theme) { - theme.remove(); - } - if (name) { - var style = document.createElement("style"); - style.setAttribute("id", "current_theme"); - style.innerHTML='@import("'+prefix+"static/"+name+'.css")'; - document.head.appendChild(style); + theme.href = prefix + "static/"+ name + ".css"; } } diff --git a/contrib/templates/default/board.mustache b/contrib/templates/default/board.mustache index 99ced97..d57c5e2 100644 --- a/contrib/templates/default/board.mustache +++ b/contrib/templates/default/board.mustache @@ -16,7 +16,7 @@ - + {{board.Board}} diff --git a/contrib/templates/default/frontpage.mustache b/contrib/templates/default/frontpage.mustache index 1dc29a3..58d5cb7 100644 --- a/contrib/templates/default/frontpage.mustache +++ b/contrib/templates/default/frontpage.mustache @@ -12,7 +12,7 @@ - + {{frontend}} on nntpchan diff --git a/contrib/templates/default/modlogin.mustache b/contrib/templates/default/modlogin.mustache index 8f4cb2f..3cc91f4 100644 --- a/contrib/templates/default/modlogin.mustache +++ b/contrib/templates/default/modlogin.mustache @@ -1,7 +1,7 @@ - + {{#i18n.Translations}}{{login}}{{/i18n.Translations}} diff --git a/contrib/templates/default/modpage.mustache b/contrib/templates/default/modpage.mustache index b37df55..4e082a2 100644 --- a/contrib/templates/default/modpage.mustache +++ b/contrib/templates/default/modpage.mustache @@ -7,7 +7,7 @@ - + {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}} diff --git a/contrib/templates/default/navbar.mustache b/contrib/templates/default/navbar.mustache index 7daf43e..c3ed6c6 100644 --- a/contrib/templates/default/navbar.mustache +++ b/contrib/templates/default/navbar.mustache @@ -45,7 +45,6 @@ bloodgod dayman - regular | diff --git a/contrib/templates/default/thread.mustache b/contrib/templates/default/thread.mustache index 6fbae1d..de1560d 100644 --- a/contrib/templates/default/thread.mustache +++ b/contrib/templates/default/thread.mustache @@ -15,7 +15,7 @@ - + {{thread.OP.Subject}} diff --git a/contrib/templates/default/ukko.mustache b/contrib/templates/default/ukko.mustache index 0f767eb..068fe75 100644 --- a/contrib/templates/default/ukko.mustache +++ b/contrib/templates/default/ukko.mustache @@ -9,7 +9,7 @@ {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} - +