ammend theme changing
This commit is contained in:
parent
63e2614983
commit
39dbe314d6
@ -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";
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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">
|
||||
|
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user