From 7b8d33826b702e1882914b58ba6bcf972020c2c3 Mon Sep 17 00:00:00 2001
From: Jeff Becker
Date: Sat, 15 Oct 2016 09:05:38 -0400
Subject: [PATCH] initial neochan commit
---
build-js.sh | 100 +++++++++++-----
build.sh | 21 ++--
contrib/js/neochan/.gitignore | 1 +
contrib/js/neochan/default.less | 1 +
contrib/js/neochan/init.coffee | 0
contrib/js/neochan/readme.md | 3 +
contrib/static/.gitignore | 3 +
contrib/static/faq.html | 6 +-
contrib/templates/neochan/404.mustache | 35 ++++++
contrib/templates/neochan/board.mustache | 71 ++++++++++++
contrib/templates/neochan/boardlist.mustache | 51 ++++++++
contrib/templates/neochan/catalog.mustache | 47 ++++++++
contrib/templates/neochan/frontpage.mustache | 87 ++++++++++++++
.../templates/neochan/graph_history.mustache | 37 ++++++
contrib/templates/neochan/inst_api.mustache | 64 ++++++++++
contrib/templates/neochan/inst_bins.mustache | 64 ++++++++++
contrib/templates/neochan/inst_cache.mustache | 64 ++++++++++
.../templates/neochan/inst_crypto.mustache | 56 +++++++++
contrib/templates/neochan/inst_db.mustache | 56 +++++++++
.../templates/neochan/inst_frontend.mustache | 72 ++++++++++++
contrib/templates/neochan/inst_key.mustache | 56 +++++++++
contrib/templates/neochan/inst_nntp.mustache | 80 +++++++++++++
.../neochan/inst_postgres_db.mustache | 72 ++++++++++++
.../neochan/inst_redis_cache.mustache | 64 ++++++++++
.../templates/neochan/inst_redis_db.mustache | 64 ++++++++++
contrib/templates/neochan/keygen.mustache | 32 +++++
contrib/templates/neochan/live.mustache | 32 +++++
contrib/templates/neochan/modfeed.mustache | 49 ++++++++
contrib/templates/neochan/modlogin.mustache | 16 +++
.../neochan/modlogin_result.mustache | 20 ++++
contrib/templates/neochan/modpage.mustache | 109 ++++++++++++++++++
contrib/templates/neochan/navbar.mustache | 48 ++++++++
contrib/templates/neochan/newboard.mustache | 56 +++++++++
contrib/templates/neochan/overview.mustache | 25 ++++
contrib/templates/neochan/post.mustache | 66 +++++++++++
contrib/templates/neochan/post_fail.mustache | 11 ++
contrib/templates/neochan/post_retry.mustache | 49 ++++++++
.../templates/neochan/post_success.mustache | 17 +++
contrib/templates/neochan/postform.mustache | 93 +++++++++++++++
.../templates/neochan/posts_graph.mustache | 25 ++++
contrib/templates/neochan/thread.mustache | 60 ++++++++++
contrib/templates/neochan/ukko.mustache | 53 +++++++++
42 files changed, 1893 insertions(+), 43 deletions(-)
create mode 100644 contrib/js/neochan/.gitignore
create mode 100644 contrib/js/neochan/default.less
create mode 100644 contrib/js/neochan/init.coffee
create mode 100644 contrib/js/neochan/readme.md
create mode 100644 contrib/static/.gitignore
create mode 100644 contrib/templates/neochan/404.mustache
create mode 100644 contrib/templates/neochan/board.mustache
create mode 100644 contrib/templates/neochan/boardlist.mustache
create mode 100644 contrib/templates/neochan/catalog.mustache
create mode 100644 contrib/templates/neochan/frontpage.mustache
create mode 100644 contrib/templates/neochan/graph_history.mustache
create mode 100644 contrib/templates/neochan/inst_api.mustache
create mode 100644 contrib/templates/neochan/inst_bins.mustache
create mode 100644 contrib/templates/neochan/inst_cache.mustache
create mode 100644 contrib/templates/neochan/inst_crypto.mustache
create mode 100644 contrib/templates/neochan/inst_db.mustache
create mode 100644 contrib/templates/neochan/inst_frontend.mustache
create mode 100644 contrib/templates/neochan/inst_key.mustache
create mode 100644 contrib/templates/neochan/inst_nntp.mustache
create mode 100644 contrib/templates/neochan/inst_postgres_db.mustache
create mode 100644 contrib/templates/neochan/inst_redis_cache.mustache
create mode 100644 contrib/templates/neochan/inst_redis_db.mustache
create mode 100644 contrib/templates/neochan/keygen.mustache
create mode 100644 contrib/templates/neochan/live.mustache
create mode 100644 contrib/templates/neochan/modfeed.mustache
create mode 100644 contrib/templates/neochan/modlogin.mustache
create mode 100644 contrib/templates/neochan/modlogin_result.mustache
create mode 100644 contrib/templates/neochan/modpage.mustache
create mode 100644 contrib/templates/neochan/navbar.mustache
create mode 100644 contrib/templates/neochan/newboard.mustache
create mode 100644 contrib/templates/neochan/overview.mustache
create mode 100644 contrib/templates/neochan/post.mustache
create mode 100644 contrib/templates/neochan/post_fail.mustache
create mode 100644 contrib/templates/neochan/post_retry.mustache
create mode 100644 contrib/templates/neochan/post_success.mustache
create mode 100644 contrib/templates/neochan/postform.mustache
create mode 100644 contrib/templates/neochan/posts_graph.mustache
create mode 100644 contrib/templates/neochan/thread.mustache
create mode 100644 contrib/templates/neochan/ukko.mustache
diff --git a/build-js.sh b/build-js.sh
index 0ffa22c..214aee5 100755
--- a/build-js.sh
+++ b/build-js.sh
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
+
+neochan="yes"
+if [ "$1" == "--disable-neochan" ] ; then
+ neochan="no"
+fi
+
root=$(readlink -e "$(dirname "$0")")
set -e
if [ "x" == "x$root" ] ; then
@@ -16,47 +22,48 @@ if [ ! -f "$GOPATH/bin/minify" ]; then
go get -v github.com/tdewolff/minify/cmd/minify
fi
-outfile=$PWD/contrib/static/nntpchan.js
-
-lint() {
- if [ "$(which jslint)" == "" ] ; 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 "/* 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
+}
-rm -f "$outfile"
+initfile() {
+
+ rm -f "$1"
-echo '/*' >> $outfile
-echo ' * For source code and license information please check https://github.com/majestrate/nntpchan' >> $outfile
-brandingfile=./contrib/branding.txt
-if [ -e "$brandingfile" ] ; then
- echo ' *' >> $outfile
- while read line; do
- echo -n ' * ' >> $outfile;
- echo $line >> $outfile;
- done < $brandingfile;
-fi
-echo ' */' >> $outfile
+ 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
@@ -76,4 +83,37 @@ 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"
diff --git a/build.sh b/build.sh
index e82ce04..2d4b0ce 100755
--- a/build.sh
+++ b/build.sh
@@ -6,9 +6,9 @@ if [ "" == "$root" ] ; then
fi
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
@@ -25,9 +25,13 @@ ipfs="no"
rebuildjs="yes"
_next=""
unstable="no"
+neochan="yes"
# check for build flags
for arg in "$@" ; do
case $arg in
+ "--disable-neochan")
+ neochan="no"
+ ;;
"--unstable")
unstable="yes"
;;
@@ -37,12 +41,6 @@ for arg in "$@" ; do
"--ipfs")
ipfs="yes"
;;
- "--cuckoo")
- cuckoo="yes"
- ;;
- "--disable-redis")
- tags="$tags -tags disable_redis"
- ;;
"--revision")
_next="rev"
;;
@@ -64,8 +62,13 @@ fi
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"
diff --git a/contrib/js/neochan/.gitignore b/contrib/js/neochan/.gitignore
new file mode 100644
index 0000000..5e8935c
--- /dev/null
+++ b/contrib/js/neochan/.gitignore
@@ -0,0 +1 @@
+*.coffee.js
\ No newline at end of file
diff --git a/contrib/js/neochan/default.less b/contrib/js/neochan/default.less
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/contrib/js/neochan/default.less
@@ -0,0 +1 @@
+
diff --git a/contrib/js/neochan/init.coffee b/contrib/js/neochan/init.coffee
new file mode 100644
index 0000000..e69de29
diff --git a/contrib/js/neochan/readme.md b/contrib/js/neochan/readme.md
new file mode 100644
index 0000000..000bf58
--- /dev/null
+++ b/contrib/js/neochan/readme.md
@@ -0,0 +1,3 @@
+# neochan javascript directory
+
+sass files for neochan templates
diff --git a/contrib/static/.gitignore b/contrib/static/.gitignore
new file mode 100644
index 0000000..4db2d70
--- /dev/null
+++ b/contrib/static/.gitignore
@@ -0,0 +1,3 @@
+nntpchan.js
+neochan.js
+neochan.css
\ No newline at end of file
diff --git a/contrib/static/faq.html b/contrib/static/faq.html
index 7227483..54645ee 100644
--- a/contrib/static/faq.html
+++ b/contrib/static/faq.html
@@ -1,7 +1,9 @@
+
NNTPChan Frequently Asked Questions
+
NNTPChan faq
@@ -47,10 +49,6 @@
-
-
Please send any gripes/questions/inqueries/suggestions/complaints to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question"
-
-
diff --git a/contrib/templates/neochan/404.mustache b/contrib/templates/neochan/404.mustache
new file mode 100644
index 0000000..4830167
--- /dev/null
+++ b/contrib/templates/neochan/404.mustache
@@ -0,0 +1,35 @@
+{{!
+ 404.mustache -- 404 page
+ template parameters:
+ - prefix (the site prefix)
+}}
+
+
+
+ 404
+
+
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{resource_not_found}}{{/i18n.Translations}}
+
+
+
+
+
+
+ All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.
+ To make a DMCA request or report illegal content, please contact the administration
+
+
+
diff --git a/contrib/templates/neochan/board.mustache b/contrib/templates/neochan/board.mustache
new file mode 100644
index 0000000..b58713f
--- /dev/null
+++ b/contrib/templates/neochan/board.mustache
@@ -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 )
+}}
+
+
+
+
+
+
+
+
+ {{board.Board}}
+
+
+
+ {{{board.Navbar}}}
+
+
+
+
+
+
+
+
+
+ {{{form}}}
+
+
+
+ {{#board.Threads}}
+
+
+ {{{OP.Truncate.RenderPost}}}
+ {{#Truncate.Replies}}
+ {{{Truncate.RenderPost}}}
+ {{/Truncate.Replies}}
+
+
+ {{/board.Threads}}
+
+
+
+
+
+ All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.
+ To make a DMCA request or report illegal content, please contact the administration
+
+
+
diff --git a/contrib/templates/neochan/boardlist.mustache b/contrib/templates/neochan/boardlist.mustache
new file mode 100644
index 0000000..4d64905
--- /dev/null
+++ b/contrib/templates/neochan/boardlist.mustache
@@ -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 )
+}}
+
+
+
+
+
+ {{frontend}} {{#i18n.Translations}}{{board_list_title}}{{/i18n.Translations}}
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{pph_label}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{ppd_label}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{total}}{{/i18n.Translations}}
+
+
+
+ {{# graph}}
+
+
+ {{Board}}
+
+
+ {{Hour}}
+
+
+ {{Day}}
+
+
+ {{All}}
+
+
+ {{/ graph}}
+
+
+
+
+
+
+
diff --git a/contrib/templates/neochan/catalog.mustache b/contrib/templates/neochan/catalog.mustache
new file mode 100644
index 0000000..df56cf5
--- /dev/null
+++ b/contrib/templates/neochan/catalog.mustache
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{catalog_title}}{{/i18n.Translations}} {{board.Name}}
+
+
+
+ {{{board.Navbar}}}
+
+
+
+
+
+
+
+
+
+ {{#board.Threads}}
+
+
+
+
{{OP.Subject}}
+
+ {{{OP.RenderBody}}}
+
+
+ {{/board.Threads}}
+
+
+
+
+ All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.
+ To make a DMCA request or report illegal content, please contact the administration
+
+
+
diff --git a/contrib/templates/neochan/frontpage.mustache b/contrib/templates/neochan/frontpage.mustache
new file mode 100644
index 0000000..8958824
--- /dev/null
+++ b/contrib/templates/neochan/frontpage.mustache
@@ -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 )
+}}
+
+
+
+
+
+
+
+ {{frontend}}
+
+
+ {{{navbar}}}
+
+
+
+
+
+
+ Please read the FAQ before posting
+
+
+
+
+
+
+
+ {{{postsgraph}}}
+
+
+ {{! todo: move boardgraph into its own file like postsgraph }}
+
+
+
+ {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{posts_hour}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{posts_today}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{total}}{{/i18n.Translations}}
+
+
+
+ {{# boardgraph}}
+
+
+ {{Board}}
+
+
+ {{Hour}}
+
+
+ {{Day}}
+
+
+ {{All}}
+
+
+ {{/ boardgraph}}
+
+
+
+
+
+
+ {{{overview}}}
+
+
+
+
+
+
+ All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.
+ To make a DMCA request or report illegal content, please contact the administration
+
+
+
diff --git a/contrib/templates/neochan/graph_history.mustache b/contrib/templates/neochan/graph_history.mustache
new file mode 100644
index 0000000..f61405d
--- /dev/null
+++ b/contrib/templates/neochan/graph_history.mustache
@@ -0,0 +1,37 @@
+{{!
+graph_history.mustache
+template parameters:
+- history ( a list of PostEntry instances, see srnd/model.go )
+
+}}
+
+
+
+
+
+
+ {{#i18n.Translations}}{{post_history_title}}{{/i18n.Translations}}
+
+
+
+
+
+
+ {{#i18n.Translations}}{{month}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{posts}}{{/i18n.Translations}}
+
+
+
+
+ {{#history.Scale}}
+
+ {{Date}}
+ {{Num}}
+ {{OvercockGraph}}
+
+ {{/history.Scale}}
+
+
+
+
+
diff --git a/contrib/templates/neochan/inst_api.mustache b/contrib/templates/neochan/inst_api.mustache
new file mode 100644
index 0000000..908d104
--- /dev/null
+++ b/contrib/templates/neochan/inst_api.mustache
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{api_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_bins.mustache b/contrib/templates/neochan/inst_bins.mustache
new file mode 100644
index 0000000..278238e
--- /dev/null
+++ b/contrib/templates/neochan/inst_bins.mustache
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{binary_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_cache.mustache b/contrib/templates/neochan/inst_cache.mustache
new file mode 100644
index 0000000..ee6c363
--- /dev/null
+++ b/contrib/templates/neochan/inst_cache.mustache
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{cache_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_crypto.mustache b/contrib/templates/neochan/inst_crypto.mustache
new file mode 100644
index 0000000..4567736
--- /dev/null
+++ b/contrib/templates/neochan/inst_crypto.mustache
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{crypto_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_db.mustache b/contrib/templates/neochan/inst_db.mustache
new file mode 100644
index 0000000..550a89f
--- /dev/null
+++ b/contrib/templates/neochan/inst_db.mustache
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{db_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_frontend.mustache b/contrib/templates/neochan/inst_frontend.mustache
new file mode 100644
index 0000000..7535dfe
--- /dev/null
+++ b/contrib/templates/neochan/inst_frontend.mustache
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{frontend_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_key.mustache b/contrib/templates/neochan/inst_key.mustache
new file mode 100644
index 0000000..5f932ea
--- /dev/null
+++ b/contrib/templates/neochan/inst_key.mustache
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{key_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_nntp.mustache b/contrib/templates/neochan/inst_nntp.mustache
new file mode 100644
index 0000000..a6a6af6
--- /dev/null
+++ b/contrib/templates/neochan/inst_nntp.mustache
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{nntp_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_postgres_db.mustache b/contrib/templates/neochan/inst_postgres_db.mustache
new file mode 100644
index 0000000..4fdc4d8
--- /dev/null
+++ b/contrib/templates/neochan/inst_postgres_db.mustache
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{postgres_db_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_redis_cache.mustache b/contrib/templates/neochan/inst_redis_cache.mustache
new file mode 100644
index 0000000..67ed6c2
--- /dev/null
+++ b/contrib/templates/neochan/inst_redis_cache.mustache
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{redis_db_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/inst_redis_db.mustache b/contrib/templates/neochan/inst_redis_db.mustache
new file mode 100644
index 0000000..67ed6c2
--- /dev/null
+++ b/contrib/templates/neochan/inst_redis_db.mustache
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{redis_db_install_title}}{{/i18n.Translations}}
+
+
+
+ {{#dialog.HasError}}
+ {{dialog.Error}}
+ {{/dialog.HasError}}
+
+ {{#dialog.HasPrevious}}
+
+
+
+ {{/dialog.HasPrevious}}
+
+
diff --git a/contrib/templates/neochan/keygen.mustache b/contrib/templates/neochan/keygen.mustache
new file mode 100644
index 0000000..2ab7b09
--- /dev/null
+++ b/contrib/templates/neochan/keygen.mustache
@@ -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 )
+ }}
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{new_tripcode_title}}{{/i18n.Translations}}
+
+
+
+
{{#i18n.Translations}}{{new_tripcode_label}}{{/i18n.Translations}}:
+ {{#i18n.Translations}}{{secret_key}}{{/i18n.Translations}}: {{secret}}
+ {{#i18n.Translations}}{{public_key}}{{/i18n.Translations}}: {{public}}
+ {{#i18n.Translations}}{{tripcode}}{{/i18n.Translations}}: {{{tripcode}}}
+
+
+
+
+
diff --git a/contrib/templates/neochan/live.mustache b/contrib/templates/neochan/live.mustache
new file mode 100644
index 0000000..a5dd838
--- /dev/null
+++ b/contrib/templates/neochan/live.mustache
@@ -0,0 +1,32 @@
+{{!
+ live.mustache -- live ui
+ template parameters:
+ - prefix ( site prefix )
+}}
+
+
+
+ {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}}
+
+
+
+
+
+
+
+
+ you need js for livechan mode
+
+
+
diff --git a/contrib/templates/neochan/modfeed.mustache b/contrib/templates/neochan/modfeed.mustache
new file mode 100644
index 0000000..69de17f
--- /dev/null
+++ b/contrib/templates/neochan/modfeed.mustache
@@ -0,0 +1,49 @@
+{{!
+ modfeed.mustache -- admin nntp feed page
+ template parameters:
+ - prefix ( the site's prefix )
+
+ }}
+
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}}
+
+
+
+
+
Add Feed
+
Host
+
+
Port
+
+
Name
+
+
Add
+
+
+
Remove Feed
+
Name
+
+
Remove
+
+
+
Sync Feeds
+
Sync All
+
+
+
+
+
+ {{#i18n.Translations}}{{nojs_info}}{{/i18n.Translations}}
+
+
+
diff --git a/contrib/templates/neochan/modlogin.mustache b/contrib/templates/neochan/modlogin.mustache
new file mode 100644
index 0000000..10874a7
--- /dev/null
+++ b/contrib/templates/neochan/modlogin.mustache
@@ -0,0 +1,16 @@
+
+
+
+
+
+ {{#i18n.Translations}}{{login}}{{/i18n.Translations}}
+
+
+
+
+
diff --git a/contrib/templates/neochan/modlogin_result.mustache b/contrib/templates/neochan/modlogin_result.mustache
new file mode 100644
index 0000000..d063ec8
--- /dev/null
+++ b/contrib/templates/neochan/modlogin_result.mustache
@@ -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
+ }}
+
+
+
+
+
+
+ {{#i18n.Translations}}{{login}}{{/i18n.Translations}}
+
+
+ {{message}}
+
+
diff --git a/contrib/templates/neochan/modpage.mustache b/contrib/templates/neochan/modpage.mustache
new file mode 100644
index 0000000..5fe1093
--- /dev/null
+++ b/contrib/templates/neochan/modpage.mustache
@@ -0,0 +1,109 @@
+{{!
+ modpage.mustache -- the moderator panel when logged in
+ template parameters:
+ - prefix ( the site's prefix )
+
+ }}
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}}
+
+
+
+
{{#i18n.Translations}}{{post_actions_label}}{{/i18n.Translations}}
+
+
+ {{#i18n.Translations}}{{target_label}}{{/i18n.Translations}}
+
+
+
+ {{#i18n.Translations}}{{ban_url_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{delete_url_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{unban_ip_prompt}}{{/i18n.Translations}}
+
+
+
+
+
{{#i18n.Translations}}{{key_actions_label}}{{/i18n.Translations}}
+
+ {{#i18n.Translations}}{{pubkey_label}}{{/i18n.Translations}}:
+
+
+
+ {{#i18n.Translations}}{{add_key_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{remove_key_prompt}}{{/i18n.Translations}}
+
+
+
+
+
{{#i18n.Translations}}{{nntp_login_label}}{{/i18n.Translations}}
+
+ {{#i18n.Translations}}{{username}}{{/i18n.Translations}}:
+
+
+
+ {{#i18n.Translations}}{{password}}{{/i18n.Translations}}:
+
+
+
+ {{#i18n.Translations}}{{add_user_prompt}}{{/i18n.Translations}}
+
+
+ {{#i18n.Translations}}{{remove_user_prompt}}{{/i18n.Translations}}
+
+
+
+
+
{{#i18n.Translations}}{{board_actions_label}}{{/i18n.Translations}}
+
+ {{#i18n.Translations}}{{board_name_title}}{{/i18n.Translations}}:
+
+
+
+ {{#i18n.Translations}}{{add_board_prompt}}{{/i18n.Translations}}
+
+
+ {{#i18n.Translations}}{{regenerate_prompt}}{{/i18n.Translations}}
+
+
+ {{#i18n.Translations}}{{ban_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{unban_prompt}}{{/i18n.Translations}}
+
+
+ {{#i18n.Translations}}{{nuke_prompt}}{{/i18n.Translations}}
+
+
+
+
+
+ {{#i18n.Translations}}{{light_actions_label}}{{/i18n.Translations}}
+
+
+ {{#i18n.Translations}}{{reload_templates_prompt}}{{/i18n.Translations}}
+
+
+
+
+
{{#i18n.Translations}}{{heavy_actions_label}}{{/i18n.Translations}}
+
+ {{#i18n.Translations}}{{regenerate_markup_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{regenerate_thumbs_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{feed_sync_prompt}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{expire_old_prompt}}{{/i18n.Translations}}
+
+
+
+
+
+ {{#i18n.Translations}}{{nojs_info}}{{/i18n.Translations}}
+
+
+
diff --git a/contrib/templates/neochan/navbar.mustache b/contrib/templates/neochan/navbar.mustache
new file mode 100644
index 0000000..a7b9b28
--- /dev/null
+++ b/contrib/templates/neochan/navbar.mustache
@@ -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 )
+ }}
+
+
diff --git a/contrib/templates/neochan/newboard.mustache b/contrib/templates/neochan/newboard.mustache
new file mode 100644
index 0000000..1889605
--- /dev/null
+++ b/contrib/templates/neochan/newboard.mustache
@@ -0,0 +1,56 @@
+
+
+ {{#i18n.Translations}}{{new_board_title}}{{/i18n.Translations}}
+
+
+
+
+
+ {{#i18n.Translations}}{{first_post_label}}{{/i18n.Translations}}
+
+
+
+
diff --git a/contrib/templates/neochan/overview.mustache b/contrib/templates/neochan/overview.mustache
new file mode 100644
index 0000000..ee434ed
--- /dev/null
+++ b/contrib/templates/neochan/overview.mustache
@@ -0,0 +1,25 @@
+{{! overview.mustache
+paramters:
+
+- overview (list of PostModels in order of last posted)
+
+}}
+
+
+
+
+ {{#i18n.Translations}}{{newsgroup}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{posted}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{subject}}{{/i18n.Translations}}
+
+
+
+ {{#overview}}
+
+ {{Board}}
+ {{Date}}
+ {{Truncate.Subject}}
+
+ {{/overview}}
+
+
diff --git a/contrib/templates/neochan/post.mustache b/contrib/templates/neochan/post.mustache
new file mode 100644
index 0000000..b349cdc
--- /dev/null
+++ b/contrib/templates/neochan/post.mustache
@@ -0,0 +1,66 @@
+
+
+
+
+
+
{{{post.RenderBody}}}
+
+
+
diff --git a/contrib/templates/neochan/post_fail.mustache b/contrib/templates/neochan/post_fail.mustache
new file mode 100644
index 0000000..e74265a
--- /dev/null
+++ b/contrib/templates/neochan/post_fail.mustache
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{post_failed_label}}{{/i18n.Translations}}: {{reason}}
+
+
diff --git a/contrib/templates/neochan/post_retry.mustache b/contrib/templates/neochan/post_retry.mustache
new file mode 100644
index 0000000..fcee14e
--- /dev/null
+++ b/contrib/templates/neochan/post_retry.mustache
@@ -0,0 +1,49 @@
+
+
+
+ try again
+
+
+
+
+
+
+ {{#attachment}}
+
+
+
+ {{/attachment}}
+
+
+
+
+
+
+
+
+
diff --git a/contrib/templates/neochan/post_success.mustache b/contrib/templates/neochan/post_success.mustache
new file mode 100644
index 0000000..a53f1b9
--- /dev/null
+++ b/contrib/templates/neochan/post_success.mustache
@@ -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 )
+ }}
+
+
+
+
+
+
+
+
+ {{#i18n.Translations}}{{posted_as_label}}{{/i18n.Translations}} {{message_id}}
+
+
diff --git a/contrib/templates/neochan/postform.mustache b/contrib/templates/neochan/postform.mustache
new file mode 100644
index 0000000..f135674
--- /dev/null
+++ b/contrib/templates/neochan/postform.mustache
@@ -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 )
+ }}
+
+ {{{csrf}}}
+
+
+
+
diff --git a/contrib/templates/neochan/posts_graph.mustache b/contrib/templates/neochan/posts_graph.mustache
new file mode 100644
index 0000000..96c0262
--- /dev/null
+++ b/contrib/templates/neochan/posts_graph.mustache
@@ -0,0 +1,25 @@
+{{!
+posts graph.mustache -- post frequence graph
+parameters:
+
+ * graph - a postsGraph instance (see srnd/model.go)
+}}
+
+
+
+
+ {{#i18n.Translations}}{{day}}{{/i18n.Translations}}
+ {{#i18n.Translations}}{{posts}}{{/i18n.Translations}}
+
+
+
+
+ {{#graph.Scale}}
+
+ {{Day}}
+ {{Num}}
+ {{OvercockGraph}}
+
+ {{/graph.Scale}}
+
+
diff --git a/contrib/templates/neochan/thread.mustache b/contrib/templates/neochan/thread.mustache
new file mode 100644
index 0000000..8919c7a
--- /dev/null
+++ b/contrib/templates/neochan/thread.mustache
@@ -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
+}}
+
+
+
+
+
+
+
+
+ {{thread.OP.Subject}}
+
+
+
+ {{{thread.Navbar}}}
+
+
+
+
+
+
+
+
+ {{{form}}}
+
+
+
+
+ {{{thread.OP.RenderPost}}}
+ {{# thread.Replies}}
+ {{{RenderPost}}}
+ {{/ thread.Replies}}
+
+
+
+
+
+
+ All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.
+ To make a DMCA request or report illegal content, please contact the administration
+
+
+
diff --git a/contrib/templates/neochan/ukko.mustache b/contrib/templates/neochan/ukko.mustache
new file mode 100644
index 0000000..3288386
--- /dev/null
+++ b/contrib/templates/neochan/ukko.mustache
@@ -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 )
+ }}
+
+
+
+ {{#i18n.Translations}}{{overboard_title}}{{/i18n.Translations}}
+
+
+
+
+
+
+
+
+
+
+
+ {{{navbar}}}
+
+
+
+
livechan
+ {{#threads}}
+
+
+ {{{OP.Truncate.RenderPost}}}
+ {{#Truncate.Replies}}
+ {{{Truncate.RenderPost}}}
+ {{/Truncate.Replies}}
+
+
+ {{/threads}}
+
+
+
+
+ All posts on this site are the responsibility of the individual poster and not the administration, pursuant to 47 U.S.C. § 230.
+ To make a DMCA request or report illegal content, please contact the administration
+
+
+