Archived
1
0

add more themes and support for switching themes

This commit is contained in:
Jeff Becker 2016-03-07 20:18:28 -05:00
parent f05d43af89
commit 0623077a40
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
5 changed files with 83 additions and 2 deletions

View File

@ -0,0 +1,51 @@
/**
bloodgod theme css override
*/
body {
color: #666;
background: #111;
}
.reply, .ukko_thread_header {
border-color: #CA0101;
}
.ukko_thread_header {
border-style: solid;
border-width: 1px;
border-radius: 3px;
}
hr, .name {
color: #6B1919;
}
.subject {
color: #4E0000;
}
.reply , .ukko_thread_header {
color: #0C0C0C;
}
a {
color: #500707;
}
.postno, .postnol {
color: #B700000;
}
.postform >tr, th {
background: #6B1919;
}
table tbody tr:nth-of-type( even ) {
background-color: #430000;
}
table thead th {
color: #6B1919;
}

View File

@ -0,0 +1,6 @@
/*
dayman
fighter of the night man
champion of the sun
*/

View File

@ -143,12 +143,14 @@ function nntpchan_delete() {
}
function inject_nntp_feed_element(feed, elem) {
var name = document.createElement("span");
var name = document.createElement("div");
conns.setAttribute("class", "feeds_name");
name_elem = document.createTextNode("Name: "+feed.State.Config.Name);
name.appendChild(name_elem);
elem.appendChild(name);
var conns = document.createElement("span");
var conns = document.createElement("div");
conns.setAttribute("class", "feeds_connections");
conns_elem = document.createTextNode("Connections: "+feed.Conns.length);
conns.appendChild(conns_elem);
elem.appendChild(conns);

View File

@ -24,3 +24,17 @@ function nntpchan_inject_banners(elem, prefix) {
e.id = "nntpchan_banner";
elem.appendChild(e);
}
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);
}
}

View File

@ -42,5 +42,13 @@
<span class="navbar-sep">
|
</span>
<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">
|
</span>
</div>
<hr />