diff options
| author | Michael Walker <mike@barrucadu.co.uk> | 2015-09-12 21:29:33 +0100 |
|---|---|---|
| committer | Michael Walker <mike@barrucadu.co.uk> | 2015-09-12 21:29:33 +0100 |
| commit | 6335ff308b501e4afdf7c2a4525db536963d0d4d (patch) | |
| tree | 98de06b7b42594a00f8d75b65a3ca9f8c284316a /templates | |
| parent | 67d242a7af83db94e19e666755b2b98db07b21dc (diff) | |
Add zine theme
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/themes/zine/info.php | 23 | ||||
| -rw-r--r-- | templates/themes/zine/theme.php | 28 | ||||
| -rw-r--r-- | templates/themes/zine/thumb.png | bin | 0 -> 9098 bytes | |||
| -rwxr-xr-x | templates/themes/zine/zine.html | 68 |
4 files changed, 119 insertions, 0 deletions
diff --git a/templates/themes/zine/info.php b/templates/themes/zine/info.php new file mode 100644 index 00000000..d7dabef5 --- /dev/null +++ b/templates/themes/zine/info.php @@ -0,0 +1,23 @@ +<?php +$theme = array( + 'name' => 'Zine', + 'description' => 'sex on digital paper', + 'version' => 'v9001', + + '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' => 'zine/index.html')), + + 'build_function' => 'zine_build'); +?> diff --git a/templates/themes/zine/theme.php b/templates/themes/zine/theme.php new file mode 100644 index 00000000..78cb780c --- /dev/null +++ b/templates/themes/zine/theme.php @@ -0,0 +1,28 @@ +<?php + +require 'info.php'; + +function zine_build($action, $settings, $board) { + zine::build($action, $settings); +} + +class zine { + public static function build($action, $settings) { + global $config; + + if ($action == 'all') { + file_write($config['dir']['home'] . $settings['file'], zine::install($settings)); + } + } + + public static function install($settings) { + global $config; + + return Element('themes/zine/zine.html', + array('settings' => $settings, + 'config' => $config, + 'boardlist' => createBoardlist())); + } +} + +?> diff --git a/templates/themes/zine/thumb.png b/templates/themes/zine/thumb.png Binary files differnew file mode 100644 index 00000000..f3f88e27 --- /dev/null +++ b/templates/themes/zine/thumb.png diff --git a/templates/themes/zine/zine.html b/templates/themes/zine/zine.html new file mode 100755 index 00000000..bf4f6dac --- /dev/null +++ b/templates/themes/zine/zine.html @@ -0,0 +1,68 @@ +{% 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"/> + {% if config.font_awesome %}<link rel="stylesheet" href="{{ config.root }}{{ config.font_awesome_css }}">{% endif %} + <style type="text/css"> + [alt="mascot"] { + margin: 0px auto -200px auto!important; + } + [alt="special mascot"] { + width: 100%; + margin: -3px 0px 0px 0px; + } + h2 { + padding: 3px 0px!important; + } + h2 span { + margin-left: 7px; + } + .ban { + min-width: 208px; + } + .ban .cont { + + padding: 0px 7px; + margin: 7px auto 0px auto; + text-align: center; + } + .ban a { + max-width: 192px; + display: inline-block; + text-align: center; + border-radius: 2px; + border: 1px solid #555; + background: #333; + margin: 0px 2px 7px 2px; + } + a img { + max-width: 192px; + height: auto; + } + </style> + </head> + <body> + <div class="bar top">{{ boardlist.top }}</div> + <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"> + <h2> + <img alt="special mascot" src="/static/zine_ipad.png"/> + <span>download</span> + </h2> + <div class="cont"> + <a href="2015-04-20.pdf"><img src="2015-04-20.jpg"/><br/><span>01</span></a> + <a href="2015-08-28.pdf"><img src="2015-08-28.jpg"/><br/><span>02</span></a> + </div> + </div> + </body> +</html> +{% endfilter %} |
