diff --git a/templates/themes/favelaframes/favelaframes.css b/templates/themes/favelaframes/favelaframes.css new file mode 100644 index 00000000..5f0f0db6 --- /dev/null +++ b/templates/themes/favelaframes/favelaframes.css @@ -0,0 +1,84 @@ +body { + font-family: sans-serif; + background: none repeat scroll 0 0 #EEFDFF; + font-size: 12px; + margin: 6px; + padding: 0; +} + +h1.title { + font-family: Verdana, Tahoma, sans-serif; + font-size: 23px; + color: #333300; + margin-top: 1em; + background: none; + letter-spacing: normal; +} + +header div.subtitle { + font-family: Verdana, Tahoma, sans-serif; + color: #333300; + font-weight: normal; + font-size: medium; + font-style: italic; +} + +div.favelito { + text-align: center; +} + +.favelito { + display: block; + height: auto; + max-width: 100%; + vertical-align: middle; +} + +div.news-content { + margin-left: 1em; + text-align: justify; +} + +h2 { + color: #000; + background: #D6F0E4; +} + +div.sidebar h2 { + font-family: Verdana, Tahoma, sans-serif; + font-size: 18px; +} + +div.sidebar h3 { + margin: 0; + background: #D6F0E4; + font-size: 100% +} + +div.fav_irc h4 { + font-family: Verdana, Tahoma, sans-serif; + margin: 0; + font-size: 10px; + background: #D6F0E4; +} + +div.fav_irc h4 a { + color: #FF7800; + text-decoration: none; + vertical-align: top; +} + +ul.fav_nav { + margin-top: 0; + padding: 0; + list-style: none; +} + +ul.fav_nav a { + text-decoration: none; + color: #555500; +} + +.sidebar a:hover { + text-decoration: underline; +} \ No newline at end of file diff --git a/templates/themes/favelaframes/frames.html b/templates/themes/favelaframes/frames.html new file mode 100644 index 00000000..ccbd377e --- /dev/null +++ b/templates/themes/favelaframes/frames.html @@ -0,0 +1,102 @@ + + + + + + + {% if settings.tryresponsive %} + + + {% endif %} + + {{ settings.title }} + + + + +
+ 55 +
+ + diff --git a/templates/themes/favelaframes/info.php b/templates/themes/favelaframes/info.php new file mode 100644 index 00000000..b82a2b6d --- /dev/null +++ b/templates/themes/favelaframes/info.php @@ -0,0 +1,87 @@ + 'Site title', + 'name' => 'title', + 'type' => 'text' + ); + + $theme['config'][] = Array( + 'title' => 'Slogan', + 'name' => 'subtitle', + 'type' => 'text', + 'comment' => '(optional)' + ); + + $theme['config'][] = Array( + 'title' => 'Main HTML file', + 'name' => 'file_main', + 'type' => 'text', + 'default' => $config['file_index'], + 'comment' => '(eg. "index.html")' + ); + + $theme['config'][] = Array( + 'title' => 'Sidebar file', + 'name' => 'file_sidebar', + 'type' => 'text', + 'default' => 'sidebar.html', + 'comment' => '(eg. "sidebar.html")' + ); + + $theme['config'][] = Array( + 'title' => 'News file', + 'name' => 'file_news', + 'type' => 'text', + 'default' => 'news.html', + 'comment' => '(eg. "news.html")' + ); + + $theme['config'][] = Array( + 'title' => 'IRC url', + 'name' => 'irc_url', + 'type' => 'text', + 'default' => 'http://qchat.rizon.net/?nick=Anao.&channels=55ch&uio=d4', + 'comment' => '(optional) Link to IRC channel' + ); + + $theme['config'][] = Array( + 'title' => 'IRC address', + 'name' => 'irc_address', + 'type' => 'text', + 'default' => '#55ch@rizon.net', + 'comment' => '(optional) IRC channel address to appear as a label to the url entered above' + ); + + $theme['config'][] = Array( + 'title' => 'CSS file', + 'name' => 'css', + 'type' => 'text', + 'default' => 'favelaframes.css', + 'comment' => '(eg. "favelaframes.css")' + ); + + $theme['config'][] = Array( + 'title' => 'Try the little responsive thingy thing', + 'name' => 'tryresponsive', + 'type' => 'checkbox', + 'default' => true, + 'comment' => 'With this checked, the menu frame will become collapsible when viewport width is under 767px.' + ); + + // Unique function name for building everything + $theme['build_function'] = 'favelaframes_build'; +?> diff --git a/templates/themes/favelaframes/news.html b/templates/themes/favelaframes/news.html new file mode 100644 index 00000000..2b32a78b --- /dev/null +++ b/templates/themes/favelaframes/news.html @@ -0,0 +1,40 @@ +{% filter remove_whitespace %} + + + + + {{ settings.title }} + + + + +
+
+ Favelito +
+

{{ settings.title }}

+
"{{ settings.subtitle }}"
+
+ +
+ {% if news|count == 0 %} +

(No news to show.)

+ {% else %} + {% for entry in news %} +

+ {% if entry.subject %} + {{ entry.subject }} + {% else %} + no subject + {% endif %} + — by {{ entry.name }} at {{ entry.time|date(config.post_date) }} +

+

{{ entry.body }}

+ {% endfor %} + {% endif %} +
+ +

Powered by Tinyboard {{ config.version }} | Tinyboard Copyright © 2010-2012 Tinyboard Development Group

+ + +{% endfilter %} diff --git a/templates/themes/favelaframes/sidebar.html b/templates/themes/favelaframes/sidebar.html new file mode 100644 index 00000000..5ee84d80 --- /dev/null +++ b/templates/themes/favelaframes/sidebar.html @@ -0,0 +1,38 @@ +{% filter remove_whitespace %} + + + + + {{ settings.title }} + + + + + + + + + +{% endfilter %} diff --git a/templates/themes/favelaframes/theme.php b/templates/themes/favelaframes/theme.php new file mode 100644 index 00000000..d31a324e --- /dev/null +++ b/templates/themes/favelaframes/theme.php @@ -0,0 +1,74 @@ + $config, 'settings' => $settings)); + } + + // Build news page + public static function news($settings) { + global $config; + + $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error()); + $news = $query->fetchAll(PDO::FETCH_ASSOC); + + return Element('themes/favelaframes/news.html', Array( + 'settings' => $settings, + 'config' => $config, + 'news' => $news + )); + } + + // Build sidebar + public static function sidebar($settings) { + global $config, $board; + + $categories = $config['categories']; + + foreach ($categories as &$boards) { + foreach ($boards as &$board) { + $title = boardTitle($board); + if (!$title) + $title = $board; // board doesn't exist, but for some reason you want to display it anyway + $board = Array('title' => $title, 'uri' => sprintf($config['board_path'], $board)); + } + } + + return Element('themes/favelaframes/sidebar.html', Array( + 'settings' => $settings, + 'config' => $config, + 'categories' => $categories + )); + } + }; + +?> diff --git a/templates/themes/favelaframes/thumb.png b/templates/themes/favelaframes/thumb.png new file mode 100644 index 00000000..df18a8e9 Binary files /dev/null and b/templates/themes/favelaframes/thumb.png differ