add banners
This commit is contained in:
parent
c4090303ec
commit
98bb655a3c
BIN
contrib/static/banners/banner_0.jpg
Normal file
BIN
contrib/static/banners/banner_0.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
contrib/static/banners/banner_1.jpg
Normal file
BIN
contrib/static/banners/banner_1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
BIN
contrib/static/banners/banner_2.jpg
Normal file
BIN
contrib/static/banners/banner_2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
@ -12,3 +12,15 @@ function nntpchan_backlink(shorthash)
|
|||||||
elem.value += ">>" + shorthash.substr(0,10) + "\n";
|
elem.value += ">>" + shorthash.substr(0,10) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var banner_count = 3;
|
||||||
|
|
||||||
|
// inject a banner into an element
|
||||||
|
function nntpchan_inject_banners(elem, prefix) {
|
||||||
|
var n = Math.floor(Math.random() * banner_count);
|
||||||
|
var banner = prefix + "static/banner_"+n+".jpg";
|
||||||
|
var e = document.createElement("img");
|
||||||
|
e.src = banner;
|
||||||
|
e.setAttribute("class", "nntpchan_banner");
|
||||||
|
elem.appendChild(e);
|
||||||
|
}
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
{{{form}}}
|
{{{form}}}
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
|
<div onload="nntpchan_inject_banners(this, '{{board.Prefix}}');">
|
||||||
|
</div>
|
||||||
<div id="threads_container">
|
<div id="threads_container">
|
||||||
{{#board.Threads}}
|
{{#board.Threads}}
|
||||||
<div class="thread" id="thread_{{OP.PostHash}}">
|
<div class="thread" id="thread_{{OP.PostHash}}">
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="{{prefix}}static/site.css" />
|
<link rel="stylesheet" href="{{prefix}}static/site.css" />
|
||||||
<link rel="stylesheet" href="{{prefix}}static/user.css" />
|
<link rel="stylesheet" href="{{prefix}}static/user.css" />
|
||||||
|
<script src="{{prefix}}static/nntpchan.js" type="text/javascript">
|
||||||
|
</script>
|
||||||
<title> {{frontend}} on nntpchan </title>
|
<title> {{frontend}} on nntpchan </title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -28,6 +30,8 @@
|
|||||||
<h3>Fork on github: <a href="https://github.com/majestrate/nntpchan/">frontend</a> and <a href="https://github.com/majestrate/srndv2/">core</a></h3>
|
<h3>Fork on github: <a href="https://github.com/majestrate/nntpchan/">frontend</a> and <a href="https://github.com/majestrate/srndv2/">core</a></h3>
|
||||||
<h4>We've Had {{totalposts}} Posts Since August 01 2015 </h4>
|
<h4>We've Had {{totalposts}} Posts Since August 01 2015 </h4>
|
||||||
</div>
|
</div>
|
||||||
|
<div onload="nntpchan_inject_banners(this, '{{prefix}}');">
|
||||||
|
</div>
|
||||||
<div class="index-inner">
|
<div class="index-inner">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
{{{form}}}
|
{{{form}}}
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
|
<div onload="nntpchan_inject_banners(this, '{{thread.Prefix}}');">
|
||||||
|
</div>
|
||||||
<div class="thread" id="thread_{{thread.OP.PostHash}}">
|
<div class="thread" id="thread_{{thread.OP.PostHash}}">
|
||||||
<div class="thread_header">
|
<div class="thread_header">
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
|
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div onload="nntpchan_inject_banners(this, '{{prefix}}');">
|
||||||
|
</div>
|
||||||
<div id="ukko_threads">
|
<div id="ukko_threads">
|
||||||
{{#threads}}
|
{{#threads}}
|
||||||
<!--
|
<!--
|
||||||
|
Reference in New Issue
Block a user