summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMichael Walker <mike@barrucadu.co.uk>2014-09-28 19:43:15 +0000
committerMichael Walker <mike@barrucadu.co.uk>2014-09-28 23:05:57 +0000
commit3cd0a6093ca3b028a57dd62e0fc35ed56fd4fdfa (patch)
tree2460244a51ea44736f57a38c8667fa46a9770a7d /templates
parent81bfe2e910d5c6fbe69e5e11cfc3d3003660b173 (diff)
Add radio page
Diffstat (limited to 'templates')
-rw-r--r--templates/themes/radio/info.php23
-rw-r--r--templates/themes/radio/radio.html52
-rw-r--r--templates/themes/radio/theme.php27
-rw-r--r--templates/themes/radio/thumb.pngbin0 -> 10730 bytes
4 files changed, 102 insertions, 0 deletions
diff --git a/templates/themes/radio/info.php b/templates/themes/radio/info.php
new file mode 100644
index 00000000..d6679733
--- /dev/null
+++ b/templates/themes/radio/info.php
@@ -0,0 +1,23 @@
+<?php
+$theme = array(
+ 'name' => 'Radio',
+ 'description' => 'Display a link to the lainchan radio',
+ 'version' => 'v1',
+
+ 'config' => array(
+ array('title' => 'Page title',
+ 'name' => 'title',
+ 'type' => 'text'),
+
+ array('title' => 'Slogan',
+ 'name' => 'subtitle',
+ 'type' => 'text',
+ 'comment' => '(optional)'),
+
+ array('title' => 'File',
+ 'name' => 'file',
+ 'type' => 'text',
+ 'default' => 'radio.html')),
+
+ 'build_function' => 'radio_build');
+?> \ No newline at end of file
diff --git a/templates/themes/radio/radio.html b/templates/themes/radio/radio.html
new file mode 100644
index 00000000..7976bb7d
--- /dev/null
+++ b/templates/themes/radio/radio.html
@@ -0,0 +1,52 @@
+{% filter remove_whitespace %}
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <title>{{ settings.title }}</title>
+ <link rel="shortcut icon" href="/favicon.png">
+ <link rel="stylesheet" media="screen" href="/stylesheets/style.css"/>
+ <link rel="stylesheet" media="screen" href="/stylesheets/dark.css"/>
+ </head>
+ <body>
+ {{ boardlist.top }}
+
+ <header>
+ <h1>{{ settings.title }}</h1>
+ <div class="subtitle">{{ settings.subtitle }}</div>
+ </header>
+
+ <img alt="mascot" src="static/lain_is_cute_datass_small.png"/>
+
+ <div class="ban" style="text-align: left!important;">
+ <h2>WELCOME TO CYBERIA</h2>
+
+ <p>Welcome to lainchan's very own internet radio!<br/>Statistics
+ about this stream such as current listeners, song title, et
+ cetera, can currently be found
+ at <a href="http://radio.lain.io/">radio.lain.io</a>; they will
+ soon be added to this page.
+ </p>
+
+ <p><strong>NOTE:</strong> Some experimental browsers, namely
+ very recent versions of Chromium, have been known to break with
+ OGG streams. If your connection is choppy, try a either running
+ the stream in a different browser, or opening one of the
+ playlists in a media player:</p>
+
+ <ul>
+ <li><a href="http://radio.lain.io/stream/lainchan.m3u">M3U Playlist</a></li>
+ <li><a href="http://radio.lain.io/stream/lainchan.xspf">XPSF Playlist</a></li>
+ </ul>
+
+ <audio controls=""
+ preload="none"
+ src="http://radio.lain.io/stream/lainchan"
+ type="application/ogg"
+ style="margin: 0 5%; width: 90%; box-shadow: 0px 0px 5px black;">
+ <em>Your browser lacks support for OGG Vorbis files. Please open the M3U file or XSPF file in a multimedia player.</em>
+ </audio>
+ </div>
+ </body>
+</html>
+{% endfilter %}
diff --git a/templates/themes/radio/theme.php b/templates/themes/radio/theme.php
new file mode 100644
index 00000000..e1244e6f
--- /dev/null
+++ b/templates/themes/radio/theme.php
@@ -0,0 +1,27 @@
+<?php
+require 'info.php';
+
+function radio_build($action, $settings, $board) {
+ radio::build($action, $settings);
+}
+
+class radio {
+ public static function build($action, $settings) {
+ global $config;
+
+ if ($action == 'all') {
+ file_write($config['dir']['home'] . $settings['file'], radio::install($settings));
+ }
+ }
+
+ public static function install($settings) {
+ global $config;
+
+ return Element('themes/radio/radio.html',
+ array('settings' => $settings,
+ 'config' => $config,
+ 'boardlist' => createBoardlist()));
+ }
+}
+
+?>
diff --git a/templates/themes/radio/thumb.png b/templates/themes/radio/thumb.png
new file mode 100644
index 00000000..0988ca68
--- /dev/null
+++ b/templates/themes/radio/thumb.png
Binary files differ