favelaframes is nothing more than frameset AFAIC
This commit is contained in:
parent
1e92e678a6
commit
b1490bed31
@ -1,84 +0,0 @@
|
||||
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;
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<!-- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> -->
|
||||
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}">
|
||||
{% if settings.tryresponsive %}
|
||||
<script type="text/javascript" src="{{ config.additional_javascript_url }}js/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$().ready(function () {
|
||||
$(".botao-55").click(function () {
|
||||
$("iframe#sidebar").toggleClass("sidebar-vem");
|
||||
$("iframe#main").toggleClass("mainbar-pls");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
<style type="text/css">
|
||||
iframe {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 99%;
|
||||
position: absolute
|
||||
}
|
||||
iframe#sidebar {
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 15%
|
||||
}
|
||||
iframe#main {
|
||||
left: 15%;
|
||||
top: 0;
|
||||
width: 85%
|
||||
}
|
||||
iframe.sidebar-vem {
|
||||
left: 0!important;
|
||||
}
|
||||
iframe.mainbar-pls {
|
||||
left: 15%!important;
|
||||
}
|
||||
.botao-55 {
|
||||
position: fixed;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
cursor: pointer;
|
||||
background-color: #EEE;
|
||||
opacity: 0.3;
|
||||
display: none;
|
||||
border-radius: 3px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #B7C5D9;
|
||||
}
|
||||
.botao-55:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.span-55 {
|
||||
font-family: Verdana, Tahoma, sans-serif;
|
||||
font-size: 50px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
{% if settings.tryresponsive %}
|
||||
@media screen and (max-width: 767px) {
|
||||
.botao-55 {
|
||||
display: block;
|
||||
}
|
||||
iframe#sidebar {
|
||||
width: 45%;
|
||||
left: -45%;
|
||||
-webkit-transition: all 0.25s ease-out;
|
||||
-moz-transition: all 0.25s ease-out;
|
||||
-o-transition: all 0.25s ease-out;
|
||||
transition: all 0.25s ease-out;
|
||||
}
|
||||
iframe#main {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
-webkit-transition: all 0.25s ease-out;
|
||||
-moz-transition: all 0.25s ease-out;
|
||||
-o-transition: all 0.25s ease-out;
|
||||
transition: all 0.25s ease-out;
|
||||
}
|
||||
iframe.mainbar-pls {
|
||||
left: 45%!important;
|
||||
}
|
||||
iframe.sidebar-vem {
|
||||
left: 0!important;
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
<title>{{ settings.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="{{ settings.file_sidebar }}" id="sidebar" name="sidebar"></iframe>
|
||||
<iframe src="{{ settings.file_news }}" id="main" name="main"></iframe>
|
||||
<div class="botao-55">
|
||||
<span class="span-55">55</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,87 +0,0 @@
|
||||
<?php
|
||||
$theme = Array();
|
||||
|
||||
// Theme name
|
||||
$theme['name'] = 'Favelaframes';
|
||||
// Description (you can use Tinyboard markup here)
|
||||
$theme['description'] =
|
||||
'Use a basic frameset layout, with a list of boards and pages on a sidebar to the left of the page.
|
||||
|
||||
Users never have to leave the homepage; they can do all their browsing from the one page.';
|
||||
$theme['version'] = 'v0.1';
|
||||
|
||||
// Theme configuration
|
||||
$theme['config'] = Array();
|
||||
|
||||
$theme['config'][] = Array(
|
||||
'title' => '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';
|
||||
?>
|
@ -1,40 +0,0 @@
|
||||
{% filter remove_whitespace %}
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>{{ settings.title }}</title>
|
||||
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/>
|
||||
<link rel="stylesheet" media="screen" href="{{ config.uri_stylesheets }}{{ settings.css }}">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="favelito">
|
||||
<img src="{{ config.root }}static/favelito.png" alt="Favelito">
|
||||
</div>
|
||||
<h1 class="title">{{ settings.title }}</h1>
|
||||
<div class="subtitle">"{{ settings.subtitle }}"</div>
|
||||
</header>
|
||||
|
||||
<div class="news-content">
|
||||
{% if news|count == 0 %}
|
||||
<p style="text-align:center" class="unimportant">(No news to show.)</p>
|
||||
{% else %}
|
||||
{% for entry in news %}
|
||||
<h2 id="{{ entry.id }}">
|
||||
{% if entry.subject %}
|
||||
{{ entry.subject }}
|
||||
{% else %}
|
||||
<em>no subject</em>
|
||||
{% endif %}
|
||||
<span class="unimportant"> — by {{ entry.name }} at {{ entry.time|date(config.post_date) }}</span>
|
||||
</h2>
|
||||
<p>{{ entry.body }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2012 Tinyboard Development Group</p>
|
||||
</body>
|
||||
</html>
|
||||
{% endfilter %}
|
@ -1,38 +0,0 @@
|
||||
{% filter remove_whitespace %}
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>{{ settings.title }}</title>
|
||||
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/>
|
||||
<link rel="stylesheet" media="screen" href="{{ config.uri_stylesheets }}{{ settings.css }}">
|
||||
|
||||
<base target="main"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
<h2>{{ settings.title }}</h2>
|
||||
<div class="fav_irc">
|
||||
<h4>
|
||||
<a href="{{ settings.irc_url }}" target="_blank">{{ settings.irc_address }}</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
{% for category, boards in categories %}
|
||||
<h3>
|
||||
{{ category }}
|
||||
</h3>
|
||||
<div id="{{ category }}" class="fav_category_div">
|
||||
<ul class="fav_nav">
|
||||
{% for board in boards %}
|
||||
<li>
|
||||
<a href="{{ board.uri }}">/{{ board.uri }} - {{ board.title|e }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% endfilter %}
|
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
require 'info.php';
|
||||
|
||||
function favelaframes_build($action, $settings, $board) {
|
||||
// Possible values for $action:
|
||||
// - all (rebuild everything, initialization)
|
||||
// - news (news has been updated)
|
||||
// - boards (board list changed)
|
||||
|
||||
Favelaframes::build($action, $settings);
|
||||
}
|
||||
|
||||
// Wrap functions in a class so they don't interfere with normal Tinyboard operations
|
||||
class Favelaframes {
|
||||
public static function build($action, $settings) {
|
||||
global $config;
|
||||
|
||||
if ($action == 'all') {
|
||||
copy('templates/themes/favelaframes/favelaframes.css', $config['dir']['home'] . 'stylesheets/' . $settings['css']);
|
||||
file_write($config['dir']['home'] . $settings['file_main'], Favelaframes::homepage($settings));
|
||||
}
|
||||
|
||||
if ($action == 'all' || $action == 'boards')
|
||||
file_write($config['dir']['home'] . $settings['file_sidebar'], Favelaframes::sidebar($settings));
|
||||
|
||||
if ($action == 'all' || $action == 'news')
|
||||
file_write($config['dir']['home'] . $settings['file_news'], Favelaframes::news($settings));
|
||||
}
|
||||
|
||||
// Build homepage
|
||||
public static function homepage($settings) {
|
||||
global $config;
|
||||
|
||||
return Element('themes/favelaframes/frames.html', Array('config' => $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
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
?>
|
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB |
Loading…
Reference in New Issue
Block a user