Browse Source

catalog theme: integrate with the styling framework of tinyboard; allow for js

pull/40/head
czaks 10 years ago
parent
commit
c918953d33
  1. 29
      stylesheets/style.css
  2. 42
      templates/themes/catalog/catalog.css
  3. 14
      templates/themes/catalog/catalog.html
  4. 8
      templates/themes/catalog/info.php
  5. 2
      templates/themes/catalog/theme.php

29
stylesheets/style.css

@ -485,3 +485,32 @@ form.ban-appeal {
form.ban-appeal textarea {
display: block;
}
.theme-catalog img {
float:none!important;
margin: auto;
margin-bottom: 12px;
max-height: 150px;
max-width: 200px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.55);
border: 2px solid rgba(153, 153, 153, 0);
}
.theme-catalog div.thread {
display: inline-block;
vertical-align: top;
margin-bottom:25px;
margin-left: 20px;
margin-right: 15px;
text-align:center;
font-weight:normal;
width:205px;
overflow:hidden;
position: relative;
font-size:11px;
padding: 15px;
max-height:300px;
background: rgba(182, 182, 182, 0.12);
border: 2px solid rgba(111, 111, 111, 0.34);
}
.theme-catalog strong {
display: block;
}

42
templates/themes/catalog/catalog.css

@ -1,42 +0,0 @@
img {
float:none!important;
margin: auto;
margin-bottom: 12px;
max-height: 150px;
max-width: 200px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.55);
border: 2px solid rgba(153, 153, 153, 0);
}
/*
img:hover {
border: 2px solid rgba(153, 153, 153, 0.27);
}
*/
div.thread {
display: inline-block;
vertical-align: top;
margin-bottom:25px;
margin-left: 20px;
margin-right: 15px;
text-align:center;
font-weight:normal;
width:205px;
overflow:hidden;
position: relative;
font-size:11px;
padding: 15px;
background: rgba(182, 182, 182, 0.12);
border: 2px solid rgba(111, 111, 111, 0.34);
max-height:300px;
}
div.thread:hover {
background: #D6DAF0;
border-color: #B7C5D9;
}
strong {
display: block;
}

14
templates/themes/catalog/catalog.html

@ -3,18 +3,19 @@
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script type='text/javascript'>
active_page = "catalog";
</script>
{% include 'header.html' %}
<title>{{ settings.title }}</title>
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/>
<link rel="stylesheet" media="screen" href="{{ config.root }}{{ settings.css }}"/>
{% if config.url_favicon %}<link rel="shortcut icon" href="{{ config.url_favicon }}" />{% endif %}
</head>
<body>
<body class="theme-catalog">
{{ boardlist.top }}
<header>
<h1>{{ settings.title }} (<a href="{{link}}">/{{ board }}/</a>)</h1>
<div class="subtitle">{{ settings.subtitle }}</div>
</header>
<hr/>
<ul>
{% for post in recent_posts %}
<div class="thread">
@ -31,6 +32,9 @@
<hr/>
<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 &copy; 2010-2013 Tinyboard Development Group</p>
<script type="text/javascript">
ready();
</script>
</body>
</html>
{% endfilter %}

8
templates/themes/catalog/info.php

@ -30,14 +30,6 @@
'default' => implode(' ', $__default_boards)
);
$theme['config'][] = Array(
'title' => 'CSS file',
'name' => 'css',
'type' => 'text',
'default' => 'catalog.css',
'comment' => '(eg. "catalog.css")'
);
$theme['config'][] = Array(
'title' => 'Update on new posts',
'name' => 'update_on_posts',

2
templates/themes/catalog/theme.php

@ -14,8 +14,6 @@
$boards = explode(' ', $settings['boards']);
if ($action == 'all') {
copy('templates/themes/catalog/catalog.css', $config['dir']['home'] . $settings['css']);
foreach ($boards as $board) {
$b = new Catalog();
$b->build($settings, $board);

Loading…
Cancel
Save