21 Commits

Author SHA1 Message Date
jeff
9405848c07 initial base, probably will not work 2015-10-07 13:50:15 -04:00
jeff
758a2c6bbb newboard.js prepends 'overchan.' if it's not present in the name 2015-10-04 06:38:17 -04:00
jeff
b3f104a80a update faq 2015-10-04 06:34:01 -04:00
jeff
8608d222c3 add link to /new/ 2015-10-03 22:07:19 -04:00
jeff
fcca345ba1 fix nginx config 2015-10-03 10:31:32 -04:00
jeff
bc81c8e251 add example nginx config, probably works 2015-10-03 10:14:25 -04:00
jeff
7727fc76f8 add message field 2015-10-02 15:46:52 -04:00
jeff
bb676336db fix 2015-10-02 15:45:22 -04:00
jeff
6194db1941 Merge branch 'master' into devel
Conflicts:
	contrib/static/site.css
2015-10-02 15:41:44 -04:00
jeff
229ef83e35 add initial newboard stuff 2015-10-02 15:38:59 -04:00
jeff
12e887316a remove dank maymz 2015-10-02 12:04:49 -04:00
jeff
441be15845 add pubkey.* admin functions 2015-10-02 11:00:26 -04:00
jeff
2366781282 Merge branch 'devel'
Conflicts:
	contrib/templates/default/post.mustache
2015-10-01 14:28:36 -04:00
jeff
69adbaca5a fix irc link 2015-10-01 14:27:46 -04:00
jeff
dd2f916aed wrong placement again 2015-10-01 14:02:45 -04:00
jeff
ef71260653 wrong placement of icons 2015-10-01 14:02:30 -04:00
jeff
ac3f0eab94 add css and images for origins 2015-10-01 13:55:17 -04:00
jeff
c5605a4412 add post origin awareness 2015-10-01 13:51:01 -04:00
jeff
790c61cfdb ammend templates to use stylesheets 2015-09-19 13:54:10 -04:00
jeff
7b3ec70a80 css tweak 2015-09-19 13:50:19 -04:00
jeff
fcbae8cea1 captcha background consistance 2015-09-19 13:45:49 -04:00
16 changed files with 247 additions and 10 deletions

View File

@@ -0,0 +1,11 @@
# using srndv2 behind nginx with a prefix
# make sure to set prefix=/nntpchan/ for section frontend in srnd.ini
server {
listen 80;
location /nntpchan/(.*) {
client_max_body_size 50M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://[::1]:18000/$1;
}
}

16
contrib/live/index.html Normal file
View File

@@ -0,0 +1,16 @@
<html>
<head>
<title> nntpchan liveposting </title>
<link rel="stylesheet" src="live.css" />
<script type="text/javascript" src="live.js">
</script>
</head>
<body>
<noscript>
<p>nntpchan liveposting is done entirly via javascript and websockets</P>
<p>this frontend will not work without javascript enabled</p>
</noscript>
<div onload="nntpchan_load_ui(this)">
</div>
</body>
</html>

83
contrib/live/live.js Normal file
View File

@@ -0,0 +1,83 @@
function create_captcha_pane() {
var elem = document.createElement("div");
elem.setAttribute("class", "nntpchan_captcha_slash");
}
// create the base ui
// pass in a function that does posting
// return the model
function create_ui(elem) {
var pane = document.createElement("div");
var output = document.createElement("div");
output.setAttribute("class", "nntpchan_output");
var output_elem = document.createElemen("div");
output_elem.setAttribute("class", "nntpchan_output_root");
output.appendChild(output_elem);
pane.appendChild(output);
var input = document.createElement("div");
input.setAttribute("class", "nntpchan_input");
var input_elem = document.createElement("textarea");
input_elem.setAttribute("class", "nntpchan_textarea");
input.appendChild(input_elem);
var submit_elem = document.createElement("input");
submit_elem.setAttrbute("type", "button");
input.appendChild(submit_elem);
pane.appendChild(input);
elem.appendChild(pane);
var captcha_elem = create_captcha_pane();
elem.appendChild(captcha_elem);
return {
input: input_elem,
submit: submit_elem,
output: output_elem,
captcha: captcha_elem
}
}
// load ui elements and start stuff up
function nntpchan_load_ui(elem) {
// check for websockets
if (!("WebSocket" in window)) {
elem.value = "websockets are needed for nntpchan liveposting";
return;
}
// TODO: make configurable url
var url = "ws://" + location.hostname + ":18080/ws";
var socket = new WebSocket(url);
var send = function(obj) {
socket.send(JSON.stringify(obj));
}
var ui = create_ui(elem);
ui.submit.addEventListener("click", function(ev) {
});
socket.onopen = function() {
}
socket.onmessage = function() {
}
}

