163 Commits

Author SHA1 Message Date
Jeff Becker
7b8d33826b initial neochan commit 2016-10-15 09:05:38 -04:00
Jan Verbeek
9e9a1efe06 Merge https://gitgud.io/uguu/nntpchan
Conflicts:
	build-js.sh
	build.sh
2016-10-08 14:29:46 +02:00
Jeff Becker
a5d7cb9074 Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-10-08 08:12:37 -04:00
Jeff
053b5870cf Merge pull request #138 from wzeth/patch-15
Explicit notice of redis cache deprecation
2016-10-08 08:09:59 -04:00
wzeth
4ab90f3152 Explicit notice of redis cache deprecation
Users should know that redis cache is no longer valid as of SRNDv2 commit 96de42
2016-10-08 05:08:46 -04:00
Jeff Becker
dc75a3513e add js branding 2016-10-07 10:17:29 -04:00
Jeff Becker
40ceb747ae refactor structure 2016-10-07 10:06:25 -04:00
Jeff Becker
6996e3abc4 remove cuckhold pow in postform 2016-10-07 08:26:50 -04:00
Jeff Becker
5118ffb3f8 fix tomorrow.css 2016-10-07 07:36:33 -04:00
Jeff Becker
287a49f196 fix tomorrow.css 2016-10-07 07:35:06 -04:00
Jeff Becker
698ed1d42e previous commit 2016-10-07 07:34:08 -04:00
Jeff Becker
a0deb532e3 fix bloodgod.css moar 2016-10-07 07:33:03 -04:00
Jeff Becker
0e1e6201ca fix bloodgod.css 2016-10-07 07:30:29 -04:00
Jeff Becker
6ea75236fa fix post.mustache 2016-10-07 07:25:30 -04:00
Jeff Becker
61281190bb disable feature 2016-10-07 07:24:00 -04:00
Jeff Becker
2355528b46 fug 2016-10-02 20:42:45 -04:00
Jeff Becker
db5b8ec309 try fixing liveui for chrome 2016-10-02 20:36:59 -04:00
Jeff Becker
a0a0a6feca update readme 2016-10-02 09:01:58 -04:00
Jeff
787bef7625 Merge pull request #134 from wzeth/patch-13
Use more succinct postgres role creation command
2016-09-10 10:21:08 -04:00
wzeth
e57d4ea921 Use more succinct postgres role creation command
It is far less error prone to use the tools that Postgres provides to create the role and the database. This amendment also ensures the created role password is encrypted.
2016-09-10 09:34:00 -04:00
Jeff
c6c9c3f53b apply mona's css patch 2016-09-06 19:05:52 -04:00
Jeff Becker
f7eb634aa1 fix :p 2016-08-14 11:27:46 -04:00
Jeff Becker
74f07c3a6c add test file 2016-08-14 11:26:07 -04:00
Jeff Becker
95864559fb wrap post in pre tag 2016-08-02 20:03:45 -04:00
Jeff Becker
5155205e8c indent 2016-08-01 07:34:35 -04:00
Jeff Becker
d91b0d3e99 Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-08-01 07:24:43 -04:00
Jeff Becker
3df355abdb update banners 2016-08-01 07:24:25 -04:00
Jeff Becker
850e5bccae fix css 2016-07-30 08:03:32 -04:00
Jeff Becker
713fe21190 comiit changes 2016-07-30 08:02:05 -04:00
Jeff
3d683ab87e Merge pull request #131 from deavmi/patch-1
Update building.md
2016-07-22 06:24:50 -04:00
Tristan B. Kildaire
a4053f0f1a Update building.md 2016-07-21 20:57:04 +02:00
Jeff
87e29cc117 Merge pull request #129 from deavmi/patch-1
Various fixes
2016-07-19 19:16:11 -04:00
Tristan B. Kildaire
c17d0fb0bb Various fixes
* Added missing period.
* Fixed typo.
2016-07-19 22:46:22 +02:00
Jeff Becker
985863deb2 add fade to post hide/unhide 2016-07-18 11:12:47 -04:00
Jeff Becker
a9d2c0425d have post hiding persist in localstorage 2016-07-18 10:44:18 -04:00
Jeff Becker
76cb2341ce add hr to post for reply hider 2016-07-18 09:59:53 -04:00
Jeff Becker
ceb6f09a3f update 2016-07-18 09:50:40 -04:00
Jeff Becker
adf3540556 * add hide-post.js
* disable cuckoo_miner.js
2016-07-18 09:49:44 -04:00
Jeff Becker
2ce8a38b0b update css 2016-07-18 08:26:41 -04:00
Jeff Becker
e62d959b0b remove title from post no 2016-07-18 08:17:48 -04:00
Jeff Becker
4216a777a3 fix name field in post.mustache 2016-07-18 08:13:27 -04:00
Jeff Becker
5873b41e00 add hr to separate post header from post body 2016-07-18 08:11:10 -04:00
Jeff Becker
14635e9472 have postreply class float right 2016-07-18 08:08:03 -04:00
Jeff Becker
422f3de11d add postreply class to div for future css 2016-07-18 08:04:58 -04:00
Jeff Becker
64b5531fed change post.mustache format to be "better" 2016-07-18 08:02:42 -04:00
Jeff Becker
17f3b25e51 fixes 2016-07-18 07:57:25 -04:00
Jeff Becker
60f0c19a9f update all 2016-07-18 07:51:15 -04:00
Jeff Becker
f4f2479b8a fix 2016-07-17 11:34:39 -04:00
Jeff Becker
3506d7f975 try fixing liveui 2016-07-17 11:28:49 -04:00
Jeff Becker
9acca366d0 livechan post via ajax not websocket 2016-07-17 11:23:15 -04:00
Jeff Becker
70fd791545 fix 2016-07-13 09:17:20 -04:00
Jeff Becker
9f3c41fb0b more theme tweaks 2016-07-13 09:16:34 -04:00
Jeff Becker
2ff6088605 fix typo 2016-07-13 09:15:39 -04:00
Jeff Becker
54644e0da2 more theme updates / unborking 2016-07-13 09:14:39 -04:00
Jeff Becker
dbd05c30c3 update dayman theme 2016-07-13 09:02:26 -04:00
Jeff Becker
587cdf4e75 fix tomorrow theme 2016-07-13 09:00:24 -04:00
Jeff Becker
76d75b260f update css for livechan 2016-07-11 14:48:33 -04:00
Jeff Becker
35ff3759f4 revert 2016-07-10 07:07:36 -04:00
Jeff Becker
671db6e483 update livechan.js 2016-07-10 07:05:19 -04:00
Jeff Becker
32566bfd84 fixes for liveui 2016-07-09 15:39:35 -04:00
Jeff Becker
4b02ad6d89 don't default to random, default to ukko 2016-07-09 14:51:31 -04:00
Jeff Becker
a5c2f8d86f update livechan for ukko view 2016-07-09 14:48:06 -04:00
Jeff Becker
6e1e7440dc update livechan css 2016-07-08 08:55:09 -04:00
Jeff Becker
0b460eeb5d fix css 2016-07-08 08:52:10 -04:00
Jeff Becker
2a32bb75d5 fix captcha css 2016-07-08 08:50:31 -04:00
Jeff Becker
cf91d8ffa5 Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-07-08 08:48:10 -04:00
Jeff Becker
375713390e switch livechan.css to use dark theme 2016-07-08 08:47:46 -04:00
Jeff
f823b0e612 Merge pull request #127 from deavmi/patch-1
Update srnd.md
2016-07-07 19:29:25 -04:00
Tristan B. Kildaire
cb1821189a Update srnd.md 2016-07-07 19:04:19 +02:00
Jeff Becker
1a5862213c Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-07-06 13:37:13 -04:00
Jeff Becker
96c019324d update ukko template to point livechan link to livechan 2016-07-06 13:36:50 -04:00
Jeff
1e905b6bbf Merge pull request #126 from wzeth/patch-12
update definitions for allow_anon*
2016-07-06 12:40:45 -04:00
wzeth
7c6726b5fc update definitions for allow_anon*
I have 40% confidence this is correct :v)
2016-07-06 12:35:34 -04:00
Jeff Becker
24d18ff599 hide captcha by default 2016-07-06 08:12:56 -04:00
Jeff Becker
16d0489cd7 don't show captcha on first start 2016-07-06 08:05:31 -04:00
Jeff Becker
5875347966 focus on new threads in liveui 2016-07-06 07:59:13 -04:00
Jeff Becker
b2c1d9eb26 unscrewup reconnect 2016-07-05 20:43:36 -04:00
Jeff Becker
a0bc39aaa5 expire old convos 2016-07-05 19:22:08 -04:00
Jeff Becker
b887d07172 default to overchan.random for livechan 2016-07-05 17:46:34 -04:00
Jeff Becker
1f48c58f6b fix css for livechan file input 2016-07-05 17:39:40 -04:00
Jeff Becker
e8eec5862f lower padding for chat input widget 2016-07-05 13:09:56 -04:00
Jeff Becker
bf7213bf09 position fixed 2016-07-05 12:59:36 -04:00
Jeff Becker
b2201c4ef7 add subjects 2016-07-05 12:58:13 -04:00
Jeff Becker
a4747b9965 various fixes 2016-07-05 12:45:28 -04:00
Jeff Becker
5ec4c823fe fix css for firefox 2016-07-05 12:28:37 -04:00
Jeff Becker
00d0be952f position fixed 2016-07-05 12:19:40 -04:00
Jeff Becker
c448777fe9 update livechan template 2016-07-05 12:16:32 -04:00
Jeff Becker
30b54c17fa document -> document.body 2016-07-05 12:14:52 -04:00
Jeff Becker
e954c57da6 fix up livechan template 2016-07-05 12:13:48 -04:00
Jeff Becker
d5d30893e5 livechan fixes 2016-07-05 10:11:58 -04:00
Jeff Becker
72947dbbcc update livechan to be aware of convos 2016-07-05 09:53:23 -04:00
Jeff Becker
1c632666ab update livechan 2016-07-05 08:17:19 -04:00
Jeff Becker
5cf12f37a5 meh this should work for livechan ui 2016-07-04 15:48:40 -04:00
Jeff Becker
9c038021b5 update rollover in livechan 2016-07-04 12:50:00 -04:00
Jeff Becker
4a8861761d update livechan to allow attachments 2016-07-04 11:52:43 -04:00
Jeff Becker
13e0010419 update rollover in livechan ui 2016-07-04 11:28:10 -04:00
Jeff Becker
e461462bd6 actually fix thumbnails 2016-07-04 10:43:08 -04:00
Jeff Becker
8101e67b10 fix thumbnailing 2016-07-04 10:40:09 -04:00
Jeff Becker
63edd14243 fix date error 2016-07-04 10:36:10 -04:00
Jeff Becker
d2142f7c83 Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-07-04 10:13:52 -04:00
Jeff Becker
28b1864841 add new livechan ui 2016-07-04 10:12:03 -04:00
Jeff
5fa1e76971 Merge pull request #125 from wzeth/patch-11
document archive in [nntp]
2016-07-04 07:16:14 -04:00
wzeth
40eeb116de document archive in [nntp] 2016-07-04 02:27:56 -04:00
ring
a502259ba9 Quote variables, remove trailing whitespace
If you don't quote your variables the scripts get very buggy if you run
them with arguments with spaces in them, or even run them from a
directory with spaces in its path.
2016-07-02 23:30:03 +02:00
Jeff
cac18a5e44 Merge pull request #124 from deavmi/master
Update README.md
2016-07-02 08:32:25 -04:00
Tristan B. Kildaire
c86f573440 Update README.md 2016-07-02 14:15:59 +02:00
Jeff Becker
6f5130d8fd Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-06-30 09:01:31 -04:00
Jeff Becker
17b8101349 update livechan.js and stylesheets 2016-06-30 09:01:11 -04:00
Jeff
5e53ae6f04 Merge pull request #122 from deavmi/patch-1
Can I put this here?
2016-06-30 06:50:12 -04:00
Tristan B. Kildaire
50c395aad4 Update TODO.md 2016-06-30 12:48:05 +02:00
Jeff
18bf12e556 Merge pull request #118 from deavmi/patch-2
Create thunderbird-newsreader-configuration.md
2016-06-30 06:46:19 -04:00
Jeff
bc1c038468 Merge pull request #117 from deavmi/patch-1
Create pan-newsreader-configuration.md
2016-06-30 06:46:08 -04:00
Jeff
7117a25f9a Merge pull request #116 from deavmi/patch-3
Update configure-newsreader.md
2016-06-30 06:45:50 -04:00
Jeff
ef69bda0d7 Merge pull request #120 from deavmi/patch-5
Update README.md
2016-06-30 06:45:36 -04:00
Jeff
ab6ac43851 Merge pull request #121 from deavmi/patch-6
Update README.md
2016-06-30 06:45:28 -04:00
Jeff
28feb5a84e Merge pull request #119 from deavmi/patch-4
Update fr-FR.ini
2016-06-30 06:44:26 -04:00
Tristan B. Kildaire
9e3e0cc443 Update README.md 2016-06-30 11:40:19 +02:00
Tristan B. Kildaire
c573fb646b Update README.md 2016-06-30 11:37:47 +02:00
Tristan B. Kildaire
93b3e0f83f Update fr-FR.ini 2016-06-30 11:35:23 +02:00
Tristan B. Kildaire
7dda235ab1 Update configure-newsreader.md 2016-06-30 11:32:39 +02:00
Tristan B. Kildaire
09e7969479 Create thunderbird-newsreader-configuration.md 2016-06-30 11:32:37 +02:00
Tristan B. Kildaire
cb37a45b67 Create pan-newsreader-configuration.md 2016-06-30 11:32:36 +02:00
Jeff Becker
e25d6ab370 remove unneeded css rule 2016-06-20 15:11:05 -04:00
Jeff Becker
e2194d3fbd fix css so that inline expand of images works 2016-06-20 13:05:36 -04:00
Jeff
fdc4234d08 Merge pull request #113 from wzeth/patch-9
document feeds.d
2016-06-20 12:58:06 -04:00
wzeth
0c0160da6d Update srnd.md 2016-06-20 11:21:46 -04:00
wzeth
fd82218e5f doucment feeds.d 2016-06-20 11:18:19 -04:00
Jeff Becker
091d74af52 Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2016-06-20 09:38:10 -04:00
Jeff Becker
e690b7dd9c add feeds.d directory 2016-06-20 09:37:57 -04:00
Jeff
a856af693f Merge pull request #112 from wzeth/patch-8
document SRND_FEEDS_INI_PATH environment variable
2016-06-20 07:47:24 -04:00
Jeff
3668eb7822 Merge pull request #111 from wzeth/patch-7
document SRND_INI_PATH environment variable
2016-06-20 07:47:09 -04:00
wzeth
3cc04a6cad document SRND_FEEDS_INI_PATH environment variable 2016-06-20 10:09:24 +00:00
wzeth
e6967a75e7 document custom config locations 2016-06-20 09:59:03 +00:00
Jeff
679ee50342 Merge pull request #109 from wzeth/patch-6
clarified anon_nntp and pprof
2016-06-19 07:00:18 -04:00
wzeth
b73c219e6b clarified anon_nntp and pprof 2016-06-19 01:12:33 -04:00
Jeff
1b474af875 Merge pull request #108 from wzeth/patch-5
document frontend minimize_html feature
2016-06-17 11:09:28 -04:00
wzeth
77a72c5770 document frontend minimize_html feature 2016-06-17 12:51:00 +00:00
Jeff Becker
a52fe21743 add id='current_theme' to fix board list css themes not applying 2016-06-16 16:18:59 -04:00
Jeff Becker
42c70990a0 update bloodgod.css, thanks ano^ 2016-06-16 16:12:54 -04:00
Jeff
0980903b6e Merge pull request #106 from wzeth/patch-4
Debian 8.5 install guide
2016-06-15 08:44:17 -04:00
wzeth
47737dd205 Update building-debian8.5.md
set a title and backtick some directories and commands
2016-06-15 10:33:10 +00:00
wzeth
a22330f920 added links to the setup guide 2016-06-15 10:30:51 +00:00
wzeth
05b4695398 Update and rename debian8.5-step-by-step.md to building-debian8.5.md
Made things a little more concise. I removed ffmpeg in favor of libav-tools because it is available in the default repositories.
2016-06-15 10:19:43 +00:00
Jeff Becker
415fb3c4a8 merge 2016-06-14 22:37:41 -04:00
Jeff Becker
5138c31e58 update node list 2016-06-14 22:37:22 -04:00
Jeff
052259c9d1 Merge pull request #105 from wzeth/patch-3
add missing command
2016-06-13 11:47:11 -04:00
wzeth
7276e28bb7 add missing command 2016-06-13 02:21:57 -04:00
Jeff Becker
2adf2d5127 update 2016-06-12 14:19:07 -04:00
Jeff Becker
242094193f fix typo 2016-06-12 13:55:07 -04:00
Jeff Becker
2ffc7a80e6 update css 2016-06-12 13:54:31 -04:00
Jeff Becker
3da1ab157d update css 2016-06-12 13:52:24 -04:00
Jeff Becker
17d2654f26 update css 2016-06-12 13:50:38 -04:00
Jeff Becker
f155b0e9a1 update style 2016-06-12 13:46:28 -04:00
Jeff Becker
c97296700f include gchan.xyz in node list 2016-06-12 12:38:08 -04:00
Jeff
3951432bad Merge pull request #104 from wzeth/patch-2
Step-by-step for Debian 8.5
2016-06-12 08:25:08 -04:00
Jeff
da5c44d4fd Merge pull request #103 from wzeth/patch-1
SystemD Service
2016-06-12 08:24:59 -04:00
wzeth
a35889ca18 Step-by-step for Debian 8.5
This will help users with a step-by-step guide to installing. I will try to make this into a script or something one day.
2016-06-12 06:27:53 -04:00
wzeth
c171e62d52 oops made a typo 2016-06-12 05:37:19 -04:00
wzeth
75a3cf5ede systemd service file for nntpchan
Assumptions made:
1. The user has a redis_6379.service
2. The user is using /opt/nntpchan as the working directory for the srndv2
2016-06-12 05:36:05 -04:00
wzeth
2d25b349f7 Oops wrong dir 2016-06-12 05:34:59 -04:00
wzeth
29149eb452 Systemd service file
Here is an example systemd config.

