Archived
1
0

table css

This commit is contained in:
chen-chan 2015-12-23 01:02:11 +01:00
parent ed041c1689
commit 21ec8e5f3a
38 changed files with 930 additions and 467 deletions

View File

@ -1,60 +1,30 @@
<html> <!doctype html><html><head><link rel="stylesheet" type="text/css" href="/static/user.css"><title>nntpchan faq</title><style>body{font-family:monospace}</style></head><body>
<head> <p>nntpchan faq</p>
<link rel="stylesheet" href="site.css"></link> <dl>
<title> NNTPChan Frequently Asked Questions</title> <dt>What is nntpchan?</dt>
</head> <dd>NNTPCchan is a federated imageboard that spans across several networks including tor, i2p and anonet. There are no central servers so that as long as 1 server is left the forum will continue to function.</dd>
<body> <br>
<h2>NNTPChan faq </h2> <dt>How is this different from *chan?</dt>
<br/> <dd>NNTPChan is by design invulnerable to global censorship. All moderation is local to each server.</dd>
<hr /> <br>
<div id="faq"> <dt>How does moderation work then?</dt>
<p> <dd>Moderation is done with our special tripcodes (ed25519-sha512 signed posts). Anyone can give moderation suggestions, but that doesn't mean anyone will accept them. Those who trust the actions of a moderator can have their frontend whitelist the moderation actions and have them performed without oversight by another moderator.</dd>
<div>Question: What is nntpchan?</div> <br>
<div>NNTPCchan is a federated imageboard that spans across several networks including tor, i2p and anonet. There are no central servers so that as long as 1 server is left the forum will continue to function.</div> <dt>How can I remove content from nntpchan completely?</dt>
</p> <dd>‾\(._.)/‾ I don't know. You probably can't unless every server agrees to remove the content, even then, nothing prevents someone from reposting it. You can't delete what you post on the internet.</dd>
<hr /> <br>
<p> <dt>do you allow child porn?</dt>
<div>Question: How is this different from *chan? </div> <dd>no.</dd>
<div>NNTPChan is by design invulnerable to global censorship. All moderation is local to each server.</div> <br>
</p> <dt>Do you allow XYZ content?</dt>
<hr /> <dd>If it violates USA Law or causes problems with my host, no. Otherwise, probably.</dd>
<p> <br>
<div>Question: How does moderation work then? </div> <dt>Someone posted something I don't like but it's not illegal</dt>
<div>Moderation is done with our special tripcodes (ed25519-sha512 signed posts). Anyone can give moderation suggestions, but that doesn't mean anyone will accept them. Those who trust the actions of a moderator can have their frontend whitelist the moderation actions and have them performed without oversight by another moderator.</div> <dd>That is not my problem. All posts on this site are the responsibility of the individual poster and not the administration of this server</dd>
</p> <br>
<hr /> <dt>code, bugs, feature requests</dt>
<p> <dd><a href="https://github.com/majestrate/nntpchan/">frontend</a> <a href="https://github.com/majestrate/srndv2/">core</a></dd>
<div>Question: How can I remove content from nntpchan completely? </div> <br>
<div>‾\(._.)/‾ I don't know. You probably can't unless every server agrees to remove the content, even then, nothing prevents someone from reposting it. You can't delete what you post on the internet.</div> <p>Please send any gripes/questions/inqueries/suggestions/complaints to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question" </p>
</p> <audio autoplay="autoplay" loop="loop"><source src="about.mp3" type="audio/mpeg"><embed src="about.mp3"></audio>
<p> </body></html>
<div>Question: Do you allow child porn? </div>
<div>No, fuck off and die in a fire. All infringing posts are nuked.</div>
</p>
<hr />
<p>
<div>Question: Do you allow XYZ content? </div>
<div>If it violates USA Law or causes problems with my host, no. Otherwise, probably.</div>
</p>
<hr />
<p>
<div>Question: Someone posted something I don't like but it's not illegal</div>
<div>That is not my problem. All posts on this site are the responsibility of the individual poster and not the administration of this server</div>
</p>
<hr />
<p>
<div>Question: I found a bug or I have a feature request where do I go? </div>
<div><a href="https://github.com/majestrate/nntpchan/issues">github</a></div>
</p>
<hr />
<p>
<div>Please send any gripes/questions/inqueries/suggestions/complaints to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question" </div>
</p>
<hr />
</div>
<audio autoplay="autoplay" loop="loop">
<source src="about.mp3" type="audio/mpeg">
<embed src="about.mp3">
</audio>
</body>
</html>

View File

@ -1,3 +1,5 @@
/* body{font-family:monospace}
put your custom stylesheet here dl{max-width:80ch}
*/ dd{margin-left:2ch;overflow:auto}
.memearrows{color:green}
pre{margin: 0 0 0 0}

View File