BIN
contrib/static/clearnet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

View File

@@ -27,10 +27,19 @@
<div>Question: How can I remove content from nntpchan completely? </div>
<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>
<p>
<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, yes. <b>All posts on this site are the responsibility of the individual poster and not the administration of this server</b>.</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>
@@ -39,13 +48,13 @@
</p>
<hr />
<p>
<div>Please send any questions to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question" </div>
<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="" loop="">
<source src="/static/about.mp3" type="audio/mpeg">
<embed src="/static/about.mp3">
<audio autoplay="autoplay" loop="loop">
<source src="about.mp3" type="audio/mpeg">
<embed src="about.mp3">
</audio>
</body>
</html>

BIN
contrib/static/i2p.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -47,6 +47,23 @@ function get_board_target() {
return e.value;
}
function get_key_target() {
var e = document.getElementById("nntpchan_key_target");
return e.value;
}
function nntpchan_key_del() {
nntpchan_admin("pubkey.del", {
pubkey: get_key_target()
});
}
function nntpchan_key_add() {
nntpchan_admin("pubkey.add", {
pubkey: get_key_target()
});
}
function nntpchan_admin_board(method) {
nntpchan_admin(method, {
newsgroup: get_board_target()

View File

@@ -0,0 +1,10 @@
function createBoard() {
var form = document.getElementById("postform");
var e = document.getElementById("boardname");
var board = e.value;
if ( ! board.startsWith("overchan.") ) {
board = "overchan." + board;
}
form.action = form.action + board;
form.submit();
}

View File

@@ -108,13 +108,21 @@ th {
padding-right: 15px;
}
#captcha_img {
background: #d3d3d3;
}
input, textarea {
color: whitesmoke;
background: #2d2d2d;
border-color: #4D28CA;
border-radius: 3px;
}
html {
color: #ededed;
background: #262230;
height: 100%;
background-attachment: fixed;
background-position: 100% 0%;
background-repeat: no-repeat;
font-family: arial,helvetica,sans-serif;
font-size: 10pt;
margin: 0 4px;

BIN
contrib/static/tor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -19,7 +19,8 @@
<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 <a href="https://i2p.rocks/irc/?channels=overchan&nick=nameless">IRC</a></h3>
<h3>Join the <a href="https://qchat.rizon.net/?channels=#nntpchan">IRC</a></h3>
<h3>Create a <a href="{{prefix}}new/">new board</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>

View File

@@ -26,6 +26,18 @@
</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>

View File

@@ -0,0 +1,55 @@
<html>
<head>
<title>create new board</title>
<link rel="stylesheet" href="{{prefix}}static/site.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

@@ -1,9 +1,20 @@
<div class="{{{CSSClass}}}" id="{{PostHash}}">
<div class="{{CSSClass}}" id="{{PostHash}}">
<p class="intro">
<label for="delete_{{PostHash}}">
<span class="frontend">
[[ {{Frontend}} ]]
</span>
<span class="origin">
{{#IsI2P}}
<img src="{{Prefix}}static/i2p.png" alt="post from i2p" />
{{/IsI2P}}
{{#IsTor}}
<img src="{{Prefix}}static/tor.png" alt="post from tor" />
{{/IsTor}}
{{#IsClearnet}}
<img src="{{Prefix}}static/clearnet.png" alt="post from clearnet" />
{{/IsClearnet}}
</span>
<span class="subject">
{{Subject}}
</span>

View File

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

View File

@@ -5,6 +5,8 @@
- 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>
<meta http-equiv="refresh" content="2; {{redirect_url}}" />
<body>
<pre>posted as {{message_id}}</pre>