From ea9da7da611509fbe9c5f23867414242a443e3a8 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Sun, 2 Oct 2016 01:15:34 +0900 Subject: Make slack report notifier, donate page, irc page and radio page use configuration variables instead of hard coding values. --- templates/themes/donate/donate.html | 173 ++---------------------------------- templates/themes/donate/info.php | 33 ++++++- templates/themes/irc/info.php | 7 +- templates/themes/irc/irc.html | 4 +- templates/themes/irc/radio.html | 29 ------ templates/themes/radio/info.php | 9 +- templates/themes/radio/radio.html | 2 +- 7 files changed, 55 insertions(+), 202 deletions(-) delete mode 100644 templates/themes/irc/radio.html (limited to 'templates') diff --git a/templates/themes/donate/donate.html b/templates/themes/donate/donate.html index 551eea62..27f16747 100644 --- a/templates/themes/donate/donate.html +++ b/templates/themes/donate/donate.html @@ -7,167 +7,8 @@ + {% if config.font_awesome %}{% endif %} -
{{ boardlist.top }}
@@ -181,7 +22,7 @@

Thanks for donating

-

The server costs $55 per month. If you buy stickers we get about 45-55% of whatever you spend. Historical donation records to the former owner are ForeverN2Dust is the top donator, giving about $3000. FOOFDOOF is #2 with $1000 and lots of cheap Chinese shit. Please specify what you'd like your money to go towards. If you don't want to buy stickers, but want to donate something else please either ask in /q/ or contact the Lainchan administration on IRC at #lainchan on Freenode. +

The server costs {{ settings.monthlyamount }} per month. If you buy stickers we get about 45-55% of whatever you spend. Historical donation records to the former owner are ForeverN2Dust is the top donator, giving about $3000. FOOFDOOF is #2 with $1000 and lots of cheap Chinese shit. Please specify what you'd like your money to go towards. If you don't want to buy stickers, but want to donate something else please either ask in /q/ or contact the Lainchan administration on IRC at #lainchan on Freenode.

Buy stickers here @@ -189,16 +30,16 @@

Monthly Funding Progress Bar

-

Cost per month $55

+

Cost per month {{ settings.monthlyamount }}

-

Funds from stickers $37.75

+

Funds from stickers {{ settings.currentamount }}

-
- +
-
$-19.25
+
{{ settings.currentprogress }}
diff --git a/templates/themes/donate/info.php b/templates/themes/donate/info.php index fa3f649b..2b618e89 100644 --- a/templates/themes/donate/info.php +++ b/templates/themes/donate/info.php @@ -17,7 +17,38 @@ $theme = array( array('title' => 'File', 'name' => 'file', 'type' => 'text', - 'default' => 'donate.html')), + 'default' => 'donate.html'), + + array('title' => 'Monthly Amount', + 'name' => 'monthlyamount', + 'type' => 'text', + 'default' => '$55'), + + array('title' => 'Current Amount', + 'name' => 'currentamount', + 'type' => 'text', + 'default' => '$0'), + + array('title' => 'Current Progress', + 'name' => 'currentprogress', + 'type' => 'text', + 'default' => '$0'), + + array('title' => 'Progress Bar CSS class', + 'name' => 'progressbarcssclass', + 'type' => 'text', + 'default' => 'progress-bar red glow'), + + array('title' => 'Progress Bar CSS left', + 'name' => 'progressbarcssleft', + 'type' => 'text', + 'default' => '36'), + + array('title' => 'Progress Bar Text CSS left', + 'name' => 'progressbartextcssleft', + 'type' => 'text', + 'default' => '135'), + ), 'build_function' => 'donate_build'); ?> diff --git a/templates/themes/irc/info.php b/templates/themes/irc/info.php index 8b31b011..59ff4bd6 100644 --- a/templates/themes/irc/info.php +++ b/templates/themes/irc/info.php @@ -17,7 +17,12 @@ $theme = array( array('title' => 'File', 'name' => 'file', 'type' => 'text', - 'default' => 'irc.html')), + 'default' => 'irc.html'), + + array('title' => 'Channel', + 'name' => 'channel', + 'type' => 'text', + 'default' => 'lainchan')), 'build_function' => 'irc_build'); ?> diff --git a/templates/themes/irc/irc.html b/templates/themes/irc/irc.html index 2828b6e0..1766f426 100644 --- a/templates/themes/irc/irc.html +++ b/templates/themes/irc/irc.html @@ -22,8 +22,8 @@
-

Web Client - Point your own clients to #lainchan on irc.freenode.net.

- +

Web Client - Point your own clients to #{{ settings.channel }} on irc.freenode.net.

+
diff --git a/templates/themes/irc/radio.html b/templates/themes/irc/radio.html deleted file mode 100644 index 7f84134b..00000000 --- a/templates/themes/irc/radio.html +++ /dev/null @@ -1,29 +0,0 @@ -{% filter remove_whitespace %} - - - - - {{ settings.title }} - - - - - - -
- {{ boardlist.top }} -
- -
-

{{ settings.title }}

-
{{ settings.subtitle }}
-
- - -
-

Web Client - Point your own clients to #lainchan on irc.freenode.net.

- -
- - -{% endfilter %} diff --git a/templates/themes/radio/info.php b/templates/themes/radio/info.php index d6679733..2ae31fbd 100644 --- a/templates/themes/radio/info.php +++ b/templates/themes/radio/info.php @@ -17,7 +17,12 @@ $theme = array( array('title' => 'File', 'name' => 'file', 'type' => 'text', - 'default' => 'radio.html')), + 'default' => 'radio.html'), + + array('title' => 'Radio Status URL', + 'name' => 'radiostatus', + 'type' => 'text', + 'default' => '/radio_assets/status.xsl')), 'build_function' => 'radio_build'); -?> \ No newline at end of file +?> diff --git a/templates/themes/radio/radio.html b/templates/themes/radio/radio.html index b19d703a..3e16430e 100644 --- a/templates/themes/radio/radio.html +++ b/templates/themes/radio/radio.html @@ -16,7 +16,7 @@ $(document).ready(function(){ }); function check_status(){ -$.get("/radio_assets/status.xsl", function(data){ +$.get("{{ settings.radiostatus }}", function(data){ var el = $( '
' ); el.html(data); var sd = el.find(".streamdata"); -- cgit v1.3