@ -0,0 +1,47 @@
{{!
board.mustache, displays the contents of page N of the board
template parameters:
- board ( the model of the current page )
- page ( the page number of the current page )
board has the properties:
- Prefix ( absolute path like //site.tld/ or /path/ )
- Board ( the name of the board )
- Navbar ( a function that renders the navbar, should not be escaped )
- Threads ( a list of Thread Models with the last few replies )
}}
<html>
<head>
<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" />
<script type="text/javascript" src="{{board.Prefix}}static/nntpchan.js"></script>
<title>{{board.Board}}</title>
</head>
<body>
<!-- begin navbar -->
{{{board.Navbar}}}
<!-- end navbar -->
<!-- postform -->
<div id="postform_container">
{{{form}}}
</div>
<hr />
<div id="threads_container">
{{#board.Threads}}
<div class="thread" id="thread_{{OP.PostHash}}">
<div clsss="thread_header">
</div>
{{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}}
{{{Truncate.RenderPost}}}
<br />
{{/Truncate.Replies}}
</div>
{{/board.Threads}}
</div>
</body>
</html>

View File

@ -0,0 +1,49 @@
{{!
boardlist.mustache -- full list of every board
template parameters:
- graph ( a list of 4 string tuples: (board, posts_per_hour, posts_per_day, total_posts) )
- frontend ( the name of the frontend )
- prefix ( the site's prefix )
}}
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
<link rel="stylesheet" href="{{prefix}}static/user.css"></link>
<title> {{frontend}} board list </title>
</head>
<body>
<center>
<div class="index-outer">
<div class="index-inner">
<table id="board_graph">
<tbody>
<tr>
<th> Board </th>
<th> Post per Hour </th>
<th> Post per Day </th>
<th> Total </th>
</tr>
{{# graph}}
<tr>
<td>
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
</td>
<td>
{{Hour}}
</td>
<td>
{{Day}}
</td>
<td>
{{All}}
</td>
</tr>
{{/ graph}}
</tbody>
</table>
</div>
</div>
</center>
</body>
</html>

View File

@ -0,0 +1,75 @@
{{!
frontpage.mustache -- template for index.html
template parameters:
- boardgraph ( a boardPageRows instance, see srnd/model.go )
- postgraph ( a postsGraph instance , see srnd/model.go )
- overview ( an overviewModel instance, see srnd/model.go )
- totalposts ( the number of total posts we have ever seen )
- frontend ( the name of the frontend )
- prefix ( the site's prefix )
}}
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
<link rel="stylesheet" href="{{prefix}}static/user.css"></link>
<title> {{frontend}} on nntpchan </title>
</head>
<body>
<center>
<div class="index-outer">
<div class="index-inner">
<h1> {{frontend}} on nntpchan </h1>
<h2>View the <a href="ukko.html">overboard</a></h2>
<h3>Read the <a href="{{prefix}}static/faq.html">FAQ</a></h3>
<h3>Join the IRC on <a href="https://qchat.rizon.net/?channels=#nntpchan">rizon</a> or <a href="irc://127.0.0.1:6668/overchan">irc2p</a></h3>
<h3>Lurk on <a href="irc://allyour4nert7pkh.onion/overchan">URC</a></h3>
<h3>Check out the <a href="{{prefix}}boards.html">board list</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>
</div>
<div class="index-inner">
<table>
<tbody>
<tr>
<td>
{{{postsgraph.Render}}}
</td>
<td>
{{! todo: move boardgraph into its own file like postsgraph }}
<table id="board_graph">
<tbody>
<tr>
<th> Board </th>
<th> Posts this Hour </th>
<th> Posts Today </th>
<th> Total </th>
</tr>
{{# boardgraph}}
<tr>
<td>
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
</td>
<td>
{{Hour}}
</td>
<td>
{{Day}}
</td>
<td>
{{All}}
</td>
</tr>
{{/ boardgraph}}
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
{{{overview.Render}}}
</div>
</div>
</center>
</body>
</html>

View File

@ -0,0 +1,34 @@
{{!
graph_history.mustache
template parameters:
- history ( a list of PostEntry instances, see srnd/model.go )
}}
<html>
<head>
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<title> Post History</title>
</head>
<body>
<table id="history_graph">
<thead>
<tr>
<th>Month</th>
<th>Posts</th>
<th></th>
</tr>
</thead>
<tbody>
{{#history.Scale}}
<tr>
<td>{{Date}}</td>
<td class="history_num">{{Num}}</td>
<td>{{OvercockGraph}}</td>
</tr>
{{/history.Scale}}
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,22 @@
{{!
keygen.mustache -- page containing a newly generated tripcode
template parameters:
- prefix ( the site prefix )
- public ( the public key in hex )
- secret ( the secret key in hex )
- tripcode ( html version of the public key )
}}
<html>
<head>
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<style src="{{prefix}}static/user.css" type="text/css"></style>
<title> here is a new tripcode </title>
</head>
<body>
<pre>New Tripcode:
<div id="secret_key">secret: {{secret}}</div><div id="public_key">public: {{public}}</div><div>tripcode: <span class="tripcode" id="capcode_key">{{{tripcode}}}</span></div>
</pre>
</body>
</html>

View File

@ -0,0 +1,14 @@
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<title>login</title>
</head>
<body>
<form action="login" method="POST" name="modlogin">
<label for="mod_key">secret</label>
<input type="password" id="mod_key" name="privkey" />
<input type="submit" value="login" />
</form>
</body>
</html>

View File

@ -0,0 +1,19 @@
{{!
modlogin_result.mustache -- shows the result of a login attempt
template parameters:
- prefix ( the site prefix )
- mod_prefix ( the prefix to the mod panel, could be something like https://mod.site.tld/ or /mod/ )
- message ( the message returned from the login attempt )
- fail ( present if the login failed ) // not yet added
}}
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<meta http-equiv="refresh" content="1; {{mod_prefix}}"></meta>
<title>login</title>
</head>
<body>
<p>{{message}}</p>
</body>
</html>

View File

@ -0,0 +1,83 @@
{{!
modpage.mustache -- the moderator panel when logged in
template parameters:
- prefix ( the site's prefix )
}}
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
<!-- yes it uses js -->
<script type="text/javascript" src="{{prefix}}static/mod.js"></script>
<title> nntpchan mod page </title>
</head>
<body>
<div>
<div> post actions </div>
<hr />
<div>
<label for="nntpchan_mod_target">target</label>
<input id="nntpchan_mod_target" type="text" />
</div>
<div>
<button onclick="nntpchan_ban()">ban (url)</button>
<button onclick="nntpchan_delete()">delete (url)</button>
<button onclick="nntpchan_unban()">unban (ip)</button>
</div>
</div>
<hr />
<div>
<div> key actions </div>
<div>
<label for="nntpchan_board_target">pubkey:</label>
<input type="text" id="nntpchan_key_target" />
</div>
<div>
<button onclick="nntpchan_key_add()">add key</button>
<button onclick="nntpchan_key_del()">remove key</button>
</div>
</div>
<hr />
<div>
<div> board actions </div>
<div>
<label for="nntpchan_board_target">board name:</label>
<input type="text" id="nntpchan_board_target" />
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.add')">add board</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.regen')">regenerate</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.ban')">ban</button>
<button onclick="nntpchan_admin_board('frontend.unban')">unban</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.nuke')">nuke</button>
</div>
</div>
<hr />
<div>
<div>
lightweight actions
</div>
<div>
<button onclick="nntpchan_admin('template.reload')">reload all templates</button>
</div>
</div>
<hr />
<div>
<label>very load heavy actions, use with care</label>
<div>
<button onclick="nntpchan_admin('frontend.regen')">regenerate all pages</button>
<button onclick="nntpchan_admin('thumbnail.regen')">regenerate all thumbnails</button>
</div>
</div>
<div id="nntpchan_mod_result"></div>
<noscript>
<b>enable js to use the mod panel kthx</b>
</noscript>
</body>
</html>

View File

@ -0,0 +1,46 @@
{{!
navbar.mustache -- element on the top of each nod-mod page
TODO: make this not suck, have a board list, have board page list
template parameters:
- name ( the name of whatever resource we are on, board/thread )
- frontend ( the name of the frontend we are on )
- links ( a list of Link Models to display )
- prefix ( site prefix )
}}
<div class="navbar">
<span class="navbar-name">
<span class="board_title">{{name}}</span>
on
<span class="frontend_title">{{frontend}}</span>
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-links-title">
Pages:
</span>
{{# links }}
<span class="navbar-link"><a href="{{LinkURL}}">{{Text}}</a></span>
{{/ links }}
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-link"><a href="{{prefix}}">front page</a></span>
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-link"><a href="{{prefix}}ukko.html">overboard</a></span>
</span>
<span class="navbar-sep">
|
</span>
</div>
<hr />

View File

@ -0,0 +1,56 @@
<html>
<head>
<title>create new board</title>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/newboard.js">
</script>
</head>
<body>
<p>make your first post</p>
<hr />
<form action="{{prefix}}post/" enctype="multipart/form-data" name="post" method="post" id="postform" >
<div id="postform-outer">
<div id="postform-inner">
<table class="postform">
<tbody>
<tr>
<th>
Board Name
</th>
<td>
<input type="text" name="name" value="" id="boardname" />
<button onclick="createBoard()">Create Board</button>
</td>
</tr>
<tr>
<th>
Comment
</th>
<td>
<textarea id="postform_message" type="text" name="message" cols=40 rows=5></textarea>
</td>
</tr>
<tr>
<th>
Captcha
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
</td>
</tr>
<tr>
<th>
Solution
</th>
<td>
<input type="text" name="captcha" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,25 @@
{{! overview.mustache
paramters:
- overview (list of PostModels in order of last posted)
}}
<table id="overview_graph">
<thead>
<tr>
<th>Newsgroup</th>
<th>Posted</th>
<th>Subject</th>
</tr>
</thead>
<tbody>
{{#overview}}
<tr>
<td><a href="{{Prefix}}{{Board}}-0.html">{{Board}}</td>
<td>{{Date}}</td>
<td><a href="{{PostURL}}">{{Truncate.Subject}}</a></td>
</tr>
{{/overview}}
</tbody>
</table>

View File

@ -0,0 +1,26 @@
<fieldset>
{{#IsI2P}}
<img src="{{Prefix}}static/i2p.png" title="post from i2p" />
{{/IsI2P}}
{{#IsTor}}
<img src="{{Prefix}}static/tor.png" title="post from tor" />
{{/IsTor}}
{{#IsClearnet}}
<img src="{{Prefix}}static/clearnet.png" title="post from clearnet" />
{{/IsClearnet}}
<legend>
<span class="subject">{{Subject}}</span> <span class="name">{{Name}}</span> {{Date}}
No. <a onclick="nntpchan_backlink('{{ShortHash}}');" title="{{MessageID}}">{{ShortHash}}</a>
<a href="{{PostURL}}">[reply]</a> <span class="tripcode">{{{Pubkey}}}</span><br />
</legend>
{{#Attachments}}
<figure>
<figcaption>
<a target="_blank" href="{{Source}}" title="{{Filename}}"><img src="{{Thumbnail}}" alt="{{Filename}}" /></a>
</figcaption>
</figure>
{{/Attachments}}
<label class="post_body">
{{{RenderBody}}}
</label>
</fieldset>

View File

@ -0,0 +1,9 @@
<html>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<meta http-equiv="refresh" content="1; {{redirect_url}}" />
<body>
<p>post failed: {{reason}}</p>
</body>
</html>

View File

@ -0,0 +1,48 @@
<html>
<head>
<title> try again </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
</head>
<body>
<form enctype="multipart/form-data" name="post" method="post">
{{#attachment}}
<input type="hidden" name="attachment_data" value="{{attachment}}" />
<input type="hidden" name="attachment_filename" value="{{attachment_filename}}" />
<input type="hidden" name="attachment_mime" value="{{attachment_type}}" />
{{/attachment}}
<input type="hidden" name="reference" value="{{reference}}" />
<input type="hidden" name="name" value="{{name}}" />
<input type="hidden" name="subject" value="{{subject}}" />
<input type="hidden" name="captcha_id" value="{{captcha_id}}" />
<input type="hidden" name="message" value="{{message}}" />
<div id="postform-outer">
<div id="postform-inner">
<div>{{fail_message}}</div>
<table class="postform">
<tbody>
<tr>
<th>
Captcha
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/{{captcha_id}}.png" alt="captcha" />
</td>
</tr>
<tr>
<th>
Solution
</th>
<td>
<input type="text" name="captcha" />
<input type="submit" value="Post" class="button" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,15 @@
{{!
post_success.mustache -- shown when we do a successful post
template parameters:
- redirect_url ( the url of the next page we should redirect to )
- message_id ( the value of the Message-ID header in the post we made, the truncated sha1 of this is the >>posthash )
}}
<html>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<meta http-equiv="refresh" content="2; {{redirect_url}}" />
<body>
<pre>posted as {{message_id}}</pre>
</body>
</html>

View File

@ -0,0 +1,77 @@
{{!
postform.mustache -- the form for posting
template parameters:
- post_url ( the url of the post form )
- reference ( the post we are replying to, or empty string if it's an op )
- button ( the text for the reply button )
}}
<form action="{{post_url}}" enctype="multipart/form-data" name="post" method="post">
<input type="hidden" name="reference" value="{{reference}}" />
<div id="postform-outer">
<div id="postform-inner">
<table class="postform">
<tbody>
<tr>
<th>
Name
</th>
<td>
<input type="text" name="name" value="" />
</td>
</tr>
<tr>
<th>
Subject
</th>
<td>
<input type="text" name="subject" value="" />
<input type="submit" value="{{button}}" class="button" />
</td>
</tr>
<tr>
<th>
Comment
</th>
<td>
<textarea id="postform_message" name="message" cols=40 rows=5></textarea>
</td>
</tr>
<tr>
<th>
File
</th>
<td>
<input type="file" name="attachment" />
</td>
</tr>
<tr>
<th>
Get Dubs
</th>
<td>
<input type="checkbox" name="dubs" />
</td>
</tr>
<tr>
<th>
Captcha
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
</td>
</tr>
<tr>
<th>
Solution
</th>
<td>
<input type="text" name="captcha" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>

View File

@ -0,0 +1,25 @@
{{!
posts graph.mustache -- post frequence graph
parameters:
* graph - a postsGraph instance (see srnd/model.go)
}}
<table id="posts_graph">
<thead>
<tr>
<th>Day</th>
<th>Posts</th>
<th></th>
</tr>
</thead>
<tbody>
{{#graph.Scale}}
<tr>
<td>{{Day}}</td>
<td>{{Num}}</td>
<td>{{OvercockGraph}}</td>
</tr>
{{/graph.Scale}}
</tbody>
</table>

View File

@ -0,0 +1,45 @@
{{!
thread.mustache -- renders to a thread-*.html page, shows the entire thread
template parameters:
- board ( the Board Model of the board this thread was posted in )
- thread ( the Thread Model of the current thread being rendered )
- form ( the post form markup )
Thread Model attributes:
- OP , the Post Model of the original poster
- Replies , a list of all the replies or empty if none
- Board , the name of the Board this thread is on
- BoardURL , the url that points to the board index page
}}
<html>
<head>
<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" />
<script type="text/javascript" src="{{thread.Prefix}}static/nntpchan.js"></script>
<title> {{thread.OP.Subject}} </title>
</head>
<body>
<!-- begin navbar -->
{{{thread.Navbar}}}
<!-- end navbar -->
<!-- postform -->
<div id="postform_container">
{{{form}}}
</div>
<hr />
<div class="thread" id="thread_{{thread.OP.PostHash}}">
<div class="thread_header">
</div>
{{{thread.OP.RenderPost}}}
{{# thread.Replies}}
{{{RenderPost}}}
<br/>
{{/ thread.Replies}}
</div>
<br/>
</body>
</html>

View File

@ -0,0 +1,35 @@
{{!
ukko.mustache -- overboard, contains the last threads posted regardless of newsgroup
template parameters:
- prefix ( site prefix )
- threads ( a list of Thread Models that represent the latest threads )
}}
<html>
<head>
<title> ukko / overboard </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>
<div id="ukko_threads">
{{#threads}}
<!--
<div class="ukko_thread_header">
<p> Posted on <a href="{{{BoardURL}}}"><span class="ukko_boardname">{{OP.Board}}</span></a></p>
</div>
-->
<div class="thread" id="thread_{{OP.PostHash}}">
<div clsss="thread_header">
</div>
{{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}}
{{{Truncate.RenderPost}}}
<br />
{{/Truncate.Replies}}
</div>
{{/threads}}
</div>
</body>
</html>

View File

@ -11,37 +11,24 @@
- Navbar ( a function that renders the navbar, should not be escaped ) - Navbar ( a function that renders the navbar, should not be escaped )
- Threads ( a list of Thread Models with the last few replies ) - Threads ( a list of Thread Models with the last few replies )
}} }}
<!doctype html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <link rel="stylesheet" type="text/css" href="/static/user.css">
<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" />
<script type="text/javascript" src="{{board.Prefix}}static/nntpchan.js"></script>
<title>{{board.Board}}</title> <title>{{board.Board}}</title>
</head> </head>
<body> <body>
<!-- begin navbar -->
{{{board.Navbar}}} {{{board.Navbar}}}
<!-- end navbar -->
<!-- postform -->
<div id="postform_container">
{{{form}}} {{{form}}}
</div> <dl>
<hr /> <hr>
<div id="threads_container">
{{#board.Threads}} {{#board.Threads}}
<div class="thread" id="thread_{{OP.PostHash}}">
<div clsss="thread_header">
</div>
{{{OP.Truncate.RenderPost}}} {{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}} {{#Truncate.Replies}}
{{{Truncate.RenderPost}}} {{{Truncate.RenderPost}}}
<br />
{{/Truncate.Replies}} {{/Truncate.Replies}}
</div> <hr>
{{/board.Threads}} {{/board.Threads}}
</div> </dl>
</body> </body>
</html> </html>

View File

@ -5,24 +5,19 @@
- frontend ( the name of the frontend ) - frontend ( the name of the frontend )
- prefix ( the site's prefix ) - prefix ( the site's prefix )
}} }}
<!doctype html>
<html> <html>
<head> <head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link> <link rel="stylesheet" type="text/css" href="/static/user.css">
<link rel="stylesheet" href="{{prefix}}static/user.css"></link> <title>{{frontend}} boards</title>
<title> {{frontend}} board list </title>
</head> </head>
<body> <body>
<center> <table border="1">
<div class="index-outer">
<div class="index-inner">
<table id="board_graph">
<tbody>
<tr> <tr>
<th> Board </th> <th>board</th>
<th> Post per Hour </th> <th>posts per hour</th>
<th> Post per Day </th> <th>posts per day</th>
<th> Total </th> <th>total</th>
</tr> </tr>
{{# graph}} {{# graph}}
<tr> <tr>
@ -40,10 +35,6 @@
</td> </td>
</tr> </tr>
{{/ graph}} {{/ graph}}
</tbody>
</table> </table>
</div>
</div>
</center>
</body> </body>
</html> </html>

View File

@ -8,68 +8,4 @@
- frontend ( the name of the frontend ) - frontend ( the name of the frontend )
- prefix ( the site's prefix ) - prefix ( the site's prefix )
}} }}
<!doctype html><html><head><link rel="stylesheet" href="/static/user.css"><title>{{frontend}} on nntpchan</title></head><body><p>{{frontend}} on nntpchan</p><p><a href="ukko.html">overboard</a> <a href="{{prefix}}boards.html">boards</a> <a href="{{prefix}}static/faq.html">faq</a></p><dl><dt>last posts:</dt><dd>{{{overview.Render}}}</dd></dl><dl><dt>board stats:</dt><dd><table><tr><th>board</th><th>posts this hour</th><th>posts today</th><th>total</th></tr>{{# boardgraph}}<tr><td><a href="{{prefix}}{{Board}}-0.html">{{Board}}</a></td><td>{{Hour}}</td><td>{{Day}}</td><td>{{All}}</td></tr>{{/ boardgraph}}</table></dd></dl><dl><dt>total stats:</dt><dd>{{{postsgraph.Render}}}</dd></dl><p>{{totalposts}} posts total</p></body></html>
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
<link rel="stylesheet" href="{{prefix}}static/user.css"></link>
<title> {{frontend}} on nntpchan </title>
</head>
<body>
<center>
<div class="index-outer">
<div class="index-inner">
<h1> {{frontend}} on nntpchan </h1>
<h2>View the <a href="ukko.html">overboard</a></h2>
<h3>Read the <a href="{{prefix}}static/faq.html">FAQ</a></h3>
<h3>Join the IRC on <a href="https://qchat.rizon.net/?channels=#nntpchan">rizon</a> or <a href="irc://127.0.0.1:6668/overchan">irc2p</a></h3>
<h3>Lurk on <a href="irc://allyour4nert7pkh.onion/overchan">URC</a></h3>
<h3>Check out the <a href="{{prefix}}boards.html">board list</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>
</div>
<div class="index-inner">
<table>
<tbody>
<tr>
<td>
{{{postsgraph.Render}}}
</td>
<td>
{{! todo: move boardgraph into its own file like postsgraph }}
<table id="board_graph">
<tbody>
<tr>
<th> Board </th>
<th> Posts this Hour </th>
<th> Posts Today </th>
<th> Total </th>
</tr>
{{# boardgraph}}
<tr>
<td>
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
</td>
<td>
{{Hour}}
</td>
<td>
{{Day}}
</td>
<td>
{{All}}
</td>
</tr>
{{/ boardgraph}}
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
{{{overview.Render}}}
</div>
</div>
</center>
</body>
</html>

View File

@ -12,6 +12,7 @@ template parameters:
<title> Post History</title> <title> Post History</title>
</head> </head>
<body> <body>
<td>
<table id="history_graph"> <table id="history_graph">
<thead> <thead>
<tr> <tr>
@ -30,5 +31,6 @@ template parameters:
{{/history.Scale}} {{/history.Scale}}
</tbody> </tbody>
</table> </table>
</td>
</body> </body>
</html> </html>

View File

@ -5,18 +5,11 @@
- public ( the public key in hex ) - public ( the public key in hex )
- secret ( the secret key in hex ) - secret ( the secret key in hex )
- tripcode ( html version of the public key ) - tripcode ( html version of the public key )
}} }}
<html> <!doctype html><html><head><title>new tripcode</title></head><body><pre>
<head> new tripcode:
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="{{prefix}}static/site.css" /> secret: {{secret}}
<link rel="stylesheet" href="{{prefix}}static/user.css" /> public: {{public}}
<style src="{{prefix}}static/user.css" type="text/css"></style> tripcode: {{{tripcode}}}
<title> here is a new tripcode </title> </pre></body></html>
</head>
<body>
<pre>New Tripcode:
<div id="secret_key">secret: {{secret}}</div><div id="public_key">public: {{public}}</div><div>tripcode: <span class="tripcode" id="capcode_key">{{{tripcode}}}</span></div>
</pre>
</body>
</html>

View File

@ -6,7 +6,8 @@
}} }}
<html> <html>
<head> <head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link> <link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<!-- yes it uses js --> <!-- yes it uses js -->
<script type="text/javascript" src="{{prefix}}static/mod.js"></script> <script type="text/javascript" src="{{prefix}}static/mod.js"></script>
<title> nntpchan mod page </title> <title> nntpchan mod page </title>

View File

@ -9,38 +9,4 @@
- links ( a list of Link Models to display ) - links ( a list of Link Models to display )
- prefix ( site prefix ) - prefix ( site prefix )
}} }}
<div class="navbar"> <p>{{name}} on {{frontend}} | {{# links}} <a href="{{LinkURL}}">{{Text}}</a> {{/ links}} | <a href="{{prefix}}">front page</a> <a href="{{prefix}}ukko.html">overboard</a></p>
<span class="navbar-name">
<span class="board_title">{{name}}</span>
on
<span class="frontend_title">{{frontend}}</span>
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-links-title">
Pages:
</span>
{{# links }}
<span class="navbar-link"><a href="{{LinkURL}}">{{Text}}</a></span>
{{/ links }}
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-link"><a href="{{prefix}}">front page</a></span>
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-link"><a href="{{prefix}}ukko.html">overboard</a></span>
</span>
<span class="navbar-sep">
|
</span>
</div>
<hr />

View File

@ -28,7 +28,7 @@
Comment Comment
</th> </th>
<td> <td>
<textarea id="postform_message" type="text" name="message" cols=40 rows=5></textarea> <textarea id="postform_message" name="message" cols=40 rows=5></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -4,22 +4,4 @@ paramters:
- overview (list of PostModels in order of last posted) - overview (list of PostModels in order of last posted)
}} }}
<table><tr><th>date</th><th>board</th><th>subject</th></tr>{{#overview}}<tr><td>{{Date}}</td><td><a href="{{Prefix}}{{Board}}-0.html">{{Board}}</a></td><td><a href="{{PostURL}}">{{Truncate.Subject}}</a></td></tr>{{/overview}}</table>
<table id="overview_graph">
<thead>
<tr>
<th>Newsgroup</th>
<th>Posted</th>
<th>Subject</th>
</tr>
</thead>
<tbody>
{{#overview}}
<tr>
<td><a href="{{Prefix}}{{Board}}-0.html">{{Board}}</td>
<td>{{Date}}</td>
<td><a href="{{PostURL}}">{{Truncate.Subject}}</a></td>
</tr>
{{/overview}}
</tbody>
</table>

View File

@ -1,26 +1,15 @@
<fieldset> <dt id="{{PostHash}}">
{{#IsI2P}} <a onclick="nntpchan_backlink('{{ShortHash}}');" title="{{MessageID}}">{{ShortHash}}</a>
<img src="{{Prefix}}static/i2p.png" title="post from i2p" /> {{Date}}
{{/IsI2P}} {{#IsI2P}}i2p{{/IsI2P}}{{#IsTor}}tor{{/IsTor}}{{#IsClearnet}}clr{{/IsClearnet}}
{{#IsTor}} {{Subject}}
<img src="{{Prefix}}static/tor.png" title="post from tor" /> {{Name}}
{{/IsTor}} {{{Pubkey}}}
{{#IsClearnet}} <a href="{{PostURL}}">[reply]</a>
<img src="{{Prefix}}static/clearnet.png" title="post from clearnet" /> </dt>
{{/IsClearnet}} <dd>
<legend>
<span class="subject">{{Subject}}</span> <span class="name">{{Name}}</span> {{Date}}
No. <a onclick="nntpchan_backlink('{{ShortHash}}');" title="{{MessageID}}">{{ShortHash}}</a>
<a href="{{PostURL}}">[reply]</a> <span class="tripcode">{{{Pubkey}}}</span><br />
</legend>
{{#Attachments}}
<figure>
<figcaption>
<a target="_blank" href="{{Source}}" title="{{Filename}}"><img src="{{Thumbnail}}" alt="{{Filename}}" /></a>
</figcaption>
</figure>
{{/Attachments}}
<label class="post_body">
{{{RenderBody}}} {{{RenderBody}}}
</label> {{#Attachments}}
</fieldset> file: <a href="{{Source}}" target="_blank">{{Filename}}</a><br><br>
{{/Attachments}}
</dd>

View File

@ -1,9 +1,7 @@
<!doctype html>
<html> <html>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<meta http-equiv="refresh" content="1; {{redirect_url}}" /> <meta http-equiv="refresh" content="1; {{redirect_url}}" />
<body> <body>
<p>post failed: {{reason}}</p> <p>fail: {{reason}}</p>
</body> </body>
</html> </html>

View File

@ -1,9 +1,7 @@
<html> <html>
<head> <head>
<title> try again </title> <link rel="stylesheet" type="text/css" href="/static/user.css">
<meta charset="utf-8" /> <title>try again</title>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
</head> </head>
<body> <body>
<form enctype="multipart/form-data" name="post" method="post"> <form enctype="multipart/form-data" name="post" method="post">

View File

@ -4,11 +4,11 @@
- redirect_url ( the url of the next page we should redirect to ) - redirect_url ( the url of the next page we should redirect to )
- message_id ( the value of the Message-ID header in the post we made, the truncated sha1 of this is the >>posthash ) - message_id ( the value of the Message-ID header in the post we made, the truncated sha1 of this is the >>posthash )
}} }}
<!doctype html>
<html> <html>
<meta charset="utf-8" /> <head>
<link rel="stylesheet" href="{{prefix}}static/site.css" /> <meta http-equiv="refresh" content="2; {{redirect_url}}">
<link rel="stylesheet" href="{{prefix}}static/user.css" /> </head>
<meta http-equiv="refresh" content="2; {{redirect_url}}" />
<body> <body>
<pre>posted as {{message_id}}</pre> <pre>posted as {{message_id}}</pre>
</body> </body>

View File

@ -6,72 +6,15 @@
- reference ( the post we are replying to, or empty string if it's an op ) - reference ( the post we are replying to, or empty string if it's an op )
- button ( the text for the reply button ) - button ( the text for the reply button )
}} }}
<form action="{{post_url}}" enctype="multipart/form-data" name="post" method="post"> <form action="{{post_url}}" enctype="multipart/form-data" name="post" method="post" style="overflow:auto">
<input type="hidden" name="reference" value="{{reference}}" /> <input type="hidden" name="reference" value="{{reference}}">
<div id="postform-outer"> <textarea id="postform_message" name="message" placeholder="text" cols="40" rows="10" style="float:left" ></textarea><br>
<div id="postform-inner"> <div style="float:left">
<table class="postform"> <input type="file" name="attachment"><br>
<tbody> <input type="text" name="subject" placeholder="subject"><br>
<tr> <input type="text" name="name" placeholder="name"><br>
<th> <input type="text" name="captcha" placeholder="captcha"><br>
Name <input type="submit" value="{{button}}" class="button"><br>
</th>
<td>
<input type="text" name="name" value="" />
</td>
</tr>
<tr>
<th>
Subject
</th>
<td>
<input type="text" name="subject" value="" />
<input type="submit" value="{{button}}" class="button" />
</td>
</tr>
<tr>
<th>
Comment
</th>
<td>
<textarea id="postform_message" name="message" cols=40 rows=5></textarea>
</td>
</tr>
<tr>
<th>
File
</th>
<td>
<input type="file" name="attachment" />
</td>
</tr>
<tr>
<th>
Get Dubs
</th>
<td>
<input type="checkbox" name="dubs" />
</td>
</tr>
<tr>
<th>
Captcha
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
</td>
</tr>
<tr>
<th>
Solution
</th>
<td>
<input type="text" name="captcha" />
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> <img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" style="float:left">
</form> </form>

View File

@ -4,22 +4,4 @@ parameters:
* graph - a postsGraph instance (see srnd/model.go) * graph - a postsGraph instance (see srnd/model.go)
}} }}
<table><tr><th>date</th><th>posts</th><th>cock</th></tr>{{#graph.Scale}}<tr><td>{{Day}}</td><td>{{Num}}</td><td>{{OvercockGraph}}</td></tr>{{/graph.Scale}}</table>
<table id="posts_graph">
<thead>
<tr>
<th>Day</th>
<th>Posts</th>
<th></th>
</tr>
</thead>
<tbody>
{{#graph.Scale}}
<tr>
<td>{{Day}}</td>
<td>{{Num}}</td>
<td>{{OvercockGraph}}</td>
</tr>
{{/graph.Scale}}
</tbody>
</table>

View File

@ -10,36 +10,18 @@
- Replies , a list of all the replies or empty if none - Replies , a list of all the replies or empty if none
- Board , the name of the Board this thread is on - Board , the name of the Board this thread is on
- BoardURL , the url that points to the board index page - BoardURL , the url that points to the board index page
}} }}
<html> <!doctype html><html><head><link rel="stylesheet" type="text/css" href="/static/user.css">
<head> <title>{{thread.OP.Subject}}</title>
<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" />
<script type="text/javascript" src="{{thread.Prefix}}static/nntpchan.js"></script> <script type="text/javascript" src="{{thread.Prefix}}static/nntpchan.js"></script>
<title> {{thread.OP.Subject}} </title> </head>
</head> <body>
<body>
<!-- begin navbar -->
{{{thread.Navbar}}} {{{thread.Navbar}}}
<!-- end navbar -->
<!-- postform -->
<div id="postform_container">
{{{form}}} {{{form}}}
</div> <dl>
<hr />
<div class="thread" id="thread_{{thread.OP.PostHash}}">
<div class="thread_header">
</div>
{{{thread.OP.RenderPost}}} {{{thread.OP.RenderPost}}}
{{# thread.Replies}} {{# thread.Replies}}
{{{RenderPost}}} {{{RenderPost}}}
<br/>
{{/ thread.Replies}} {{/ thread.Replies}}
</div> </dl>
<br/> </body></html>
</body>
</html>

View File

@ -3,33 +3,24 @@
template parameters: template parameters:
- prefix ( site prefix ) - prefix ( site prefix )
- threads ( a list of Thread Models that represent the latest threads ) - threads ( a list of Thread Models that represent the latest threads )
}} }}
<!doctype html>
<html> <html>
<head> <head>
<title> ukko / overboard </title> <link rel="stylesheet" type="text/css" href="/static/user.css">
<meta charset="utf-8" /> <title>ukko/overboard</title>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head> </head>
<body> <body>
<div id="ukko_threads"> <a href="/">frontpage</a>
{{#threads}} {{#threads}}
<!-- <hr>
<div class="ukko_thread_header"> <p>posted on <a href="{{{BoardURL}}}">{{OP.Board}}</a></p>
<p> Posted on <a href="{{{BoardURL}}}"><span class="ukko_boardname">{{OP.Board}}</span></a></p> <dl>
</div>
-->
<div class="thread" id="thread_{{OP.PostHash}}">
<div clsss="thread_header">
</div>
{{{OP.Truncate.RenderPost}}} {{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}} {{#Truncate.Replies}}
{{{Truncate.RenderPost}}} {{{Truncate.RenderPost}}}
<br />
{{/Truncate.Replies}} {{/Truncate.Replies}}
</div> </dl>
{{/threads}} {{/threads}}
</div>
</body> </body>
</html> </html>