75 Commits
0.2 ... 0.2.3

Author SHA1 Message Date
jeff
3b1d09072c change id so that backlinks work 2015-09-30 17:39:56 -04:00
jeff
7f56d35762 remove memes 2015-09-23 20:08:42 -04:00
jeff
3360eaf924 add css rule 2015-09-23 18:54:26 -04:00
jeff
51041e2dc9 case matters for real 2015-09-23 09:07:53 -04:00
jeff
6e20cb270e case matters 2015-09-23 09:07:25 -04:00
jeff
6019d70382 ammend mod panel js more 2015-09-23 09:06:44 -04:00
jeff
cec6f7cef5 ammend mod panel js 2015-09-23 09:04:37 -04:00
jeff
40b7e0a88b fix js 2015-09-23 08:59:56 -04:00
jeff
b595024585 ammend mod panel 2015-09-23 08:59:02 -04:00
jeff
00fbc305be add more actions to mod panel 2015-09-23 08:54:49 -04:00
jeff
5e3f2eea03 try using 1 thread for regenerating thumbnails 2015-09-22 12:41:10 -04:00
jeff
7f721eefea fix mod panel a bit 2015-09-22 10:34:38 -04:00
jeff
866196e810 add more info in mod panel, add admin action to rethumb 2015-09-22 10:33:01 -04:00
jeff
8c18b4405d make captcha image background not dark 2015-09-22 07:28:26 -04:00
jeff
578d9f44b3 add regen all threads button 2015-09-20 19:33:31 -04:00
Jeff
ab38445555 Merge pull request #4 from 4cdn/master
user interface changes
2015-09-19 19:39:09 -04:00
4cdn
98cf765690 Update README.md 2015-09-19 19:32:15 -04:00
4cdn
d742af18b5 removing reliance on external file hosting 2015-09-19 19:31:03 -04:00
4cdn
74a1c044f0 removing reliance on external file hosting 2015-09-19 19:30:05 -04:00
4cdn
adb3e54212 new file: contrib/static/fieri.png 2015-09-19 23:28:02 +00:00
4cdn
1cc4d4e858 new file: contrib/static/about.mp3 2015-09-19 23:21:45 +00:00
4cdn
ec8db8121f Update README.md 2015-09-19 16:24:09 -04:00
4cdn
9cb8998302 faq page more entertaining
encourages users to read completely
2015-09-19 16:22:37 -04:00
4cdn
2f8fd2f2b5 improved visual aesthetics 2015-09-19 16:21:22 -04:00
jeff
569727cc96 css tweak 2015-09-19 13:41:00 -04:00
jeff
f7fc61d493 css tweak 2015-09-19 13:39:41 -04:00
jeff
8cbf1f217d css tweak 2015-09-19 13:37:57 -04:00
jeff
458232d402 css tweak 2015-09-19 13:36:33 -04:00
jeff
fcfd010e5c css tweak 2015-09-19 13:34:46 -04:00
jeff
dca5ee7561 css tweak 2015-09-19 13:33:26 -04:00
jeff
108f05da32 css tweak 2015-09-19 13:33:00 -04:00
jeff
a515ba9d1f css tweak 2015-09-19 13:29:25 -04:00
jeff
8611e2e768 css tweak 2015-09-19 13:28:48 -04:00
jeff
20dd0c215e css tweaks 2015-09-19 13:28:20 -04:00
jeff
c91c8c08b1 change bg.jpg 2015-09-19 13:27:44 -04:00
jeff
9321a65f1c css tweak 2015-09-19 13:25:32 -04:00
jeff
b2a71e1877 change background 2015-09-19 13:22:10 -04:00
jeff
045e3140ad css tweak 2015-09-19 13:18:34 -04:00
jeff
d6f073943e css tweaks 2015-09-19 13:17:30 -04:00
jeff
47f884ce98 css tweaks 2015-09-19 13:16:51 -04:00
jeff
9d815479b2 add background image 2015-09-19 13:15:54 -04:00
jeff
2aa2405ba7 css tweaks 2015-09-19 13:03:41 -04:00
jeff
40d6cf77ad use correct parameter in admin command 2015-09-19 09:02:08 -04:00
jeff
e70c4ed84e syntax error 2015-09-19 08:58:33 -04:00
jeff
1c61de8880 add admin stuff to mod panel 2015-09-19 08:54:54 -04:00
jeff
8d146ed6cd change background gradient 2015-09-19 07:39:36 -04:00
jeff
9a807bbebf do not use red 2015-09-17 16:52:28 -04:00
jeff
61fc6d076f make dark 2015-09-17 16:50:32 -04:00
jeff
5a2500dffc make dark 2015-09-17 16:46:21 -04:00
jeff
021721d21e ammend build docs 2015-09-08 22:32:28 -04:00
jeff
2304d3d8fa css tweaks 2015-09-08 22:30:41 -04:00
jeff
c340d215e0 css tweaks 2015-09-08 22:29:26 -04:00
jeff
9e0029772c css tweaks 2015-09-08 22:27:29 -04:00
jeff
1663abcbec css tweaks 2015-09-08 22:26:07 -04:00
jeff
b58e582f0a css tweaks 2015-09-08 22:20:20 -04:00
jeff
1cfa104e4c ammend css 2015-09-08 22:04:39 -04:00
jeff
dc06baba37 fix templates 2015-09-05 15:36:36 -04:00
jeff
838bbc20cd add reply link to posts 2015-09-05 15:29:14 -04:00
jeff
487e392d76 fix thumbnailer 2015-09-05 11:05:32 -04:00
jeff
90276293e1 change thumbs.sh tool to use new thumbnailing 2015-09-05 11:03:04 -04:00
jeff
8411568530 make it so that we don't error when we have no postform, i.e. ukko 2015-09-04 17:20:02 -04:00
jeff
de51b912ff have ukko load nntpchan.js 2015-09-04 17:18:36 -04:00
jeff
8b206740f8 forgot a brace 2015-09-04 17:16:43 -04:00
jeff
be7e510519 try fixing backlinks 2015-09-04 17:14:05 -04:00
jeff
abefe50eb6 make post numbers insert backlink on click 2015-09-04 17:09:43 -04:00
jeff
fb06097557 resolve conflict 2015-09-04 16:51:19 -04:00
jeff
7ba0e728af truncate posts and threads 2015-09-04 16:47:52 -04:00
jeff
f9ea948071 psy tag 2015-08-31 16:58:30 -04:00
jeff
a2fd94a83e add spoiler css 2015-08-31 16:41:25 -04:00
jeff
fd1193f73a add redtext css rules 2015-08-31 16:14:32 -04:00
Jeff
64cd178b2a Merge pull request #1 from Erkan-Yilmaz/patch-1
change 1 word
2015-08-31 15:46:31 -04:00
jeff
fffd5beea5 update readme 2015-08-31 13:33:08 -04:00
Erkan Yilmaz
4b56272fdd change 1 word
to: cryptographically
2015-08-31 18:25:45 +02:00
jeff
1f346b9da7 ammend readme to have users check out stable tags 2015-08-31 11:09:26 -04:00
jeff
cb5f7f2453 add thumb.sh tool 2015-08-31 10:58:28 -04:00
16 changed files with 212 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
# NNTPChan #
NNTPChan (previously known as overchan) is a decentralized imageboard that uses nntp to synchronize content between many different servers. It utilizes cryptograpghicly signed posts to perform optional/opt-in decentralized moderation.
NNTPChan (previously known as overchan) is a decentralized imageboard that uses nntp to synchronize content between many different servers. It utilizes cryptographically signed posts to perform optional/opt-in decentralized moderation.
This repository contains resources used by the core daemon which is located [here](https://github.com/majestrate/srndv2) along with general documentation, [here](doc/)
@@ -10,7 +10,9 @@ After you [built and installed the daemon](doc/build.md) and [set up your databa
# clone it
git clone https://github.com/majestrate/nntpchan ~/nntpchan
cd ~/nntpchan
# get the latest stable release
cd ~/nntpchan/
git checkout tags/0.2.1
# set up the workspace
srndv2 setup

BIN
contrib/static/about.mp3 Normal file

Binary file not shown.

BIN
contrib/static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

View File

@@ -43,5 +43,9 @@
</p>
<hr />
</div>
<audio autoplay="" loop="">
<source src="/static/about.mp3" type="audio/mpeg">
<embed src="/static/about.mp3">
</audio>
</body>
</html>

BIN
contrib/static/fieri.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 KiB

View File

@@ -42,6 +42,36 @@ function nntpchan_unban() {
})
}
function get_board_target() {
var e = document.getElementById("nntpchan_board_target");
return e.value;
}
function nntpchan_admin_board(method) {
nntpchan_admin(method, {
newsgroup: get_board_target()
})
}
function nntpchan_admin(method, param) {
nntpchan_mod({
name:"admin",
parser: function(target) {
return method;
},
handle: function(j) {
if (j.result) {
return document.createTextNode(j.result);
} else {
return "nothing happened?";
}
},
method: ( param && "POST" ) || "GET",
data: param
})
}
// handle delete command
function nntpchan_delete() {
nntpchan_mod({
@@ -127,8 +157,14 @@ function nntpchan_mod(mod_action) {
}
if (mod_action.name) {
var url = mod_action.name + "/" + target;
ajax.open("GET", url);
ajax.send();
ajax.open(mod_action.method || "GET", url);
var data = mod_action.data;
if (data) {
ajax.setRequestHeader("Content-type","text/json");
ajax.send(JSON.stringify(data));
} else {
ajax.send();
}
} else {
alert("mod action has no name");
}

View File

@@ -0,0 +1,14 @@
//
// nntpchan.js -- frontend ui niceness
//
// insert a backlink for a post given its short hash
function nntpchan_backlink(shorthash)
{
var elem = document.getElementById("postform_message");
if ( elem )
{
elem.value += ">>" + shorthash + "\n";
}
}

View File

@@ -1,5 +1,4 @@
.thread {
margin-right: 20px;
margin-bottom: 1em;
display: inline-block;
word-wrap: break-word;
@@ -7,7 +6,7 @@
}
.frontend , .subject {
color: #0f0d2d;
color: #928BFF;
}
.name {
@@ -44,8 +43,16 @@ textarea {
padding: 10px 10px;
}
pre > p {
display: block-inline;
}
.reply, th, .ukko_thread_header {
background: #d6daf0;
background: #202331;
}
tr {
background: #202123;
}
hr {
@@ -61,11 +68,11 @@ a:hover , a:visited:hover {
}
a {
color: blue;
color: #4A4AFF;
}
a:visited {
color: #414383;
color: #5E00A0;
}
.navbar {
@@ -76,7 +83,7 @@ a:visited {
margin-top: 0px;
z-index: 20;
box-shadow: 0px 1px 20px rgba(0, 0, 0, 0.15);
background: #CFD8EF;
background: #202331;
color: #616383;
}
@@ -101,8 +108,13 @@ th {
padding-right: 15px;
}
body {
background: linear-gradient(to top, #eef2ff, #eaf1ff) repeat scroll;
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;
@@ -118,7 +130,6 @@ body {
.frontend {
margin-top: 0px;
background: #e0f0f0;
display: inline-block;
}
@@ -127,23 +138,61 @@ body {
margin-bottom: 10px;
}
.post, .post_body {
.post {
display: inline;
margin-bottom: 5px;
}
.post_body > p {
margin: 2px;
}
.tripcode {
color: #de04ef;
}
@keyframes psych
{
0% {background-color: red; color: blue; }
10% {background-color: yellow; color: red; }
20% {background-color: blue; color: green; }
30% {background-color: green; color: yellow; }
40% {background-color: red; color: blue; }
50% {background-color: yellow; color: green; }
60% {background-color: blue; color: yellow; }
70% {background-color: green; color: blue; }
80% {background-color: red; color: green; }
90% {background-color: yellow; color: red; }
95% {background-color: blue; color: yellow; }
100% {background-color: green; color: white; }
}
.psy > p {
animation: psych 2s linear infinite;
display: inline-block;
}
.memearrows {
color: green;
}
.redtext {
color: #d50505;
font-weight: bold;
}
.spoiler {
display: inline-block;
}
.spoiler > p {
background: black;
color: black;
}
.spoiler:hover > p {
background: black;
color: white;
}
.intro {
margin-bottom: 0.75em;
}
@@ -160,11 +209,7 @@ body {
max-height: 200px;
}
pre > p {
margin: 0px 0px;
}
.reply , .post_body > pre , .ukko_thread_header {
.reply, .ukko_thread_header , pre {
padding: 7px 7px;
border-radius: 5px;
box-shadow: 1px 1px 3px black;
@@ -175,8 +220,26 @@ pre > p {
color: #d17600;
}
.post_body > p {
margin: 0px 0px;
}
.post_body {
display: inline;
width: inherit;
}
.post {
display: inline-block;
width: 80%;
}
#faq > div {
margin-left: 20%;
width: 50%;
padding: 10px;
}
#captcha_img {
background: grey;
}

View File

@@ -15,6 +15,7 @@
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{board.Prefix}}static/site.css"></link>
<script type="text/javascript" src="{{board.Prefix}}static/nntpchan.js"></script>
<title>{{board.Board}}</title>
</head>
<body>

View File

@@ -25,6 +25,41 @@
<button onclick="nntpchan_unban()">unban (ip)</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.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', {threads:1})">regenerate all thumbnails</button>
</div>
</div>
<div id="nntpchan_mod_result"></div>
<noscript>
<b>enable js to use the mod panel kthx</b>

View File

@@ -1,4 +1,4 @@
<div class="{{{CSSClass}}}" id="post_{{PostHash}}">
<div class="{{{CSSClass}}}" id="{{PostHash}}">
<p class="intro">
<label for="delete_{{PostHash}}">
<span class="frontend">
@@ -21,10 +21,8 @@
{{Date}}
</span>
</label>
<a href="{{PostURL}}" onclick="">No. {{ShortHash}}</a>
{{#OP}}
<a href="{{PostURL}}">[reply]</a>
{{/OP}}
<a onclick="nntpchan_backlink('{{ShortHash}}');">No. {{ShortHash}}</a>
<a href="{{PostURL}}">[reply]</a>
<span class="tripcode">{{{Pubkey}}}</span>
</p>
<div class="files">

View File

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

View File

@@ -15,6 +15,7 @@
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{thread.Prefix}}static/site.css"></link>
<script type="text/javascript" src="{{thread.Prefix}}static/nntpchan.js"></script>
<title> {{thread.OP.Subject}} </title>
</head>
<body>

View File

@@ -9,11 +9,9 @@
<title> ukko / overboard </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
</head>
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>
<div id="ukko-topbar">
<a href="{{prefix}}">Front Page</a>
</div>
<div id="ukko_threads" class="threads_container">
{{#threads}}
<div class="ukko_thread_header">
@@ -22,7 +20,7 @@
<div class="thread" id="thread_{{OP.PostHash}}">
<div clsss="thread_header">
</div>
{{{OP.RenderPost}}}
{{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}}
{{{Truncate.RenderPost}}}
<br />

23
contrib/tools/thumbs.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# shell script for regenerating thumbnails
#
if [ "$1" == "" ] ; then
echo "usage: $0 webroot_dir"
else
cd $1/img
echo "regenerate missing thumbs in $(pwd)"
find . \
-type f \
-regextype posix-extended \
-iregex '.*\.(png|jpg|gif)$' \
-not -execdir test -f '../thm/{}' \; \
-exec echo 'generating missing thumb for {}' \; \
-exec mogrify \
-define jpeg:size=500x500 \
-thumbnail '250>x250>' \
-path '../thm/{}.jpg' \
-strip \
'{}' \;
fi

View File

@@ -7,7 +7,8 @@
* go 1.4 or higher
* libsodium 1.0 or higher
* imagemagick
* RabbitMQ
* ffmpegthumbnailer
* sox
## debian ##
@@ -45,7 +46,7 @@ We'll also need to install some dependancies that come with debian:
# as root
apt update
apt install imagemagick libsodium-dev
apt install imagemagick libsodium-dev ffmpegthumbnailer sox
Now build the daemon: