Compare commits
163 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b8d33826b | ||
|
|
9e9a1efe06 | ||
|
|
a5d7cb9074 | ||
|
|
053b5870cf | ||
|
|
4ab90f3152 | ||
|
|
dc75a3513e | ||
|
|
40ceb747ae | ||
|
|
6996e3abc4 | ||
|
|
5118ffb3f8 | ||
|
|
287a49f196 | ||
|
|
698ed1d42e | ||
|
|
a0deb532e3 | ||
|
|
0e1e6201ca | ||
|
|
6ea75236fa | ||
|
|
61281190bb | ||
|
|
2355528b46 | ||
|
|
db5b8ec309 | ||
|
|
a0a0a6feca | ||
|
|
787bef7625 | ||
|
|
e57d4ea921 | ||
|
|
c6c9c3f53b | ||
|
|
f7eb634aa1 | ||
|
|
74f07c3a6c | ||
|
|
95864559fb | ||
|
|
5155205e8c | ||
|
|
d91b0d3e99 | ||
|
|
3df355abdb | ||
|
|
850e5bccae | ||
|
|
713fe21190 | ||
|
|
3d683ab87e | ||
|
|
a4053f0f1a | ||
|
|
87e29cc117 | ||
|
|
c17d0fb0bb | ||
|
|
985863deb2 | ||
|
|
a9d2c0425d | ||
|
|
76cb2341ce | ||
|
|
ceb6f09a3f | ||
|
|
adf3540556 | ||
|
|
2ce8a38b0b | ||
|
|
e62d959b0b | ||
|
|
4216a777a3 | ||
|
|
5873b41e00 | ||
|
|
14635e9472 | ||
|
|
422f3de11d | ||
|
|
64b5531fed | ||
|
|
17f3b25e51 | ||
|
|
60f0c19a9f | ||
|
|
f4f2479b8a | ||
|
|
3506d7f975 | ||
|
|
9acca366d0 | ||
|
|
70fd791545 | ||
|
|
9f3c41fb0b | ||
|
|
2ff6088605 | ||
|
|
54644e0da2 | ||
|
|
dbd05c30c3 | ||
|
|
587cdf4e75 | ||
|
|
76d75b260f | ||
|
|
35ff3759f4 | ||
|
|
671db6e483 | ||
|
|
32566bfd84 | ||
|
|
4b02ad6d89 | ||
|
|
a5c2f8d86f | ||
|
|
6e1e7440dc | ||
|
|
0b460eeb5d | ||
|
|
2a32bb75d5 | ||
|
|
cf91d8ffa5 | ||
|
|
375713390e | ||
|
|
f823b0e612 | ||
|
|
cb1821189a | ||
|
|
1a5862213c | ||
|
|
96c019324d | ||
|
|
1e905b6bbf | ||
|
|
7c6726b5fc | ||
|
|
24d18ff599 | ||
|
|
16d0489cd7 | ||
|
|
5875347966 | ||
|
|
b2c1d9eb26 | ||
|
|
a0bc39aaa5 | ||
|
|
b887d07172 | ||
|
|
1f48c58f6b | ||
|
|
e8eec5862f | ||
|
|
bf7213bf09 | ||
|
|
b2201c4ef7 | ||
|
|
a4747b9965 | ||
|
|
5ec4c823fe | ||
|
|
00d0be952f | ||
|
|
c448777fe9 | ||
|
|
30b54c17fa | ||
|
|
e954c57da6 | ||
|
|
d5d30893e5 | ||
|
|
72947dbbcc | ||
|
|
1c632666ab | ||
|
|
5cf12f37a5 | ||
|
|
9c038021b5 | ||
|
|
4a8861761d | ||
|
|
13e0010419 | ||
|
|
e461462bd6 | ||
|
|
8101e67b10 | ||
|
|
63edd14243 | ||
|
|
d2142f7c83 | ||
|
|
28b1864841 | ||
|
|
5fa1e76971 | ||
|
|
40eeb116de | ||
|
|
a502259ba9 | ||
|
|
cac18a5e44 | ||
|
|
c86f573440 | ||
|
|
6f5130d8fd | ||
|
|
17b8101349 | ||
|
|
5e53ae6f04 | ||
|
|
50c395aad4 | ||
|
|
18bf12e556 | ||
|
|
bc1c038468 | ||
|
|
7117a25f9a | ||
|
|
ef69bda0d7 | ||
|
|
ab6ac43851 | ||
|
|
28feb5a84e | ||
|
|
9e3e0cc443 | ||
|
|
c573fb646b | ||
|
|
93b3e0f83f | ||
|
|
7dda235ab1 | ||
|
|
09e7969479 | ||
|
|
cb37a45b67 | ||
|
|
e25d6ab370 | ||
|
|
e2194d3fbd | ||
|
|
fdc4234d08 | ||
|
|
0c0160da6d | ||
|
|
fd82218e5f | ||
|
|
091d74af52 | ||
|
|
e690b7dd9c | ||
|
|
a856af693f | ||
|
|
3668eb7822 | ||
|
|
3cc04a6cad | ||
|
|
e6967a75e7 | ||
|
|
679ee50342 | ||
|
|
b73c219e6b | ||
|
|
1b474af875 | ||
|
|
77a72c5770 | ||
|
|
a52fe21743 | ||
|
|
42c70990a0 | ||
|
|
0980903b6e | ||
|
|
47737dd205 | ||
|
|
a22330f920 | ||
|
|
05b4695398 | ||
|
|
415fb3c4a8 | ||
|
|
5138c31e58 | ||
|
|
052259c9d1 | ||
|
|
7276e28bb7 | ||
|
|
2adf2d5127 | ||
|
|
242094193f | ||
|
|
2ffc7a80e6 | ||
|
|
3da1ab157d | ||
|
|
17d2654f26 | ||
|
|
f155b0e9a1 | ||
|
|
c97296700f | ||
|
|
3951432bad | ||
|
|
da5c44d4fd | ||
|
|
a35889ca18 | ||
|
|
c171e62d52 | ||
|
|
75a3cf5ede | ||
|
|
2d25b349f7 | ||
|
|
29149eb452 | ||
|
|
57232aeaf0 | ||
|
|
2ced2b73c7 |
1
.gitignore
vendored
@@ -35,6 +35,7 @@ vendor
|
||||
|
||||
# generated js
|
||||
contrib/static/nntpchan.js
|
||||
contrib/static/js/nntpchan.js
|
||||
contrib/static/miner-js.js
|
||||
|
||||
#docs trash
|
||||
|
||||
27
README.md
@@ -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.
|
||||
|
||||
1
TODO.md
@@ -4,3 +4,4 @@
|
||||
* more alternative templates
|
||||
* javascript free mod panel
|
||||
* liveui
|
||||
* easier peering
|
||||
|
||||
132
build-js.sh
@@ -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"
|
||||
|
||||
84
build.sh
@@ -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"
|
||||
|
||||
13
contrib/configs/systemd/nntpchan.service
Normal 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
|
||||
89
contrib/frontends/php/vichan/post2nntp.php
Normal 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>");
|
||||
1
contrib/js/contrib/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
3rd party javascript
|
||||
1
contrib/js/neochan/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.coffee.js
|
||||
1
contrib/js/neochan/default.less
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
0
contrib/js/neochan/init.coffee
Normal file
3
contrib/js/neochan/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# neochan javascript directory
|
||||
|
||||
sass files for neochan templates
|
||||
@@ -1,4 +1,4 @@
|
||||
var banner_count = 3;
|
||||
var banner_count = 5;
|
||||
|
||||
// inject a banner into an element
|
||||
function nntpchan_inject_banners(elem, prefix) {
|
||||
206
contrib/js/nntpchan/hide-post.js
Normal 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);
|
||||
}
|
||||
}
|
||||
});
|
||||
1432
contrib/js/nntpchan/livechan.js
Normal 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;
|
||||
1
contrib/js/nntpchan/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
main nntpchan javascript files
|
||||
@@ -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)) ) {
|
||||
@@ -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;
|
||||
}
|
||||
*/
|
||||
|
||||
2
contrib/js/nntpchan/unused/readme.md
Normal 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
@@ -0,0 +1,2 @@
|
||||
javascript files for nntpchan
|
||||
|
||||
3
contrib/static/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
nntpchan.js
|
||||
neochan.js
|
||||
neochan.css
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 59 KiB |
BIN
contrib/static/banner_3.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
contrib/static/banner_4.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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); }
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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}}">>>{{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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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" >
|
||||
|
||||
35
contrib/templates/neochan/404.mustache
Normal 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>
|
||||
71
contrib/templates/neochan/board.mustache
Normal 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>
|
||||
51
contrib/templates/neochan/boardlist.mustache
Normal 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>
|
||||
47
contrib/templates/neochan/catalog.mustache
Normal 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>
|
||||
87
contrib/templates/neochan/frontpage.mustache
Normal 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>
|
||||
37
contrib/templates/neochan/graph_history.mustache
Normal 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>
|
||||
64
contrib/templates/neochan/inst_api.mustache
Normal 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>
|
||||
64
contrib/templates/neochan/inst_bins.mustache
Normal 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>
|
||||
64
contrib/templates/neochan/inst_cache.mustache
Normal 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>
|
||||
56
contrib/templates/neochan/inst_crypto.mustache
Normal 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>
|
||||
56
contrib/templates/neochan/inst_db.mustache
Normal 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>
|
||||
72
contrib/templates/neochan/inst_frontend.mustache
Normal 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>
|
||||
56
contrib/templates/neochan/inst_key.mustache
Normal 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>
|
||||
80
contrib/templates/neochan/inst_nntp.mustache
Normal 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>
|
||||
72
contrib/templates/neochan/inst_postgres_db.mustache
Normal 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>
|
||||
64
contrib/templates/neochan/inst_redis_cache.mustache
Normal 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>
|
||||
64
contrib/templates/neochan/inst_redis_db.mustache
Normal 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>
|
||||
32
contrib/templates/neochan/keygen.mustache
Normal 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>
|
||||
32
contrib/templates/neochan/live.mustache
Normal 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>
|
||||
49
contrib/templates/neochan/modfeed.mustache
Normal 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>
|
||||
16
contrib/templates/neochan/modlogin.mustache
Normal 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>
|
||||
20
contrib/templates/neochan/modlogin_result.mustache
Normal 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>
|
||||
109
contrib/templates/neochan/modpage.mustache
Normal 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>
|
||||
48
contrib/templates/neochan/navbar.mustache
Normal 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 />
|
||||
56
contrib/templates/neochan/newboard.mustache
Normal 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>
|
||||
25
contrib/templates/neochan/overview.mustache
Normal 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>
|
||||
66
contrib/templates/neochan/post.mustache
Normal 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}}">>>{{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>
|
||||
11
contrib/templates/neochan/post_fail.mustache
Normal 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>
|
||||
49
contrib/templates/neochan/post_retry.mustache
Normal 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>
|
||||
17
contrib/templates/neochan/post_success.mustache
Normal 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>
|
||||
93
contrib/templates/neochan/postform.mustache
Normal 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>
|
||||
|
||||
25
contrib/templates/neochan/posts_graph.mustache
Normal 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>
|
||||
60
contrib/templates/neochan/thread.mustache
Normal 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>
|
||||
53
contrib/templates/neochan/ukko.mustache
Normal 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>
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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).
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
4
doc/extras/pan-newsreader-configuration.md
Normal 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.
|
||||
4
doc/extras/thunderbird-newsreader-configuration.md
Normal 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.
|
||||
@@ -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`.
|
||||
|
||||
45
doc/srnd.md
@@ -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
30
install.sh
@@ -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"
|
||||
|
||||