It makes some assumptions:
1. The user has a systemd service called redis_6379.service (the redis install utils have this as default).
2. srndv2 is contained in /opt/nntpchan
2016-06-12 05:29:43 -04:00
Jeff
57232aeaf0 Merge pull request #102 from deavmi/patch-1
Previous link was broken but I have a new link.
2016-06-10 17:53:05 -04:00
Tristan B. Kildaire
2ced2b73c7 Previous link was broken but I have a new link. 2016-06-10 20:45:36 +02:00
93 changed files with 4380 additions and 255 deletions

1
.gitignore vendored
View File

@@ -35,6 +35,7 @@ vendor
# generated js
contrib/static/nntpchan.js
contrib/static/js/nntpchan.js
contrib/static/miner-js.js
#docs trash

View File

@@ -1,13 +1,13 @@
NNTPChan
========
**NNTPChan** (previously known as overchan) is a decentralized imageboard that uses the [NNTP protocol](https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol) (network-news protocol) to synchronize content between many different servers. It utilizes cryptographically signed posts to perform optional/opt-in decentralized moderation.
**NNTPChan** (previously known as overchan) is a decentralized imageboard that uses the [NNTP protocol](https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol) (network-news transfer protocol) 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 on [GitHub](https://github.com/majestrate/srndv2) (for now) along with general documentation, [here](doc/)
This repository contains resources used by the core daemon which is located on [GitHub](https://github.com/majestrate/srndv2) (for now) along with general documentation, [here](doc/).
##Getting started
[This](doc) is a step-by-step guide for getting up-and-running with NNTPChan as well as documentation for developers wwho want to either work on NNTPChan directly or use NNTPChan in their aplications with the API.
[This](doc) is a step-by-step guide for getting up-and-running with NNTPChan as well as documentation for developers who want to either work on NNTPChan directly or use NNTPChan in their aplications with the API.
##Bugs and issues
@@ -19,7 +19,24 @@ Below is a list of known NNTPChan nodes:
1. [2hu-ch.org](https://2hu-ch.org)
2. [nsfl.tk](https://nsfl.tk)
3. [i2p.rocks](https://i2p.rocks/ib/)
3. [gchan](https://gchan.xyz/)
Tor node list:
1. [textpunk](http://ucavviu7wl6azuw7.onion/)
2. [chan](http://ev7fnjzjdbtu3miq.onion/)
3. [oniichan](http://sfw.oniichanylo2tsi4.onion/)
##Clients
NNTP (confirmed working):
* Thunderbird
Web:
* [Yukko](https://github.com/faissaloo/Yukko): ncurses based nntpchan web ui reader
##Support
@@ -36,4 +53,4 @@ Bitcoin: [15yuMzuueV8y5vPQQ39ZqQVz5Ey98DNrjE](bitcoin://15yuMzuueV8y5vPQQ39ZqQVz
##Acknowledgements
* [Deavmi](deavmi.carteronline.net/~deavmi) - Making the documentation beautiful.
* [Deavmi](https://deavmi.carteronline.net/) - Making the documentation beautiful.

View File

@@ -4,3 +4,4 @@
* more alternative templates
* javascript free mod panel
* liveui
* easier peering

View File

@@ -1,71 +1,119 @@
#!/usr/bin/env bash
root=$(readlink -e $(dirname $0))
neochan="yes"
if [ "$1" == "--disable-neochan" ] ; then
neochan="no"
fi
root=$(readlink -e "$(dirname "$0")")
set -e
if [ "x" == "x$root" ] ; then
root=$PWD/${0##*}
fi
cd $root
cd "$root"
if [ -z "$GOPATH" ]; then
export GOPATH=$root/go
mkdir -p $GOPATH
mkdir -p "$GOPATH"
fi
if [ ! -f $GOPATH/bin/minify ]; then
echo "set up minifiy"
if [ ! -f "$GOPATH/bin/minify" ]; then
echo "set up minifiy"
go get -v github.com/tdewolff/minify/cmd/minify
fi
if [ ! -f $GOPATH/bin/gopherjs ]; then
echo "set up gopherjs"
go get -v -u github.com/gopherjs/gopherjs
fi
# build cuckoo miner
echo "Building cuckoo miner"
go get -v -u github.com/ZiRo-/cuckgo/miner_js
$GOPATH/bin/gopherjs -m -v build github.com/ZiRo-/cuckgo/miner_js
mv ./miner_js.js ./contrib/static/miner-js.js
rm ./miner_js.js.map
outfile=$PWD/contrib/static/nntpchan.js
lint() {
if [ "x$(which jslint)" == "x" ] ; then
# no jslint
true
else
echo "jslint: $1"
jslint --browser $1
fi
}
outfile="$PWD/contrib/static/nntpchan.js"
neochan_js_outfile="$PWD/contrib/static/neochan.js"
neochan_css_outfile="$PWD/contrib/static/neochan.css"
mini() {
echo "minify $1"
echo "" >> $2
echo "/* local file: $1 */" >> $2
$GOPATH/bin/minify --mime=text/javascript >> $2 < $1
echo "/* begin $1 */" >> $2
"$GOPATH/bin/minify" --mime=text/javascript >> $2 < $1
echo "" >> $2
echo "/* end $1 */" >> $2
}
# do linting too
if [ "x$1" == "xlint" ] ; then
echo "linting..."
for f in ./contrib/js/*.js ; do
lint $f
done
fi
css() {
echo "minify $1"
echo "" >> $2
echo "/* begin $1 */" >> $2
lessc $1 >> $2
echo "" >> $2
echo "/* end $1 */" >> $2
}
echo -e "//For source code and license information please check https://github.com/majestrate/nntpchan \n" > $outfile
initfile() {
rm -f "$1"
echo '/*' >> "$1"
echo ' * For source code and license information please check https://github.com/majestrate/nntpchan' >> "$1"
brandingfile=./contrib/branding.txt
if [ -e "$brandingfile" ] ; then
echo ' *' >> "$1"
while read line; do
echo -n ' * ' >> "$1";
echo $line >> "$1";
done < $brandingfile;
fi
echo ' */' >> "$1"
}
echo
echo "building nntpchan.js ..."
echo
initfile "$outfile"
if [ -e ./contrib/js/contrib/*.js ] ; then
for f in ./contrib/js/contrib/*.js ; do
mini $f $outfile
mini "$f" "$outfile"
done
fi
mini ./contrib/js/main.js_ $outfile
mini ./contrib/js/entry.js "$outfile"
# local js
for f in ./contrib/js/*.js ; do
mini $f $outfile
for f in ./contrib/js/nntpchan/*.js ; do
mini "$f" "$outfile"
done
# vendor js
for f in ./contrib/js/vendor/*.js ; do
mini "$f" "$outfile"
done
if [ "$neochan" == "yes" ] ; then
set +e
for exe in lessc coffee ; do
which $exe &> /dev/null
if [ "$?" != "0" ] ; then
echo "$exe not installed";
exit 1
fi
done
echo
echo "building neochan.js ..."
echo
initfile "$neochan_js_outfile"
for f in ./contrib/js/neochan/*.coffee ; do
echo "compile $f"
coffee -cs < "$f" > "$f.js"
done
for f in ./contrib/js/neochan/*.js ; do
mini "$f" "$neochan_js_outfile"
done
echo
echo "building neochan.css ..."
echo
initfile "$neochan_css_outfile"
for f in ./contrib/js/neochan/*.less ; do
css "$f" "$neochan_css_outfile"
done
fi
echo
echo "ok"

View File

@@ -1,20 +1,20 @@
#!/usr/bin/env bash
root=$(readlink -e $(dirname $0))
root=$(readlink -e "$(dirname "$0")")
set -e
if [ "x" == "x$root" ] ; then
if [ "" == "$root" ] ; then
root=$PWD/${0##*}
fi
cd $root
cd "$root"
tags=""
tags="-tags disable_redis"
help_text="usage: $0 [--disable-redis]"
help_text="usage: $0 [--disable-neochan]"
# check for help flags first
for arg in $@ ; do
for arg in "$@" ; do
case $arg in
-h|--help)
echo $help_text
echo "$help_text"
exit 0
;;
esac
@@ -24,26 +24,28 @@ rev="QmPAqM7anxdr1ngPmJz9J9AAxDLinDz2Eh9aAzLF9T7LNa"
ipfs="no"
rebuildjs="yes"
_next=""
unstable="no"
neochan="yes"
# check for build flags
for arg in $@ ; do
for arg in "$@" ; do
case $arg in
"--disable-neochan")
neochan="no"
;;
"--unstable")
unstable="yes"
;;
"--no-js")
rebuildjs="no"
;;
"--ipfs")
ipfs="yes"
;;
"--cuckoo")
cuckoo="yes"
;;
"--disable-redis")
tags="$tags -tags disable_redis"
;;
"--revision")
_next="rev"
;;
"--revision=*")
rev=$(echo $arg | cut -d'=' -f2)
rev=$(echo "$arg" | cut -d'=' -f2)
;;
*)
if [ "x$_next" == "xrev" ] ; then
@@ -52,41 +54,53 @@ for arg in $@ ; do
esac
done
if [ "x$rev" == "x" ] ; then
if [ "$rev" == "" ] ; then
echo "revision not specified"
exit 1
fi
cd $root
if [ "x$rebuildjs" == "xyes" ] ; then
cd "$root"
if [ "$rebuildjs" == "yes" ] ; then
echo "rebuilding generated js..."
./build-js.sh
if [ "$neochan" == "no" ] ; then
./build-js.sh --disable-neochan
else
./build-js.sh
fi
fi
unset GOPATH
export GOPATH=$PWD/go
mkdir -p $GOPATH
if [ "x$ipfs" == "xyes" ] ; then
if [ ! -e $GOPATH/bin/gx ] ; then
unset GOPATH
export GOPATH=$PWD/go
mkdir -p "$GOPATH"
if [ "$ipfs" == "yes" ] ; then
if [ ! -e "$GOPATH/bin/gx" ] ; then
echo "obtaining gx"
go get -u -v github.com/whyrusleeping/gx
fi
if [ ! -e $GOPATH/bin/gx-go ] ; then
if [ ! -e "$GOPATH/bin/gx-go" ] ; then
echo "obtaining gx-go"
go get -u -v github.com/whyrusleeping/gx-go
fi
echo "building stable revision, this will take a bit. to speed this part up install and run ipfs locally"
mkdir -p $GOPATH/src/gx/ipfs
cd $GOPATH/src/gx/ipfs
$GOPATH/bin/gx get $rev
cd $root
go get -d -v
mkdir -p "$GOPATH/src/gx/ipfs"
cd "$GOPATH/src/gx/ipfs"
"$GOPATH/bin/gx" get "$rev"
cd "$root"
go get -d -v
go build -v .
mv nntpchan srndv2
echo -e "Built\n"
echo "Now configure NNTPChan with ./srndv2 setup"
else
go get -u -v github.com/majestrate/srndv2
cp $GOPATH/bin/srndv2 $root
if [ "$unstable" == "yes" ] ; then
go get -u -v github.com/majestrate/srndv2/cmd/nntpchan
cp "$GOPATH/bin/nntpchan" "$root"
echo "built unstable, if you don't know what to do, run without --unstable"
else
go get -u -v github.com/majestrate/srndv2
cp "$GOPATH/bin/srndv2" "$root"
echo -e "Built\n"
echo "Now configure NNTPChan with ./srndv2 setup"
fi
fi
echo -e "Built\n"
echo "Now configure NNTPChan with ./srndv2 setup"

View File

@@ -0,0 +1,13 @@
[Unit]
Description=NNTPChan Server
Requires=redis_6379.service
[Service]
Type=simple
WorkingDirectory=/opt/nntpchan
ExecStart=/opt/nntpchan/srndv2 run
ExecStop=/bin/kill -15 $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,89 @@
<?php
function gennntp($headers, $files) {
if (count($files) == 0) {
}
else if (count($files) == 1 && $files[0]['type'] == 'text/plain') {
$content = $files[0]['text'] . "\r\n";
$headers['Content-Type'] = "text/plain; charset=UTF-8";
}
else {
$boundary = sha1($headers['Message-Id']);
$content = "";
$headers['Content-Type'] = "multipart/mixed; boundary=$boundary";
foreach ($files as $file) {
$content .= "--$boundary\r\n";
if (isset($file['name'])) {
$file['name'] = preg_replace('/[\r\n\0"]/', '', $file['name']);
$content .= "Content-Disposition: form-data; filename=\"$file[name]\"; name=\"attachment\"\r\n";
}
$type = explode('/', $file['type'])[0];
if ($type == 'text') {
$file['type'] .= '; charset=UTF-8';
}
$content .= "Content-Type: $file[type]\r\n";
if ($type != 'text' && $type != 'message') {
$file['text'] = base64_encode($file['text']);
$content .= "Content-Transfer-Encoding: base64\r\n";
}
$content .= "\r\n";
$content .= $file['text'];
$content .= "\r\n";
}
$content .= "--$boundary--\r\n";
}
//$headers['Content-Length'] = strlen($content);
$headers['Mime-Version'] = '1.0';
$headers['Date'] = date('r', $headers['Date']);
$out = "";
foreach ($headers as $id => $val) {
$val = str_replace("\n", "\n\t", $val);
$out .= "$id: $val\r\n";
}
$out .= "\r\n";
$out .= $content;
return $out;
}
function shoveitup($msg, $id) {
$s = fsockopen("tcp://localhost:1119");
fgets($s);
fputs($s, "MODE STREAM\r\n");
fgets($s);
fputs($s, "TAKETHIS $id\r\n");
fputs($s, $msg);
fputs($s, "\r\n.\r\n");
fgets($s);
fclose($s);
}
$time = time();
echo "\n@@@@ Thread:\n";
echo $m0 = gennntp(["From" => "czaks <marcin@6irc.net>", "Message-Id" => "<1234.0000.".$time."@example.vichan.net>", "Newsgroups" => "overchan.test", "Date" => time(), "Subject" => "None"],
[['type' => 'text/plain', 'text' => "THIS IS A NEW TEST THREAD"]]);
echo "\n@@@@ Single msg:\n";
echo $m1 = gennntp(["From" => "czaks <marcin@6irc.net>", "Message-Id" => "<1234.1234.".$time."@example.vichan.net>", "Newsgroups" => "overchan.test", "Date" => time(), "Subject" => "None", "References" => "<1234.0000.".$time."@example.vichan.net>"],
[['type' => 'text/plain', 'text' => "hello world, with no image :("]]);
echo "\n@@@@ Single msg and pseudoimage:\n";
echo $m2 = gennntp(["From" => "czaks <marcin@6irc.net>", "Message-Id" => "<1234.2137.".$time."@example.vichan.net>", "Newsgroups" => "overchan.test", "Date" => time(), "Subject" => "None", "References" => "<1234.0000.".$time."@example.vichan.net>"],
[['type' => 'text/plain', 'text' => "hello world, now with an image!"],
['type' => 'image/gif', 'text' => base64_decode("R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="), 'name' => "urgif.gif"]]);
echo "\n@@@@ Single msg and two pseudoimages:\n";
echo $m3 = gennntp(["From" => "czaks <marcin@6irc.net>", "Message-Id" => "<1234.1488.".$time."@example.vichan.net>", "Newsgroups" => "overchan.test", "Date" => time(), "Subject" => "None", "References" => "<1234.0000.".$time."@example.vichan.net>"],
[['type' => 'text/plain', 'text' => "hello world, now WITH TWO IMAGES!!!"],
['type' => 'image/gif', 'text' => base64_decode("R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="), 'name' => "urgif.gif"],
['type' => 'image/gif', 'text' => base64_decode("R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="), 'name' => "urgif2.gif"]]);
shoveitup($m0, "<1234.0000.".$time."@example.vichan.net>");
sleep(1);
shoveitup($m1, "<1234.1234.".$time."@example.vichan.net>");
sleep(1);
shoveitup($m2, "<1234.2137.".$time."@example.vichan.net>");
shoveitup($m3, "<1234.2131.".$time."@example.vichan.net>");

View File

@@ -0,0 +1 @@
3rd party javascript

1
contrib/js/neochan/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.coffee.js

View File

@@ -0,0 +1 @@

View File

View File

@@ -0,0 +1,3 @@
# neochan javascript directory
sass files for neochan templates

View File

@@ -1,4 +1,4 @@
var banner_count = 3;
var banner_count = 5;
// inject a banner into an element
function nntpchan_inject_banners(elem, prefix) {

View File

@@ -0,0 +1,206 @@
/** hidepost.js -- hides posts from page given $things */
function get_hidden_posts() {
var st = get_storage();
var prefix = "nntpchan_hide_post_";
return {
all : function() {
var msgids = [];
for ( var k in st) {
if (k.indexOf(prefix) == 0) {
var m = k.substring(prefix.length);
msgids.push(m);
}
}
return msgids;
},
add : function (msg) {
st[prefix+msg] = "post";
},
del : function (msg) {
st.removeItem(prefix+msg);
}
}
}
// is a post elem an OP?
function postIsOP(elem) {
var ds = elem.dataset;
return ds && ds.rootmsgid == ds.msgid ;
}
function _hide_elem(elem, fade) {
if(!fade) {
if (elem.style) {
elem.style.display = "none";
} else {
elem.style = {display: "none" };
}
elem.dataset.userhide = "yes";
} else {
$(elem).fadeOut(400, function() {
_hide_elem(elem);
});
}
}
function _unhide_elem(elem) {
$(elem).fadeIn();
elem.dataset.userhide = "no";
}
// return true if element is hidden
function _elemIsHidden(elem) {
return elem.dataset && elem.dataset.userhide == "yes";
}
// hide a post
function hidepost(elem, nofade) {
console.log("hidepost("+elem.dataset.msgid+")");
var posts = get_hidden_posts();
if (posts) {
// add to persitant hide
posts.add(elem.dataset.msgidhash);
}
if(postIsOP(elem)) {
// hide thread it's an OP
var thread = document.getElementById("thread_"+elem.dataset.rootmsgidhash);
if (thread) {
var e = thread.getElementsByClassName("post");
for ( var idx = 0; idx < e.length ; idx ++ ) {
if (e[idx].dataset.msgid == elem.dataset.msgid) continue; // don't apply
hidepost(e[idx]);
}
}
}
// hide attachments and post body
var es = elem.getElementsByClassName("attachments");
for (var idx = 0; idx < es.length ; idx ++ ) {
_hide_elem(es[idx], !nofade);
}
es = elem.getElementsByClassName("post_body");
for (var idx = 0; idx < es.length ; idx ++ ) {
_hide_elem(es[idx], !nofade);
}
es = elem.getElementsByClassName("postheader");
for (var idx = 0; idx < es.length ; idx ++ ) {
_hide_elem(es[idx], !nofade);
}
elem.dataset.userhide = "yes";
elem.setHideLabel("[show]");
}
// unhide a post
function unhidepost(elem) {
console.log("unhidepost("+elem.dataset.msgid+")");
var posts = get_hidden_posts();
if (posts) {
// remove from persiting hide
posts.del(elem.dataset.msgidhash);
}
if(postIsOP(elem)) {
var thread = document.getElementById("thread_"+elem.dataset.rootmsgidhash);
if(thread) {
var e = thread.getElementsByClassName("post");
for ( var idx = 0; idx < e.length ; idx ++ ) {
if(e[idx].dataset.msgid == elem.dataset.msgid) continue;
unhidepost(e[idx]);
}
}
}
// unhide attachments and post body
var es = elem.getElementsByClassName("attachments");
for (var idx = 0; idx < es.length ; idx ++ ) {
_unhide_elem(es[idx]);
}
es = elem.getElementsByClassName("post_body");
for (var idx = 0; idx < es.length ; idx ++ ) {
_unhide_elem(es[idx]);
}
es = elem.getElementsByClassName("postheader");
for (var idx = 0; idx < es.length ; idx ++ ) {
_unhide_elem(es[idx]);
}
elem.dataset.userhide = "no";
elem.setHideLabel("[hide]");
}
// hide a post given a callback that checks each post
function hideposts(check_func) {
var es = document.getElementsByClassName("post");
for ( var idx = 0; idx < es.length ; idx ++ ) {
var elem = es[idx];
if(check_func && elem && check_func(elem)) {
hidepost(elem);
}
}
}
// unhide all posts given callback
// if callback is null unhide all
function unhideall(check_func) {
var es = document.getElementsByClassName("post");
for (var idx=0 ; idx < es.length; idx ++ ) {
var elem = es[idx];
if(!check_func) { unhide(elem); }
else if(check_func(elem)) { unhide(elem); }
}
}
// inject posthide into page
onready(function() {
var posts = document.getElementsByClassName("post");
for (var idx = 0 ; idx < posts.length; idx++ ) {
console.log("inject hide: "+posts[idx].dataset.msgid);
var inject = function (elem) {
var hider = document.createElement("a");
hider.setAttribute("class", "hider");
elem.setHideLabel = function (txt) {
var e_hider = hider;
e_hider.innerHTML = txt;
}
elem.hidepost = function() {
var e_self = elem;
var e_hider = hider;
hidepost(e_self);
}
elem.unhidepost = function() {
var e_self = elem;
var e_hider = hider;
unhidepost(e_self);
}
elem.isHiding = function() {
var e_self = elem;
return _elemIsHidden(e_self);
}
hider.appendChild(document.createTextNode("[hide]"));
hider.onclick = function() {
var e_self = elem;
if(e_self.isHiding()) {
e_self.unhidepost();
} else {
e_self.hidepost();
}
}
elem.appendChild(hider);
};
inject(posts[idx]);
}
// apply persiting hidden posts
var posts = get_hidden_posts();
if(posts) {
var all = posts.all();
for ( var idx = 0 ; idx < all.length; idx ++ ) {
var id = all[idx];
var elem = document.getElementById(id);
if(elem)
hidepost(elem, true);
}
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ function inject_livechan_widget(prefix, parent) {
};
progress("initialize");
socket.onopen = function () {
progress("streaming (read only)");
progress("streaming");
}
socket.onmessage = function(ev) {
var j = null;

View File

@@ -0,0 +1 @@
main nntpchan javascript files

View File

@@ -352,6 +352,8 @@ function inject_hover_for_element(elem) {
}
function init(prefix) {
// because no one cares about this feature :|
return;
// inject posthover ...
inject_hover_for_element(document);
if ( /\.html$/.test(document.location.pathname) && ! (/ukko/.test(document.location.pathname)) ) {

View File

@@ -2,6 +2,7 @@ var easiness = 55.0;
var miner_threads = 4;
var randoffs = 64;
/*
onready(function(){
document.getElementById("start_miner").onclick = function() {
var btn = document.getElementById("start_miner");
@@ -61,3 +62,5 @@ onready(function(){
function miner_cb(s) {
document.getElementById("miner_result").value = s;
}
*/

View File

@@ -0,0 +1,2 @@
this directory holds unused javascript files for nntpchan
don't delete files move them here

2
contrib/js/readme.md Normal file
View File

@@ -0,0 +1,2 @@
javascript files for nntpchan

3
contrib/static/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
nntpchan.js
neochan.js
neochan.css

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
contrib/static/banner_3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
contrib/static/banner_4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -7,6 +7,9 @@ body {
background: #111;
}
.post_body > pre {
color: #666;
}
input, textarea, button, input[type="text"], input[type="password"],
input[type="checkbox"], input[type="file"], input[type="submit"],
@@ -21,12 +24,12 @@ input[type="button"] {
color: black;
}
#captcha_img, pre {
#captcha_img {
background: #D80000;
}
.reply, .ukko_thread_header {
border-color: #CA0101;
border-color: #0c0c0c;
}
.ukko_thread_header {
@@ -40,6 +43,14 @@ hr, .name {
color: #6B1919;
}
hr {
height: 0px;
border-width: 1px medium medium;
border-color: #0C0C0C;
border-style: solid none none;
clear: both;
}
.subject {
color: #4E0000;
}
@@ -48,10 +59,24 @@ hr, .name {
background: #0C0C0C;
}
.op {
background-color: #1a1a1a;
border-style: hidden;
}
.pagelist {
background: #0c0c0c;
border-style: hidden;
}
a {
color: #500707;
}
.post:target {
background-color: #1a1a1a;
}
.postno, .postnol {
color: #B70000;
}
@@ -60,6 +85,9 @@ a {
background: #6B1919;
}
#postform_container {
background-color: #111;
}
table tbody tr:nth-of-type( even ) {
background-color: #430000;
}

View File

@@ -16,6 +16,23 @@ body {
background: #FBFFC9;
}
.navbar, table, thead, th, table, pre {
#postform_container {
background-color: rgba(0,0,0,0);
}
.post:target {
background-color: #ffda9b;
box-shadow: 0px 0px 5px 1px;
}
img#nntpchan_banner {
box-shadow: 0px 0px 10px 0px #FFECBE;
}
#postform_inner {
box-shadow: 0px 1px 5px 1px;
}
.navbar, table, thead, th, table, pre, .op {
background: #FFECBE;
}

View File

@@ -1,7 +1,9 @@
<!DOCTYPE html5>
<html>
<head>
<link rel="stylesheet" href="site.css" />
<title> NNTPChan Frequently Asked Questions </title>
<meta charset="utf-8">
</head>
<body>
<h2>NNTPChan faq </h2>
@@ -47,10 +49,6 @@
<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>
</body>
</html>

249
contrib/static/livechan.css Normal file
View File

@@ -0,0 +1,249 @@
input {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
}
.livechan_captcha_input {
color: black;
}
textarea, select {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
}
.livechan_chat_input {
padding: 0;
margin: 0;
position: fixed;
width: 100%;
bottom: 0;
left: 0;
right: 0;
background: #d6daf0;
}
.livechan_chat_input_name, .livechan_chat_input_convo {
padding: 0;
padding-left: none;
margin: 0;
width: 80%;
color: black;
}
.livechan_chat_input_left {
width: 19%;
}
.livechan_chat_input_message_div {
padding:0;
margin:0;
position: absolute;
width: 70%;
left: 20%;
top: 3px;
bottom: 0;
}
.livechan_chat_input_message {
padding: 0;
margin: 0;
border:none;
height: 100%;
width: 100%;
resize: none;
}
.livechan_chat_input_submit {
position: absolute;
width: 8%;
top: 3px;
right: 1px;
bottom: 0;
border: none;
color: black;
}
.livechan_chat_output {
position: fixed;
top: 20px;
left: 0;
right: 0;
bottom: 60px;
overflow: auto;
width: 89%;
-webkit-overflow-scrolling: touch;
}
.livechan_chat_output_chat {
max-height: 200px;
overflow: hidden;
}
.livechan_chat_output_date {
margin: 0 4px;
}
.livechan_chat_output_count:hover {
cursor: pointer;
}
.livechan_chat_capcode {
margin: 0 4px;
font-style: italic;
font-weight: lighter;
}
.livechan_image_thumb {
max-width: 300px;
max-height: 200px;
float: left;
margin: 10px;
}
.livechan_captcha {
left: 0px;
top: 0px;
bottom: 0px;
right: 0px;
position: fixed;
opacity: 0.9;
}
.livechan_captcha_inner {
padding: 200px;
}
.livechan_captcha_image {
}
.livechan_captcha_input {
float: down;
}
.livechan_spoiler {
color: black;
background: black;
}
.livechan_chat_output_chat {
background: #d6daf0;
}
.livechan_spoiler:hover {
color: white;
}
.livechan_convo_label {
padding: 5px;
}
.livechan_convobar_root {
position: fixed;
top: 20px;
right: 0;
width: 10%;
}
.livechan_convobar_item {
padding: 5px;
margin: 5px;
background: #d6daf0;
}
.livechan_navbar {
z-index: 3;
position: fixed;
top: 0;
width: 100%;
height: 20px;
}
.livechan_navbar_mod_indicator_inactive, .livechan_navbar_mod_indicator_active, .livechan_navbar_status, .livechan_navbar_channel_label {
padding-left: 10px;
padding-right: 10px;
background: #d6daf0;
}
.hover {
position: relative;
padding: 1px;
left: -1000px
border: 1px dashed black;
visibility: hidden;
}
.hover > img {
position: fixed;
top: 0%;
right: 0;
max-width: 75%;
max-height: 75%;
visibility: visible;
}
.livechan_captcha, .livechan_convobar_root, #chat {
background: #EEF2FF;
}
.livechan_chat_output_chat {
font-family: monospace;
margin: 4px;
padding: 4px;
}
.livechan_chat_output_name {
font-weight: bold;
color: green;
}
.livechan_chat_output_count:hover {
color: red;
}
.livechan_greentext {
color: #789922;
}
.livechan_boldtext {
font-weight: bold;
}
.livechan_internallink , a {
color: blue;
}
.livechan_internallink:hover , a {
color: red;
cursor: pointer;
}
.livechan_chat_selected {
background: blue;
}
.livechan_navbar_mod_indicator_active {
background: #4a4ad4;
color: #34d434;
}
.livechan_navbar_mod_indicator_admin {
background: #4a4ad4;
color: red;
}
.livechan_navbar_mod_indicator_inactive {
color: #aaaaaa;
background: #EEF2FF;
}
.livechan_redtext {
color: #af0a0f;
font-weight: bold;
}

View File

@@ -45,8 +45,12 @@ section {
.name {
color: #117743;
padding-left: 5px;
}
.postno {
padding-right: 5px;
}
.error {
color: red;
}
@@ -85,17 +89,22 @@ textarea {
max-height: 2.4em;
}
.post_body > pre {
font-size: 10pt;
font-weight: unset;
}
pre {
white-space: pre-wrap;
align: center;
font-size: 13pt;
background: #98E;
font-size: 12pt;
color: black;
display: inline-block;
overflow-wrap: break-word;
word-wrap: break-word;
font-weight: bold;
padding: 20px 20px 20px 20px;
font-family: sans;
margin-left: auto;
margin-right: auto;
@@ -107,6 +116,7 @@ table {
table.board-list-table {
width: 100%;
}
table tbody td {
margin: 0;
padding: 4px 15px 4px 4px;
@@ -161,7 +171,7 @@ input[type="text"],input[type="password"],textarea {
vertical-align: top;
}
.reply, .pagelist {
.reply, .pagelist, .op {
background: #D6DAF0;
border-width: 1px;
border-style: none solid solid none;
@@ -264,10 +274,12 @@ a, a:visited, .navbar-link > label {
right: 0px;
margin-top: 0px;
z-index: 20;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: 1px 10px 20px rgba(0, 0, 0, 0.15);
border-bottom: 1px solid;
background: #D6DAF0;
color: #34345C;
min-height: 20px;
padding-top: 2px;
}
.navbar-sep {
@@ -308,31 +320,49 @@ input, textarea {
border-style: dashed;
}
.reply {
}
.frontend {
margin-top: 0px;
display: inline-block;
margin-right: 5px;
}
.op , .reply {
float: left;
clear: both;
}
.op {
margin-top: 5px;
margin-bottom: 1px;
float: left;
clear: both;
}
.post:target {
background-color: #A99AFF;
}
.postreply {
float: right;
}
.post {
margin-bottom: 5px;
background-color: #D6DAF0;
border: 1px solid #B7C5D9;
border-left: none;
border-top: none;
display: table;
padding: 2px;
margin: 2px;
display: inline-block;
float: left;
clear: both;
min-width: 500px;
}
.postheader {
width: 100%;
padding-top: 3px;
padding-right: 5px
}
@@ -430,11 +460,6 @@ input, textarea {
padding-bottom: 0px;
}
.post {
display: inline-block;
overflow: hidden;
}
.pagelist {
display: inline-block;
overflow: hidden;
@@ -458,8 +483,9 @@ input, textarea {
.origin > img{
height: 20px;
height: 25px;
vertical-align: text-top;
margin-right: 5px;
}
.postform_attachment {
@@ -529,3 +555,31 @@ textarea#reply-text {
float: left;
margin-bottom: 5px;
}
.navbar-links, .navbar-link, .navbar-name {
padding-left: 2px;
padding-right: 2px;
}
.board_title {
padding-right: 4px;
}
.thread {
padding-left: 10px;
padding-top: 10px;
padding-bottom: 10px;
width: 80%;
}
.hider {
float: right;
}
@keyframes rotate {
0% { transform:rotate(0deg); }
25% { transform:rotate(-1deg); }
50% { transform:rotate(0deg); }
75% { transform:rotate(1deg); }
}

View File

@@ -9,6 +9,12 @@ body
padding-right: 4px;
}
.post_body > pre {
color: #DADADA;
text-align: left;
}
main,
aside,
section
@@ -336,6 +342,12 @@ textarea
margin-bottom: 1px;
float: left;
clear: both;
background-color: #0f0f0f;
border-color: #242424;
}
pre {
background-color: #0f0f0f;
}
.post
@@ -621,4 +633,17 @@ hr
{
border: 1px solid #535353;
height: 1px
}
}
img#nntpchan_banner {
box-shadow: 0px 0px 10px 0px;
}
#postform_container {
background-color: rgba(0, 0, 0, 0);
}
.post:target {
background-color: #2c2d3e;
box-shadow: 0px 0px 10px 2px;
}

View File

@@ -9,7 +9,7 @@
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
<link rel="stylesheet" href="{{prefix}}static/user.css"></link>
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css"></link>
<title> {{frontend}} {{#i18n.Translations}}{{board_list_title}}{{/i18n.Translations}} </title>
</head>
<body>

View File

@@ -16,66 +16,64 @@
<script src="{{prefix}}static/nntpchan.js" type="text/javascript"></script>
<title> {{frontend}} on nntpchan </title>
</head>
<body onload="main()">
<body>
{{{navbar}}}
<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 id="nntpchan_banner">
</div>
<div class="index-inner">
<table>
<tbody>
<tr>
<td class="posts_td">
{{{postsgraph}}}
</td>
<td class="board_td">
{{! todo: move boardgraph into its own file like postsgraph }}
<table id="board_graph">
<thead>
<tr>
<th> {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{posts_hour}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{posts_today}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{total}}{{/i18n.Translations}} </th>
</tr>
</thead>
<tbody>
{{# boardgraph}}
<div class="index-outer">
<div id="nntpchan_banner">
</div>
<div class="index-inner">
<div>{{frontend}} on nntpchan</div>
<div>View the <a href="{{prefix}}ukko.html">overboard</a></div>
<div>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></div>
<div>Check out the <a href="{{prefix}}boards.html">board list</a></div>
<div>Fork on github: <a href="https://github.com/majestrate/nntpchan/">frontend</a> and <a href="https://github.com/majestrate/srndv2/">core</a></div>
<div>We've Had {{totalposts}} Posts Since August 01 2015 </div>
</div>
<div class="index-inner">
<table>
<tbody>
<tr>
<td class="posts_td">
{{{postsgraph}}}
</td>
<td class="board_td">
{{! todo: move boardgraph into its own file like postsgraph }}
<table id="board_graph">
<thead>
<tr>
<td>
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
</td>
<td>
{{Hour}}
</td>
<td>
{{Day}}
</td>
<td>
{{All}}
</td>
<th> {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{posts_hour}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{posts_today}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{total}}{{/i18n.Translations}} </th>
</tr>
{{/ boardgraph}}
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
{{{overview}}}
</thead>
<tbody>
{{# 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}}}
</div>
</div>
</div>
</center>
<script type="text/javascript">
var e = document.getElementById("nntpchan_banner");
@@ -83,8 +81,8 @@
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -8,34 +8,25 @@
<head>
<title> {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" />
<link rel="stylesheet" href="{{prefix}}static/livechan.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<style type="text/css" id="convo_filter">
</style>
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>
<center>
<div id="nntpchan_banner">
</div>
</center>
<!-- begin navbar -->
{{{navbar}}}
<!-- end navbar -->
<div id="livechan">
</div>
<noscript>you need js for livechan mode</noscript>
<script type="text/javascript" >
var prefix = "{{prefix}}";
var e = document.getElementById("nntpchan_banner");
nntpchan_inject_banners(e, prefix);
init(prefix);
e = document.getElementById("livechan");
if (e) {
inject_livechan_widget(prefix, e);
var e = document.createElement("div");
e.setAttribute("id", "chat");
e.setAttribute("style", "position:fixed;left:0;right:0;top:0;bottom:0;width:100%;height:100%;");
document.body.appendChild(e);
var board = "";
if (location.hash != "" ) {
board = location.hash.substr(1);
}
new Chat(e, board, { prefix : "{{prefix}}" });
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -1,4 +1,23 @@
<div id="{{post.PostHash}}" class="{{post.CSSClass}}">
<div id="{{post.PostHash}}" class="{{post.CSSClass}}"
data-frontend="{{post.Frontend}}"
data-newsgroup="{{post.Board}}"
data-msgid="{{post.MessageID}}"
data-msgidhash="{{post.PostHash}}"
data-rootmsgid="{{post.Reference}}"
data-rootmsgidhash="{{post.ReferenceHash}}"
{{#post.Sage}}
data-sage="1"
{{/post.Sage}}
{{#post.IsI2P}}
data-origin="i2p"
{{/post.IsI2P}}
{{#post.IsTor}}
data-origin="tor"
{{/post.IsTor}}
{{#post.IsClearnet}}
data-origin="clearnet"
{{/post.IsClearnet}}
data-posturl="{{post.PostURL}}">
<legend class="postheader">
<span class="origin">
{{#post.IsI2P}}
@@ -10,17 +29,28 @@
{{#post.IsClearnet}}
<img src="{{post.Prefix}}static/clearnet.png" title="{{#i18n.Translations}}{{from_clearnet}}{{/i18n.Translations}}" />
{{/post.IsClearnet}}
</span>
<span class="subject">{{post.Subject}}</span>
<span class="name">{{post.Name}}</span>
<time datetime="{{post.DateRFC}}">{{post.Date}}</time>
<a href="#" class="postnol">No.</a><a class="postno" onclick="nntpchan_reply(this, '{{post.ShortHash}}');" title="{{post.MessageID}}" root="{{post.Reference}}" boardname="{{post.Board}}">{{post.ShortHash}}</a>
<a href="{{post.PostURL}}">[{{#i18n.Translations}}{{reply_label}}{{/i18n.Translations}}]</a>
<span class="tripcode">{{{post.Pubkey}}}</span>
</span>
<div class="postreply">
<a class="postno" onclick="nntpchan_reply(this, '{{post.ShortHash}}');" root="{{post.Reference}}" boardname="{{post.Board}}">&gt;&gt;{{post.ShortHash}}</a>
<a href="{{post.PostURL}}">[{{#i18n.Translations}}{{reply_label}}{{/i18n.Translations}}]</a>
</div>
<div>
Subject: <span class="subject">{{post.Subject}}</span>
</div>
<div>
Name: <span class="name">{{post.Name}}</span><span clas="tripcode">{{{post.Pubkey}}}</span>
</div>
<div>
MessageID: <span class="msgid">{{post.MessageID}}</span>
</div>
<div>
Date: <time datetime="{{post.DateRFC}}">{{post.Date}}</time>
</div>
</legend>
<hr>
<div class="attachments">
{{#post.Attachments}}
<figure>
<figure data-sha512="{{Hash}}">
<figcaption>
<a class="download_link" href="{{Source}}" download="{{Filename}}">{{#i18n.Translations}}{{download_prompt}}{{/i18n.Translations}}</a>
<a class="file" href="{{Source}}" title="{{Filename}}" target="_blank"><img src="{{Thumbnail}}" alt="{{Filename}}" class="thumbnail"/></a>
@@ -30,6 +60,7 @@
{{/post.Attachments}}
</div>
<div class="post_body">
{{{post.RenderBody}}}
</div>
<pre>{{{post.RenderBody}}}</pre>
</div>
<hr>
</div>

View File

@@ -77,14 +77,14 @@
<input type="text" name="captcha" autocomplete="off" id="captcha_solution" />
</td>
</tr>
<tr>
<!-- <tr>
<th>
{{#i18n.Translations}}{{cuckoo_pow}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="pow" autocomplete="off" id="miner_result" /><input id="start_miner" class="button" type="button" value="{{#i18n.Translations}}{{start_mining}}{{/i18n.Translations}}"/>
</td>
</tr>
</tr> -->
</tbody>
</table>
</div>

View File

@@ -23,7 +23,7 @@
<!-- end navbar -->
<div class="board_header"> {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} </div>
<div id="ukko_threads">
<pre><a href="#" onclick="ukko_livechan('{{prefix}}')">livechan</a></pre>
<pre><a href="{{prefix}}livechan/">livechan</a></pre>
{{#threads}}
<div class="thread" id="thread_{{OP.PostHash}}">
<div class="ukko_thread_header">
@@ -33,8 +33,8 @@
{{#Truncate.Replies}}
{{{Truncate.RenderPost}}}
{{/Truncate.Replies}}
<hr />
</div>
</div>
<hr />
{{/threads}}
</div>
<script type="text/javascript" >

View File

@@ -0,0 +1,35 @@
{{!
404.mustache -- 404 page
template parameters:
- prefix (the site prefix)
}}
<!DOCTYPE html>
<html>
<head>
<title> 404 </title>
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="{{prefix}}static/neochan-site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>
<center>
<div class="not_found fade-in">
<img src="{{prefix}}static/404.png"></img>
<div class="not_found_message">
{{#i18n.Translations}}{{resource_not_found}}{{/i18n.Translations}}
</div>
</div>
</center>
<script type="text/javascript">
neochan_init(function() {
ready();
});
</script>
<hr />
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -0,0 +1,71 @@
{{!
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 )
}}
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1" />
<link rel="stylesheet" href="{{board.Prefix}}static/site.css" />
<link id="current_theme" 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 -->
<center>
<div id="nntpchan_banner">
</div>
</center>
<div class="board_header">{{board.Board}}</div>
<div class="board_header_catalog"><a href="{{board.Prefix}}catalog-{{board.Name}}.html"> {{#i18n.Translations}}{{catalog_label}}{{/i18n.Translations}} </a></div>
<!-- postform -->
<div id="postform_container">
{{{form}}}
</div>
<hr />
<div id="threads_container">
{{#board.Threads}}
<div class="thread" id="thread_{{OP.PostHash}}">
<div class="thread_header">
</div>
{{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}}
{{{Truncate.RenderPost}}}
{{/Truncate.Replies}}
<hr />
</div>
{{/board.Threads}}
</div>
<div class="pagelist">{{# board.PageList }}[<a href="{{LinkURL}}"> {{Text}} </a>] {{/ board.PageList }}
<span class="navbar-sep">
|
</span>
<a href="{{board.Prefix}}catalog-{{board.Name}}.html"> {{#i18n.Translations}}{{catalog_label}}{{/i18n.Translations}} </a>
</div>
<script type="text/javascript">
var prefix = "{{board.Prefix}}";
var e = document.getElementById("nntpchan_banner");
nntpchan_inject_banners(e, prefix);
init(prefix);
ready();
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -0,0 +1,51 @@
{{!
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 )
}}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css"></link>
<title> {{frontend}} {{#i18n.Translations}}{{board_list_title}}{{/i18n.Translations}} </title>
</head>
<body>
<center>
<div class="index-outer">
<div class="index-inner">
<table id="board_graph">
<thead>
<tr>
<th> {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{pph_label}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{ppd_label}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{total}}{{/i18n.Translations}} </th>
</tr>
</thead>
<tbody>
{{# 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,47 @@
<!doctype html>
<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" />
<link id="current_theme" rel="stylesheet" href="{{board.Prefix}}static/user.css" />
<script type="text/javascript" src="{{board.Prefix}}static/nntpchan.js"></script>
<title>{{#i18n.Translations}}{{catalog_title}}{{/i18n.Translations}} {{board.Name}}</title>
</head>
<body>
<!-- begin navbar -->
{{{board.Navbar}}}
<!-- end navbar -->
<center>
<div id="nntpchan_banner">
</div>
</center>
<div class="board_header">{{#i18n.Translations}}{{catalog_title}}{{/i18n.Translations}} {{board.Name}}</div>
<!-- postform -->
<hr />
<div id="catalog_container">
{{#board.Threads}}
<div class="catalog_thread">
<a class="linkThumb" href="{{OP.PostURL}}"><img src="{{OP.RepresentativeThumb}}"></a>
<div class="catalog_header">{{#i18n.Translations}}{{replies_short_label}}{{/i18n.Translations}}: {{ReplyCount}} / {{#i18n.Translations}}{{pictures_short_label}}{{/i18n.Translations}}: {{Page}}</div>
<div class="catalog_subject">{{OP.Subject}}</div>
<div class="catalog_body">
{{{OP.RenderBody}}}
</div>
</div>
{{/board.Threads}}
</div>
<script type="text/javascript">
var e = document.getElementById("nntpchan_banner");
nntpchan_inject_banners(e, "{{board.Prefix}}");
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -0,0 +1,87 @@
{{!
frontpage.mustache -- template for index.html
template parameters:
- boardgraph ( markup of boardPageRows instance, see srnd/model.go )
- postgraph ( markup of postsGraph instance , see srnd/model.go )
- overview ( markup of 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 )
}}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/neochan-site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<meta charset="utf-8"></meta>
<script src="{{prefix}}static/nntpchan.js" type="text/javascript"></script>
<title> {{frontend}} </title>
</head>
<body>
{{{navbar}}}
<div id="wrapper" class="fade-in">
<div class="index-outer">
<div id="nntpchan-banner">
</div>
<div class="index-inner">
<p>
Please read the <a href="{{prefix}}static/faq.html">FAQ</a> before posting
</p>
</div>
<div class="index-inner">
<table class="posts-table">
<tbody>
<tr>
<td class="posts-td">
{{{postsgraph}}}
</td>
<td class="board-td">
{{! todo: move boardgraph into its own file like postsgraph }}
<table id="board-graph">
<thead>
<tr>
<th> {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{posts_hour}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{posts_today}}{{/i18n.Translations}} </th>
<th> {{#i18n.Translations}}{{total}}{{/i18n.Translations}} </th>
</tr>
</thead>
<tbody>
{{# boardgraph}}
<tr>
<td>
<a id="board-{{Board}}" 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}}}
</div>
</div>
</div>
<script type="text/javascript">
neochan_init(function() {
ready();
});
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -0,0 +1,37 @@
{{!
graph_history.mustache
template parameters:
- history ( a list of PostEntry instances, see srnd/model.go )
}}
<!doctype html>
<html>
<head>
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link rel="stylesheet" href="{{prefix}}static/user.css" />
<title>{{#i18n.Translations}}{{post_history_title}}{{/i18n.Translations}}</title>
</head>
<body>
<td>
<table id="history_graph">
<thead>
<tr>
<th>{{#i18n.Translations}}{{month}}{{/i18n.Translations}}</th>
<th>{{#i18n.Translations}}{{posts}}{{/i18n.Translations}}</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>
</td>
</body>
</html>

View File

@@ -0,0 +1,64 @@
<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>{{#i18n.Translations}}{{api_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{api_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{api_username}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="user" value="{{dialog.User}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{api_password_name}}{{/i18n.Translations}}
</th>
<td>
<input type="password" name="pass" value="">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{api_secret_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="secret" value="{{dialog.Secret}}">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,64 @@
<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>{{#i18n.Translations}}{{binary_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{binary_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{convert_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="convert" value="{{dialog.Convert}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{ffmpeg_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="ffmpeg" value="{{dialog.FFmpeg}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{sox_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="sox" value="{{dialog.Sox}}">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,64 @@
<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>{{#i18n.Translations}}{{cache_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{cache_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
</th>
<td>
<input type="radio" name="cache" value="file" checked> {{#i18n.Translations}}{{file_cache_name}}{{/i18n.Translations}}
</td>
</tr>
<tr>
<th>
</th>
<td>
<input type="radio" name="cache" value="null"> {{#i18n.Translations}}{{null_cache_name}}{{/i18n.Translations}}
</td>
</tr>
<tr>
<th>
</th>
<td>
<input type="radio" name="cache" value="redis"> {{#i18n.Translations}}{{redis_cache_name}}{{/i18n.Translations}}
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,56 @@
<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>{{#i18n.Translations}}{{crypto_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{crypto_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{host_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="host" value="{{dialog.Host}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{key_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="key" value="{{dialog.Key}}">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,56 @@
<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>{{#i18n.Translations}}{{db_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{db_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
</th>
<td>
<input type="radio" name="db" value="postgres"> {{#i18n.Translations}}{{postgres_name}}{{/i18n.Translations}}
</td>
</tr>
<tr>
<th>
</th>
<td>
<input type="radio" name="db" value="redis" checked> {{#i18n.Translations}}{{redis_name}}{{/i18n.Translations}}
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,72 @@
<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>{{#i18n.Translations}}{{frontend_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{frontend_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{frontend_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="name" value="{{dialog.Name}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{locale_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="locale" value="{{dialog.Locale}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{allow_files_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="allow_files" value="1" checked>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{enable_json_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="json" value="1">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,56 @@
<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>{{#i18n.Translations}}{{key_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{key_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{pubkey_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="public" value="{{dialog.Public}}" size="65" readonly>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{secretkey_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="secret" value="{{dialog.Secret}}" size="65" readonly>
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,80 @@
<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>{{#i18n.Translations}}{{nntp_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{nntp_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{nntp_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="nntp_name" value="{{dialog.Name}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{allow_attachments_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="allow_attachments" value="1" checked>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{allow_anon_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="allow_anon" value="1" checked>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{allow_anon_attachments_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="allow_anon_attachments" value="1">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{require_tls_prompt}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="require_tls" value="1" checked>
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,72 @@
<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>{{#i18n.Translations}}{{postgres_db_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{postgres_db_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{host_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="host" value="{{dialog.Host}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{port_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="port" value="{{dialog.Port}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{username_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="user" value="{{dialog.Username}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{password_name}}{{/i18n.Translations}}
</th>
<td>
<input type="password" name="password" value="">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,64 @@
<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>{{#i18n.Translations}}{{redis_db_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{redis_db_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{host_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="host" value="{{dialog.Host}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{port_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="port" value="{{dialog.Port}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{password_name}}{{/i18n.Translations}}
</th>
<td>
<input type="password" name="password" value="">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,64 @@
<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>{{#i18n.Translations}}{{redis_db_install_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div class="installer_header">{{#i18n.Translations}}{{redis_db_install_title}}{{/i18n.Translations}}</div>
{{#dialog.HasError}}
<p class="installer_error">{{dialog.Error}}</p>
{{/dialog.HasError}}
<form action="" method="post" autocomplete="off">
<div id="install-outer">
<div id="installer-inner">
<table class="installer-tab">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{host_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="host" value="{{dialog.Host}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{port_name}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="port" value="{{dialog.Port}}">
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{password_name}}{{/i18n.Translations}}
</th>
<td>
<input type="password" name="password" value="">
</td>
</tr>
</tbody>
</table>
</div>
{{#dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{next_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
{{^dialog.HasNext}}
<input type="submit" value="{{#i18n.Translations}}{{finish_prompt}}{{/i18n.Translations}}" class="button" />
{{/dialog.HasNext}}
</div>
</form>
{{#dialog.HasPrevious}}
<div class="back_button">
<form action="" method="post">
<input type="hidden" name="back" value="true" />
<input type="submit" value="{{#i18n.Translations}}{{previous_prompt}}{{/i18n.Translations}}" class="button" />
</form>
</div>
{{/dialog.HasPrevious}}
</body>
</html>

View File

@@ -0,0 +1,32 @@
{{!
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 )
}}
<!doctype html>
<html>
<head>
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
<title>{{#i18n.Translations}}{{new_tripcode_title}}{{/i18n.Translations}}</title>
</head>
<body>
<div id="wrapper" class="fade-in">
<pre>{{#i18n.Translations}}{{new_tripcode_label}}{{/i18n.Translations}}:
<div id="secret_key">{{#i18n.Translations}}{{secret_key}}{{/i18n.Translations}}: {{secret}}</div>
<div id="public_key">{{#i18n.Translations}}{{public_key}}{{/i18n.Translations}}: {{public}}</div>
<div>{{#i18n.Translations}}{{tripcode}}{{/i18n.Translations}}: <span class="tripcode" id="capcode_key">{{{tripcode}}}</span></div>
</pre>
</div>
<script type="text/javascript">
neochan_init(function() {
ready();
});
</script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
{{!
live.mustache -- live ui
template parameters:
- prefix ( site prefix )
}}
<!doctype html>
<html>
<head>
<title> {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} </title>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" />
<link rel="stylesheet" href="{{prefix}}static/livechan.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<style type="text/css" id="convo_filter">
</style>
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>
<noscript>you need js for livechan mode</noscript>
<script type="text/javascript" >
var e = document.createElement("div");
e.setAttribute("id", "chat");
e.setAttribute("style", "position:fixed;left:0;right:0;top:0;bottom:0;width:100%;height:100%;");
document.body.appendChild(e);
var board = "";
if (location.hash != "" ) {
board = location.hash.substr(1);
}
new Chat(e, board, { prefix : "{{prefix}}" });
</script>
</body>
</html>

View File

@@ -0,0 +1,49 @@
{{!
modfeed.mustache -- admin nntp feed page
template parameters:
- prefix ( the site's prefix )
}}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<!-- yes it uses js -->
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
<script type="text/javascript" src="{{prefix}}static/mod.js"></script>
<script type="text/javascript" src="{{prefix}}static/feed.js"></script>
<title> {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}} </title>
</head>
<body onload="main()">
<div id="nntpchan_mod_result"></div>
<div class="nntpchan_feed_pane">
<pre> Add Feed </pre>
<label for="add_feed_host">Host</label>
<input id="add_feed_host" />
<label for="add_feed_host">Port</label>
<input id="add_feed_port" />
<label for="add_feed_name">Name</label>
<input id="add_feed_name" />
<button onclick="nntp_feed_add()">Add</button>
</div>
<div class="nntpchan_feed_pane">
<pre> Remove Feed </pre>
<label for="del_feed_name">Name</label>
<input id="del_feed_name" />
<button onclick="nntp_feed_del()">Remove</button>
</div>
<div class="nntpchan_feed_pane">
<pre> Sync Feeds </pre>
<button onclick="nntpchan_admin('feed.sync')">Sync All</button>
</div>
<div id="nntpchan_feed_result"></div>
<div id="nntpchan_feeds"></div>
<script>
nntp_feed_update();
</script>
<noscript>
<b>{{#i18n.Translations}}{{nojs_info}}{{/i18n.Translations}}</b>
</noscript>
</body>
</html>

View File

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

View File

@@ -0,0 +1,20 @@
{{!
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
}}
<!doctype html>
<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>{{#i18n.Translations}}{{login}}{{/i18n.Translations}}</title>
</head>
<body>
<p>{{message}}</p>
</body>
</html>

View File

@@ -0,0 +1,109 @@
{{!
modpage.mustache -- the moderator panel when logged in
template parameters:
- prefix ( the site's prefix )
}}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<!-- yes it uses js -->
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
<script type="text/javascript" src="{{prefix}}static/mod.js"></script>
<title> {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}} </title>
</head>
<body onload="main()">
<div>
<div> {{#i18n.Translations}}{{post_actions_label}}{{/i18n.Translations}} </div>
<hr />
<div>
<label for="nntpchan_mod_target">{{#i18n.Translations}}{{target_label}}{{/i18n.Translations}}</label>
<input id="nntpchan_mod_target" type="text" />
</div>
<div>
<button onclick="nntpchan_ban()">{{#i18n.Translations}}{{ban_url_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_delete()">{{#i18n.Translations}}{{delete_url_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_unban()">{{#i18n.Translations}}{{unban_ip_prompt}}{{/i18n.Translations}}</button>
</div>
</div>
<hr />
<div>
<div> {{#i18n.Translations}}{{key_actions_label}}{{/i18n.Translations}} </div>
<div>
<label for="nntpchan_board_target">{{#i18n.Translations}}{{pubkey_label}}{{/i18n.Translations}}:</label>
<input type="text" id="nntpchan_key_target" />
</div>
<div>
<button onclick="nntpchan_key_add()">{{#i18n.Translations}}{{add_key_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_key_del()">{{#i18n.Translations}}{{remove_key_prompt}}{{/i18n.Translations}}</button>
</div>
</div>
<hr />
<div>
<div> {{#i18n.Translations}}{{nntp_login_label}}{{/i18n.Translations}} </div>
<div>
<label for="nntpchan_nntp_username">{{#i18n.Translations}}{{username}}{{/i18n.Translations}}:</label>
<input id="nntpchan_nntp_username" />
</div>
<div>
<label for="nntpchan_nntp_passwd">{{#i18n.Translations}}{{password}}{{/i18n.Translations}}:</label>
<input type="password" id="nntpchan_nntp_passwd" />
</div>
<div>
<button onclick="nntpchan_admin_nntp('nntp.login.add')">{{#i18n.Translations}}{{add_user_prompt}}{{/i18n.Translations}}</button>
</div>
<div>
<button onclick="nntpchan_admin_nntp('nntp.login.del')">{{#i18n.Translations}}{{remove_user_prompt}}{{/i18n.Translations}}</button>
</div>
</div>
<hr />
<div>
<div> {{#i18n.Translations}}{{board_actions_label}}{{/i18n.Translations}} </div>
<div>
<label for="nntpchan_board_target">{{#i18n.Translations}}{{board_name_title}}{{/i18n.Translations}}:</label>
<input id="nntpchan_board_target" />
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.add')">{{#i18n.Translations}}{{add_board_prompt}}{{/i18n.Translations}}</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.regen')">{{#i18n.Translations}}{{regenerate_prompt}}{{/i18n.Translations}}</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.ban')">{{#i18n.Translations}}{{ban_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_admin_board('frontend.unban')">{{#i18n.Translations}}{{unban_prompt}}{{/i18n.Translations}}</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.nuke')">{{#i18n.Translations}}{{nuke_prompt}}{{/i18n.Translations}}</button>
</div>
</div>
<hr />
<div>
<div>
{{#i18n.Translations}}{{light_actions_label}}{{/i18n.Translations}}
</div>
<div>
<button onclick="nntpchan_admin('template.reload')">{{#i18n.Translations}}{{reload_templates_prompt}}{{/i18n.Translations}}</button>
</div>
</div>
<hr />
<div>
<label>{{#i18n.Translations}}{{heavy_actions_label}}{{/i18n.Translations}}</label>
<div>
<button onclick="nntpchan_admin('frontend.regen')">{{#i18n.Translations}}{{regenerate_markup_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_admin('thumbnail.regen')">{{#i18n.Translations}}{{regenerate_thumbs_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_admin('feed.sync')">{{#i18n.Translations}}{{feed_sync_prompt}}{{/i18n.Translations}}</button>
<button onclick="nntpchan_admin('store.expire')">{{#i18n.Translations}}{{expire_old_prompt}}{{/i18n.Translations}}</button>
</div>
</div>
<div>
<a href="{{prefix}}mod/feeds">nntp feed management</a>
</div>
<div id="nntpchan_mod_result"></div>
<noscript>
<b>{{#i18n.Translations}}{{nojs_info}}{{/i18n.Translations}}</b>
</noscript>
</body>
</html>

View File

@@ -0,0 +1,48 @@
{{!
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>
{{#i18n.Translations}}{{navbar_on}}{{/i18n.Translations}}
<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}}">{{#i18n.Translations}}{{front_page_title}}{{/i18n.Translations}}</a></span>
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-links">
<span class="navbar-link"><a href="{{prefix}}ukko.html">{{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}}</a></span>
</span>
<span class="navbar-sep">
|
</span>
<span class="navbar-right navbar-links">
<span class="navbar-link" onclick="neochan_navbar_options_clicked(this)">[options]</span>
</span>
</div>
<hr />

View File

@@ -0,0 +1,56 @@
<html>
<head>
<title>{{#i18n.Translations}}{{new_board_title}}{{/i18n.Translations}}</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>{{#i18n.Translations}}{{first_post_label}}{{/i18n.Translations}}</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>
{{#i18n.Translations}}{{board_name_title}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="name" value="" id="boardname" />
<button onclick="createBoard()">Create Board</button>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{comment}}{{/i18n.Translations}}
</th>
<td>
<textarea id="postform_message" name="message" cols=40 rows=5></textarea>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{captcha}}{{/i18n.Translations}}
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{solution}}{{/i18n.Translations}}
</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>{{#i18n.Translations}}{{newsgroup}}{{/i18n.Translations}}</th>
<th>{{#i18n.Translations}}{{posted}}{{/i18n.Translations}}</th>
<th>{{#i18n.Translations}}{{subject}}{{/i18n.Translations}}</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,66 @@
<div id="{{post.PostHash}}" class="{{post.CSSClass}}"
data-frontend="{{post.Frontend}}"
data-newsgroup="{{post.Board}}"
data-msgid="{{post.MessageID}}"
data-msgidhash="{{post.PostHash}}"
data-rootmsgid="{{post.Reference}}"
data-rootmsgidhash="{{post.ReferenceHash}}"
{{#post.Sage}}
data-sage="1"
{{/post.Sage}}
{{#post.IsI2P}}
data-origin="i2p"
{{/post.IsI2P}}
{{#post.IsTor}}
data-origin="tor"
{{/post.IsTor}}
{{#post.IsClearnet}}
data-origin="clearnet"
{{/post.IsClearnet}}
data-posturl="{{post.PostURL}}">
<legend class="postheader">
<span class="origin">
{{#post.IsI2P}}
<img src="{{post.Prefix}}static/i2p.png" title="{{#i18n.Translations}}{{from_i2p}}{{/i18n.Translations}}" />
{{/post.IsI2P}}
{{#post.IsTor}}
<img src="{{post.Prefix}}static/tor.png" title="{{#i18n.Translations}}{{from_tor}}{{/i18n.Translations}}" />
{{/post.IsTor}}
{{#post.IsClearnet}}
<img src="{{post.Prefix}}static/clearnet.png" title="{{#i18n.Translations}}{{from_clearnet}}{{/i18n.Translations}}" />
{{/post.IsClearnet}}
</span>
<div class="postreply">
<a class="postno" onclick="nntpchan_reply(this, '{{post.ShortHash}}');" root="{{post.Reference}}" boardname="{{post.Board}}">&gt;&gt;{{post.ShortHash}}</a>
<a href="{{post.PostURL}}">[{{#i18n.Translations}}{{reply_label}}{{/i18n.Translations}}]</a>
</div>
<div>
Subject: <span class="subject">{{post.Subject}}</span>
</div>
<div>
Name: <span class="name">{{post.Name}}</span><span clas="tripcode">{{{post.Pubkey}}}</span>
</div>
<div>
MessageID: <span class="msgid">{{post.MessageID}}</span>
</div>
<div>
Date: <time datetime="{{post.DateRFC}}">{{post.Date}}</time>
</div>
</legend>
<hr>
<div class="attachments">
{{#post.Attachments}}
<figure data-sha512="{{Hash}}">
<figcaption>
<a class="download_link" href="{{Source}}" download="{{Filename}}">{{#i18n.Translations}}{{download_prompt}}{{/i18n.Translations}}</a>
<a class="file" href="{{Source}}" title="{{Filename}}" target="_blank"><img src="{{Thumbnail}}" alt="{{Filename}}" class="thumbnail"/></a>
<a class="fname_link" title="{{Filename}}" href="{{Source}}">{{Filename}}</a>
</figcaption>
</figure>
{{/post.Attachments}}
</div>
<div class="post_body">
<pre>{{{post.RenderBody}}}</pre>
</div>
<hr>
</div>

View File

@@ -0,0 +1,11 @@
<!doctype html>
<html>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
<meta http-equiv="refresh" content="5; {{redirect_url}}" />
<body>
<pre>{{#i18n.Translations}}{{post_failed_label}}{{/i18n.Translations}}: {{reason}}</pre>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<!doctype html>
<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>
{{#i18n.Translations}}{{captcha}}{{/i18n.Translations}}
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/{{captcha_id}}.png" alt="captcha" />
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{solution}}{{/i18n.Translations}}
</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,17 @@
{{!
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 )
}}
<!doctype html>
<html>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
<meta http-equiv="refresh" content="4; {{redirect_url}}" />
<body>
<pre>{{#i18n.Translations}}{{posted_as_label}}{{/i18n.Translations}} {{message_id}}</pre>
</body>
</html>

View File

@@ -0,0 +1,93 @@
{{!
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 )
- files ( bool, do we allow attachments ? )
- csrf ( csrf token )
}}
<form action="{{post_url}}" enctype="multipart/form-data" name="post" method="post">
{{{csrf}}}
<input type="hidden" name="reference" value="{{reference}}" id="postform_reference"/>
<div id="postform-outer">
<div id="postform-inner">
<table class="postform">
<tbody>
<tr>
<th>
{{#i18n.Translations}}{{name}}{{/i18n.Translations}}
</th>
<td>
<span>
<input type="text" name="name" value="" id="postform_name" />
<span id="postform_msg"></span>
</span>
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{subject}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="subject" value="" id="postform_subject" />
<input type="submit" value="{{button}}" class="button" id="postform_submit" />
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{comment}}{{/i18n.Translations}}
</th>
<td>
<textarea id="postform_message" name="message" cols=40 rows=5></textarea>
</td>
</tr>
{{#files}}
<tr>
<th>
{{#i18n.Translations}}{{file}}{{/i18n.Translations}}
</th>
<td>
<input class="postform_attachment" id="postform_attachments" type="file" name="attachment_uploaded" multiple />
</td>
</tr>
{{/files}}
<tr>
<th>
{{#i18n.Translations}}{{dubs}}{{/i18n.Translations}}
</th>
<td>
<input type="checkbox" name="dubs" />
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{captcha}}{{/i18n.Translations}}
</th>
<td>
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
</td>
</tr>
<tr>
<th>
{{#i18n.Translations}}{{solution}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="captcha" autocomplete="off" id="captcha_solution" />
</td>
</tr>
<!-- <tr>
<th>
{{#i18n.Translations}}{{cuckoo_pow}}{{/i18n.Translations}}
</th>
<td>
<input type="text" name="pow" autocomplete="off" id="miner_result" /><input id="start_miner" class="button" type="button" value="{{#i18n.Translations}}{{start_mining}}{{/i18n.Translations}}"/>
</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>{{#i18n.Translations}}{{day}}{{/i18n.Translations}}</th>
<th>{{#i18n.Translations}}{{posts}}{{/i18n.Translations}}</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,60 @@
{{!
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 )
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
}}
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1" />
<link rel="stylesheet" href="{{thread.Prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{thread.Prefix}}static/user.css" />
<script src="{{thread.Prefix}}static/nntpchan.js" type="text/javascript"></script>
<title> {{thread.OP.Subject}} </title>
</head>
<body>
<!-- begin navbar -->
{{{thread.Navbar}}}
<!-- end navbar -->
<center>
<div id="nntpchan_banner">
</div>
</center>
<div class="board_header">{{thread.Board}}</div>
<!-- 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}}}
{{/ thread.Replies}}
</div>
<hr/>
<div class="navLinks">[<a href="{{thread.BoardURL}}" accesskey="a">{{#i18n.Translations}}{{return}}{{/i18n.Translations}}</a>] [<a href="{{thread.Prefix}}catalog-{{thread.Board}}.html" accesskey="r">{{#i18n.Translations}}{{catalog_label}}{{/i18n.Translations}}</a>] [<a href="#thread_{{thread.OP.PostHash}}">{{#i18n.Translations}}{{to_top_label}}{{/i18n.Translations}}</a>] [<a href="#navlinks" accesskey="r" onclick="location.reload();">{{#i18n.Translations}}{{update}}{{/i18n.Translations}}</a>]</div>
<script type="text/javascript">
var prefix = "{{thread.Prefix}}";
var e = document.getElementById("nntpchan_banner");
nntpchan_inject_banners(e, prefix);
init(prefix);
ready();
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -0,0 +1,53 @@
{{!
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 )
}}
<!doctype html>
<html>
<head>
<title> {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="{{prefix}}static/site.css" />
<link id="current_theme" rel="stylesheet" href="{{prefix}}static/user.css" />
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
</head>
<body>
<center>
<div id="nntpchan_banner">
</div>
</center>
<!-- begin navbar -->
{{{navbar}}}
<!-- end navbar -->
<div class="board_header"> {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}} </div>
<div id="ukko_threads">
<pre><a href="{{prefix}}livechan/">livechan</a></pre>
{{#threads}}
<div class="thread" id="thread_{{OP.PostHash}}">
<div class="ukko_thread_header">
<p>{{#i18n.Translations}}{{posted_on_label}}{{/i18n.Translations}} <a href="{{{BoardURL}}}"><span class="ukko_boardname">{{OP.Board}}</span></a></p>
</div>
{{{OP.Truncate.RenderPost}}}
{{#Truncate.Replies}}
{{{Truncate.RenderPost}}}
{{/Truncate.Replies}}
</div>
<hr />
{{/threads}}
</div>
<script type="text/javascript" >
var prefix = "{{prefix}}";
var e = document.getElementById("nntpchan_banner");
nntpchan_inject_banners(e, prefix);
init(prefix);
ready();
</script>
<hr/>
<footer>
<p class="legal">All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.</p>
<p class="legal">To make a DMCA request or report illegal content, please contact the administration</p>
</footer>
</body>
</html>

View File

@@ -3,8 +3,8 @@
# script to make sql file for inserting all "currently trusted" keys
#
root=$(readlink -e $(dirname $0))
touch $root/keys.sql
for key in $(cat $root/keys.txt) ; do
root=$(readlink -e "$(dirname "$0")")
touch "$root/keys.sql"
for key in $(cat "$root/keys.txt") ; do
echo "insert into modprivs(pubkey, newsgroup, permission) values('$key', 'overchan', 'all');" >> keys.sql ;
done

View File

@@ -21,7 +21,7 @@ ppd_label=Posts per Jour
total=Total
#front page
posts_today=Posts Aujourd'hui
posts_today=Posts d'Aujourd'hui
posts_hour=Posts cette Heure
#history

View File

@@ -1,5 +1,6 @@
NNTPChan Documentation
======================
**WARNING: Caching with redis was deprecated in [commit 96de42](https://github.com/majestrate/srndv2/commit/96de42bf5d689a54d27871c9f8bc4ef3d0cdbefc). Any reference to redis as a cache should be ignored. You should instead use null cache.**
Hey, welcome to the documentation. This will help you use and develop with NNTPChan.
@@ -9,7 +10,7 @@ Hey, welcome to the documentation. This will help you use and develop with NNTPC
2. [Setting up NNTPChan](setting-up.md) - Configuring the node
3. [Running NNTPChan](running.md) - Running the node for the first time
4. [Managing your NNTPChan node with the CLI](cli.md) - Manage many aspects of your node via the command-line interface
5. [Configuring your news reader for NNTPChan](extras/configure-newsreader.md) - Setup Mozilla Thunderbird or Pan to send and receive articles from your node.
5. [Configuring your news reader for NNTPChan](extras/configure-newsreader.md) - Setup **Mozilla Thunderbird** or **Pan** to send and receive articles from your NNTPChan node of choice.
##Developer related

67
doc/building-debian8.5.md Normal file
View File

@@ -0,0 +1,67 @@
#How to install nntpchan on Debian 8.5 Jessie
Install the initial dependencies:
```
apt-get -y --no-install-recommends install imagemagick libsodium-dev sox git ca-certificates libav-tools build-essential tcl8.5
```
##Install redis
It is not recommended that you install redis from the default package repos because it is probably not up to date.
Download the redis stable tarball and make:
```
cd /opt
wget http://download.redis.io/redis-stable.tar.gz
tar -xzvf redis-stable.tar.gz
cd redis-stable
make && make test && make install
```
The `utils/` directory has a bash script that automates redis configuration. The default settings work just fine, so run the script:
```
cd utils && ./install_server.sh
```
Make redis start during system boot up:
```
update-rc.d redis_6379 defaults
```
It is *strongly recommended* that you use a password for redis. I am generating an sha512sum for a random string:
```
"good old fashioned memes will end global warming and restore our freedom of speech" | sha512sum
```
Edit `/etc/redis/6379.conf` and append the file with `requirepass YOUR_LONG_PASSWORD_HERE`.
## Install golang
Download the golang tarball, extract it to `/usr/local`, and add it to the global profile:
```
cd /opt
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -C /usr/local/ -xvzf go1.6.2.linux-amd64.tar.gz
echo 'export PATH="$PATH:/usr/local/go/bin"' >> /etc/profile
```
Your `PATH` is set at login, so log out and back in before proceeding.
## Install nntpchan
```
cd /opt
git clone https://github.com/majestrate/nntpchan.git
cd nntpchan
./build.sh
```
Now you can proceed with [setting up NNTPChan](setting-up.md). When you get to the "set paths to external programs" step, you should change the ffmpeg path to `/usr/bin/avconv`.
Run `./srndv2 setup` and follow the instructions [here](setting-up.md).

View File

@@ -8,7 +8,7 @@ This document will help you build the NNTPChan software from the source code.
NNTPChan can run on the following operating systems:
* Linux
* Instructions are available for Debian and Trisquel.
* Instructions are available for Debian and [Trisquel](#trisquel-instructions-wip).
* FreeBSD
Dependancies:

View File

@@ -4,23 +4,10 @@ Configuring Postgres database
These are instructions for setting up NNTPChan with Postgres as the data-storage system.
##Configuring Postgres
A user with sufficient privileges to run su is required (hint: you can use root). This command switches to the Postgres user, creates a Postgres role called `srnd`, and prompts for a password. For illustrative purposes, we will use `srnd` as the password.
Setting up postgres (as root):
# become postgres user
su postgres
# spawn postgres admin shell
psql
You'll get a prompt, enter the following:
CREATE ROLE srnd WITH LOGIN PASSWORD 'srnd';
CREATE DATABASE srnd WITH ENCODING 'UTF8' OWNER srnd;
\q
For demo purposes we'll use these credentials.
These are default values, please change them later.
# su - postgres -c "createuser --pwprompt --createdb --encrypted srnd"
###Important
These credentials assume you are going to run using a user called `srnd`, if your username you plan to run the daemon as is different please change `srnd` to your username.
It's easiest to connect to Postgres using role-based authentication. In this case, our Linux user `srnd` matches up with our Postgres role `srnd`, so role-based authentication can take place. If you're running SRNDv2 as a different user (e.g. `nntpchan`), you will need to create a role that matches that user using the command above.

View File

@@ -1,4 +1,7 @@
Configuring your newsreader
===========================
WIP. Let's document both Thunderbird and Pan.
There are guides to setup these two news-readers:
1. [Mozilla Thunderbird](thunderbird-newsreader-configuration.md)
2. [Pan](pan-newsreader-configuration.md)

View File

@@ -0,0 +1,4 @@
Configure Pan newsreader
========================
This is a guide on how to setup Pan so that you may read and post articles from and an NNTPChan node.

View File

@@ -0,0 +1,4 @@
Configure Mozilla Thunderbird newsreader
========================================
This is a guide on how to setup Mozilla Thunderbird so that you may read and post articles from and an NNTPChan node.

View File

@@ -179,3 +179,7 @@ This WILL be the nntpchan pastebin, but it's not implemented yet
ctl=1
Allows you to recieve moderation notifications from other boards, it's also used for decentralized moderation
##Alternative config location
If you would like to have your feeds.ini somewhere other than in the working directory, you can set the `SRND_FEEDS_INI_PATH` environment variable. For example, if you would like to use `/etc/nntpchan/meems.ini`, edit `~/.profile` and add `export SRND_FEEDS_INI_PATH=/etc/nntpchan/meems.ini`.

View File

@@ -15,6 +15,8 @@ allow_anon_attachments=0
allow_attachments=1
require_tls=1
anon_nntp=0
feeds=/etc/nntpchan/feeds.d
archive=0
[pprof]
enable=0
@@ -81,21 +83,23 @@ This is where you put the address and port that you would like the NNTP server t
####sync_on_start
* When this is set to `1` your NNTP server will sync articles with its peers on startup.
* When this is set to `0` then no syncing will take place on statup.
* When this is set to `0` then no syncing will take place on startup.
####allow_anon
* When this is set to `1` bluh.
* When this is set to `0` bluh.
* When this is set to `1`, posts made from anonymizing networks will be synced from peers.
* When this is set to `0`, posts made from anonymizing networks will not be synced from peers.
####allow_anon_attachments
* When this is set to `1` bluh.
* When this is set to `0` bluh.
* When this is set to `1`, attachments posted from anonymizing networks will be syncdd from peers.
* When this is set to `0`, attachments posted from anonymizing networks will not be synced from peers.
Nodes with `allow_anon_attachments` disabled will not receive threads with images posted from anonymizing networks. Likewise, the thread replies will not sync. In the case where an anonymized user posts an image reply and the node has `allow_anon_attachments` disabled, text posts without attachments replying to the non-synced image post will appear to be "ghosted".
####allow_attachments
* When this is set to `1` posters my attach images to their posts.
* When this is set to `1` posters may attach images to their posts.
* When this is set to `0` posters may not attach images to their posts.
####require_tls
@@ -105,8 +109,15 @@ This is where you put the address and port that you would like the NNTP server t
####anon_nntp
* When this is set to `1` bluh.
* When this is set to `0` bluh.
* When this is set to `1`, the SRNdv2 server will send unauthenticated peers its articles.
* When this is set to `0`, peers will need to be authenticated to sync articles.
####feeds
* Feeds configurations can optionally be stored in a directory of your choosing (the default is `feeds.d` in the working directory). Any ini files located in this directory will be loaded.
####archive
* When this is set to `1`, the daemon will never expire posts.
* When this is set to `0`, the daemon will delete old posts. FIXME: under what conditions?
##`[pprof]`
@@ -114,9 +125,21 @@ All pprof-related settings.
####enable
* When this is set to `1` bluh.
* When this is set to `0` bluh.
* When this is set to `1` pprof is enabled.
* When this is set to `0` pprof is disabled.
####bind
FIXME
* Bind to an address and port for use with `go tool pprof`
##`[frontend]`
#####minimize_html
* `0`: Do not minimize HTML
* `1`: Minimize HTML
##Placing configuration elsewhere
By default, `srnd.ini` must be placed in the working directory (wherever you have the `srndv2` binary). If you want to place the `srnd.ini` config file elsewhere, you can define an environment varialbe in the `~/.profile` for the user that runs `srndv2`.
If you would like to use, for example, `/etc/nntpchan/my_srnd_config.ini`, simply add `export SRND_INI_PATH=/etc/nntpchan/my_srnd_config.ini` to `~/.profile`.

0
feeds.d/.keep Normal file
View File

View File

@@ -1,16 +1,16 @@
#!/usr/bin/env bash
set -e
root=$(readlink -e $(dirname $0))
root=$(readlink -e "$(dirname "$0")")
prefix="/opt/nntpchan"
help_text="usage: $0 [--prefix /opt/nntpchan] [-q|--quiet] [-r|--rebuild] [--disable-redis]"
# check for help flags first
for arg in $@ ; do
for arg in "$@" ; do
case $arg in
-h|--help)
echo $help_text
echo "$help_text"
exit 0
;;
esac
@@ -22,7 +22,7 @@ want_quiet="0"
build_args=""
# check for main flags
for arg in $@ ; do
for arg in "$@" ; do
case $arg in
-q|--quiet)
want_quiet="1"
@@ -34,7 +34,7 @@ for arg in $@ ; do
_next="prefix"
;;
--prefix=*)
prefix=$(echo $arg | cut -d'=' -f2)
prefix=$(echo "$arg" | cut -d'=' -f2)
;;
--disable-redis)
build_args="$build_args --disable-redis"
@@ -51,27 +51,27 @@ done
_cmd() {
if [ "X$want_quiet" == "X1" ] ; then
$@ &> /dev/null
"$@" &> /dev/null
else
$@
"$@"
fi
}
if [ "X$want_rebuild" == "X1" ] ; then
_cmd echo "rebuilding daemon";
_cmd $root/build.sh $build_args
_cmd "$root/build.sh" $build_args
fi
if [ ! -e $root/srndv2 ] ; then
if [ ! -e "$root/srndv2" ] ; then
_cmd echo "building daemon"
# TODO: use different GOPATH for root?
_cmd $root/build.sh $build_args
_cmd "$root/build.sh" "$build_args"
fi
_cmd mkdir -p $prefix
_cmd mkdir -p $prefix/webroot/thm
_cmd mkdir -p $prefix/webroot/img
_cmd cp -f $root/srndv2 $prefix/srndv2
_cmd cp -rf $root/{doc,contrib,certs} $prefix/
_cmd mkdir -p "$prefix"
_cmd mkdir -p "$prefix/webroot/thm"
_cmd mkdir -p "$prefix/webroot/img"
_cmd cp -f "$root/srndv2" "$prefix/srndv2"
_cmd cp -rf "$root/"{doc,contrib,certs} "$prefix/"
_cmd echo "installed to $prefix"