Archived
1
0

ammend theme changing

This commit is contained in:
Jeff Becker 2016-03-07 20:25:29 -05:00
parent 63e2614983
commit 39dbe314d6
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
8 changed files with 7 additions and 14 deletions

View File

@ -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";
}
}

View File

@ -16,7 +16,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1" />
<link rel="stylesheet" href="{{board.Prefix}}static/site.css" />
<link rel="stylesheet" href="{{board.Prefix}}static/user.css" />
<link id="current_theme" rel="stylesheet" href="{{board.Prefix}}static/user.css" />
<script type="text/javascript" src="{{board.Prefix}}static/nntpchan.js"></script>
<title>{{board.Board}}</title>
</head>

View File

@ -12,7 +12,7 @@
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script src="{{prefix}}static/nntpchan.js" type="text/javascript"></script>
<title> {{frontend}} on nntpchan </title>
</head>

View File

@ -1,7 +1,7 @@
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<title>{{#i18n.Translations}}{{login}}{{/i18n.Translations}}</title>
</head>
<body>

View File

@ -7,7 +7,7 @@
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<!-- yes it uses js -->
<script type="text/javascript" src="{{prefix}}static/mod.js"></script>
<title> {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}} </title>

View File

@ -45,7 +45,6 @@
<span class="navbar-links">
<span class="navbar-link"><a onclick="enable_theme('{{prefix}}','bloodgod')" href="#">bloodgod</a></span>
<span class="navbar-link"><a onclick="enable_theme('{{prefix}}','dayman')" href="#">dayman</a></span>
<span class="navbar-link"><a onclick="enable_theme(null, null)" href="#">regular</a></span>
</span>
<span class="navbar-sep">
|

View File

@ -15,7 +15,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1" />
<link rel="stylesheet" href="{{thread.Prefix}}static/site.css" />
<link rel="stylesheet" href="{{thread.Prefix}}static/user.css" />
<link id="current_theme" rel="stylesheet" href="{{thread.Prefix}}static/user.css" />
<script src="{{thread.Prefix}}static/nntpchan.js" type="text/javascript"></script>
<title> {{thread.OP.Subject}} </title>
</head>

View File

@ -9,7 +9,7 @@
<title> {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>