Initial commit of 'Lite' theme
This commit is contained in:
parent
cd3976821c
commit
556b3866a6
11 changed files with 2425 additions and 0 deletions
BIN
themes/lite/circle-bl.png
Normal file
BIN
themes/lite/circle-bl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 B |
BIN
themes/lite/circle-br.png
Normal file
BIN
themes/lite/circle-br.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 B |
BIN
themes/lite/circle-tl.png
Normal file
BIN
themes/lite/circle-tl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 B |
BIN
themes/lite/circle-tr.png
Normal file
BIN
themes/lite/circle-tr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 111 B |
12
themes/lite/comment.theme.php
Normal file
12
themes/lite/comment.theme.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
class CustomCommentListTheme extends CommentListTheme {
|
||||
protected function comment_to_html($comment, $trim=false) {
|
||||
return $this->rr(parent::comment_to_html($comment, $trim));
|
||||
}
|
||||
|
||||
protected function build_postbox($image_id) {
|
||||
return $this->rr(parent::build_postbox($image_id));
|
||||
}
|
||||
}
|
||||
?>
|
247
themes/lite/layout.class.php
Normal file
247
themes/lite/layout.class.php
Normal file
|
@ -0,0 +1,247 @@
|
|||
<?php
|
||||
/**
|
||||
* Name: Lite Theme
|
||||
* Author: Zach Hall <zach@sosguy.net>
|
||||
* Link: http://seemslegit.com
|
||||
* License: GPLv2
|
||||
* Description: A mashup of Default, Danbooru, the interface on qwebirc, and
|
||||
* some other sites, packaged in a light blue color.
|
||||
*/
|
||||
class Layout {
|
||||
/**
|
||||
* turns the Page into HTML
|
||||
*/
|
||||
public function display_page(Page $page) {
|
||||
global $config;
|
||||
|
||||
$theme_name = $config->get_string('theme', 'lite');
|
||||
$site_name = $config->get_string('title');
|
||||
$data_href = get_base_href();
|
||||
$contact_link = $config->get_string('contact_link');
|
||||
|
||||
$header_html = "";
|
||||
foreach($page->headers as $line) {
|
||||
$header_html .= "\t\t$line\n";
|
||||
}
|
||||
|
||||
$menu = "<div class='menu'>
|
||||
<script type='text/javascript' src='$data_href/themes/$theme_name/wz_tooltip.js'></script>
|
||||
<a href='".make_link()."' onmouseover='Tip('{$page->title}', BGCOLOR, '#C3D2E0', FADEIN, 100)' onmouseout='UnTip()'><img src='http://localhost/favicon.ico' style='position: relative; top: 3px;'></a>
|
||||
<b>{$site_name}</b> ";
|
||||
|
||||
// Custom links: These appear on the menu.
|
||||
$custom_links = "";
|
||||
$custom_links .= $this->navlinks(make_link('user'), "Account", array("user", "setup", "admin", "profile"));
|
||||
$custom_links .= $this->navlinks(make_link('post/list'), "Posts", array("post", "view"));
|
||||
$custom_links .= $this->navlinks(make_link('comment/list'), "Comments", array("comment"));
|
||||
$custom_links .= $this->navlinks(make_link('tags'), "Tags", array("tags"));
|
||||
$custom_links .= $this->navlinks(make_link('upload'), "Upload", array("upload"));
|
||||
if(class_exists("Wiki")) {
|
||||
$custom_links .= $this->navlinks(make_link('wiki/rules'), "Rules", array("wiki/rules"));
|
||||
$custom_links .= $this->navlinks(make_link('wiki'), "Wiki", array("wiki"));
|
||||
}
|
||||
$menu .= "$custom_links</div>";
|
||||
|
||||
$custom_sublinks = "<div class='sbar'>";
|
||||
$cs = null;
|
||||
// hack
|
||||
global $user;
|
||||
$username = url_escape($user->name);
|
||||
// hack
|
||||
$qp = _get_query_parts();
|
||||
$hw = class_exists("Wiki");
|
||||
// php sucks
|
||||
switch($qp[0]) {
|
||||
default:
|
||||
$cs = null;
|
||||
break;
|
||||
case "":
|
||||
# FIXME: this assumes that the front page is
|
||||
# post/list; in 99% of case it will either be
|
||||
# post/list or home, and in the latter case
|
||||
# the subnav links aren't shown, but it would
|
||||
# be nice to be correct
|
||||
case "post":
|
||||
$cs .= "<a class='tab' href='".make_link('post/list')."'>All</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("post/list/favorited_by=$username/1")."'>My Favorites</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('rss/images')."'>Feed</a>";
|
||||
if($hw) $cs .= "<a class='tab' href='".make_link("wiki/posts")."'>Help</a>";
|
||||
break;
|
||||
case "comment":
|
||||
$cs .= "<a class='tab' href='".make_link('comment/list')."'>All</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('rss/comments')."'>Feed</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("ext_doc/comment")."'>Help</a>";
|
||||
break;
|
||||
case "pool":
|
||||
$cs .= "<a class='tab' href='".make_link('pool/list')."'>List</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("pool/new")."'>Create</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("pool/updated")."'>Changes</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("ext_doc/pools")."'>Help</a>";
|
||||
break;
|
||||
case "wiki":
|
||||
$cs .= "<a class='tab' href='".make_link('wiki')."'>Index</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("wiki/rules")."'>Rules</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("ext_doc/wiki")."'>Help</a>";
|
||||
break;
|
||||
case "tags":
|
||||
case "alias":
|
||||
$cs .= "<a class='tab' href='".make_link('tags/map')."'>Map</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('tags/alphabetic')."'>Alphabetic</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('tags/popularity')."'>Popularity</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('tags/categories')."'>Categories</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('alias/list')."'>Aliases</a>";
|
||||
$cs .= "<a class='tab' href='".make_link("ext_doc/tag_edit")."'>Help</a>";
|
||||
break;
|
||||
case "upload":
|
||||
if($hw) $cs .= "<a class='tab' href='".make_link("wiki/upload_guidelines")."'>Guidelines</a>";
|
||||
break;
|
||||
case "random":
|
||||
$cs .= "<a class='tab' href='".make_link('random/view')."'>Shuffle</a>";
|
||||
$cs .= "<a class='tab' href='".make_link('random/download')."'>Download</a>";
|
||||
break;
|
||||
case "featured":
|
||||
$cs .= "<a class='tab' href='".make_link('featured/download')."'>Download</a>";
|
||||
break;
|
||||
}
|
||||
if(is_null($cs)) {$custom_sublinks = "";} else {
|
||||
$custom_sublinks .= "$cs</div>";}
|
||||
$left_block_html = "";
|
||||
$main_block_html = "";
|
||||
$sub_block_html = "";
|
||||
|
||||
foreach($page->blocks as $block) {
|
||||
switch($block->section) {
|
||||
case "left":
|
||||
$left_block_html .= $this->block_to_html($block, true, "left");
|
||||
break;
|
||||
case "main":
|
||||
$main_block_html .= $this->block_to_html($block, false, "main");
|
||||
break;
|
||||
case "user":
|
||||
$user_block_html .= $block->body;
|
||||
break;
|
||||
case "subheading":
|
||||
$sub_block_html .= $this->block_to_html($block, false, "main");
|
||||
break;
|
||||
default:
|
||||
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$debug = get_debug_info();
|
||||
|
||||
$contact = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a>";
|
||||
$subheading = empty($page->subheading) ? "" : "<div id='subtitle'>{$page->subheading}</div>";
|
||||
|
||||
$wrapper = "";
|
||||
if(strlen($page->heading) > 100) {
|
||||
$wrapper = ' style="height: 3em; overflow: auto;"';
|
||||
}
|
||||
|
||||
print <<<EOD
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>{$page->title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
$header_html
|
||||
</head>
|
||||
|
||||
<body>
|
||||
$menu
|
||||
$custom_sublinks
|
||||
$subheading
|
||||
$sub_block_html
|
||||
|
||||
<div id="nav">$left_block_html</div>
|
||||
<div id="body">$main_block_html</div>
|
||||
|
||||
<div id="footer">
|
||||
Images © their respective owners,
|
||||
<a href="http://code.shishnet.org/shimmie2/">Shimmie</a> ©
|
||||
<a href="http://www.shishnet.org/">Shish</a> & Co 2007-2010,
|
||||
based on the Danbooru concept.<br />
|
||||
<a href="http://github.com/zshall/shimmie2/">Lite Theme</a> by <a href="http://seemslegit.com">Zach</a>, based on Default, Danbooru, and <a href="http://qwebirc.org/">qwebirc</a>
|
||||
$debug
|
||||
$contact
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOD;
|
||||
}
|
||||
|
||||
/**
|
||||
* A handy function which does exactly what it says in the method name
|
||||
*/
|
||||
private function block_to_html($block, $hidable=false, $salt="") {
|
||||
$h = $block->header;
|
||||
$b = $block->body;
|
||||
$html = "";
|
||||
$i = str_replace(' ', '_', $h) . $salt;
|
||||
if($hidable) $html .= "
|
||||
<script><!--
|
||||
$(document).ready(function() {
|
||||
$(\"#$i-toggle\").click(function() {
|
||||
$(\"#$i\").slideToggle(\"slow\", function() {
|
||||
if($(\"#$i\").is(\":hidden\")) {
|
||||
$.cookie(\"$i-hidden\", 'true', {path: '/'});
|
||||
}
|
||||
else {
|
||||
$.cookie(\"$i-hidden\", 'false', {path: '/'});
|
||||
}
|
||||
});
|
||||
});
|
||||
if($.cookie(\"$i-hidden\") == 'true') {
|
||||
$(\"#$i\").hide();
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
";
|
||||
if(!is_null($h)) {
|
||||
if($salt == "main") {
|
||||
$html .= "<div class='maintop navside tab' id='$i-toggle'>$h</div>";
|
||||
} else {
|
||||
$html .= "<div class='navtop navside tab' id='$i-toggle'>$h</div>";
|
||||
}
|
||||
}
|
||||
if(!is_null($b)) {
|
||||
//if(strpos($b, "rrcontent")) {
|
||||
if($salt =="main") {
|
||||
$html .= "<div class='blockbody' id='$i'>$b</div>";
|
||||
}
|
||||
else {
|
||||
$html .= "
|
||||
<div class='navside tab' id='$i'>$b</div>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
private function navlinks($link, $desc, $pages_matched) {
|
||||
/**
|
||||
* Woo! We can actually SEE THE CURRENT PAGE!!
|
||||
*/
|
||||
$html = null;
|
||||
$url = $_GET['q'];
|
||||
|
||||
$re1='.*?';
|
||||
$re2='((?:[a-z][a-z]+))';
|
||||
|
||||
if ($c=preg_match_all ("/".$re1.$re2."/is", $url, $matches)) {
|
||||
$url=$matches[1][0];
|
||||
}
|
||||
|
||||
for($i=0;$i<count($pages_matched);$i++) {
|
||||
if($url == $pages_matched[$i]) {
|
||||
$html = "<a class='tab-selected' href='$link'>$desc</a>";
|
||||
}
|
||||
}
|
||||
if(is_null($html)) {$html = "<a class='tab' href='$link'>$desc</a>";}
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
?>
|
37
themes/lite/setup.theme.php
Normal file
37
themes/lite/setup.theme.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
/**
|
||||
* A customised version of the Setup theme
|
||||
*/
|
||||
class CustomSetupTheme extends SetupTheme {
|
||||
protected function sb_to_html(SetupBlock $block) {
|
||||
$h = $block->header;
|
||||
$b = $block->body;
|
||||
$i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
|
||||
$html = "
|
||||
<script><!--
|
||||
$(document).ready(function() {
|
||||
$(\"#$i-toggle\").click(function() {
|
||||
$(\"#$i\").slideToggle(\"slow\", function() {
|
||||
if($(\"#$i\").is(\":hidden\")) {
|
||||
$.cookie(\"$i-hidden\", 'true', {path: '/'});
|
||||
}
|
||||
else {
|
||||
$.cookie(\"$i-hidden\", 'false', {path: '/'});
|
||||
}
|
||||
});
|
||||
});
|
||||
if($.cookie(\"$i-hidden\") == 'true') {
|
||||
$(\"#$i\").hide();
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
<div class='setupblock'>
|
||||
<b id='$i-toggle'>$h</b>
|
||||
<br><div id='$i'>$b</div>
|
||||
</div>
|
||||
";
|
||||
|
||||
return $this->rr($html);
|
||||
}
|
||||
}
|
||||
?>
|
358
themes/lite/style.css
Normal file
358
themes/lite/style.css
Normal file
|
@ -0,0 +1,358 @@
|
|||
BODY {
|
||||
background: #F0F7FF;
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0px;
|
||||
}
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
3 menu bar *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
.menu {
|
||||
border-bottom: 1px solid #C3D2E0;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding: 4px;
|
||||
background: #E3EFFA;
|
||||
}
|
||||
a.tab, a.tab:visited {
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
}
|
||||
a.tab:hover, a.tab:active {
|
||||
color:#000000;
|
||||
background-color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.tab {
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
border:1px solid #C8D1DB;
|
||||
padding:4px;
|
||||
cursor:default;
|
||||
margin-right:2px;
|
||||
padding:2px;
|
||||
}
|
||||
.tab-selected {
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
padding:2px;
|
||||
background:none repeat scroll 0 0 #FFFFFE;
|
||||
border:1px solid #C8D1DB;
|
||||
color:#333333;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
3 secondary bars *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
.sbar {
|
||||
border-bottom: 1px solid #C3D2E0;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 16px;
|
||||
padding: 4px;
|
||||
background: #CEDFF0;
|
||||
text-align: left;
|
||||
}
|
||||
.sfoot {
|
||||
border-top: 1px solid #C3D2E0;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding: 4px;
|
||||
background: #CEDFF0;
|
||||
text-align: right;
|
||||
}
|
||||
.navside {
|
||||
background:none repeat scroll 0 0 #CEDFF0;
|
||||
text-align:left;
|
||||
padding:4px;
|
||||
font-size:85%;
|
||||
border:1px solid #C3D2E0;
|
||||
margin-bottom:5px;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
}
|
||||
.highlighted {
|
||||
background:none repeat scroll 0 0 #CEDFF0;
|
||||
padding:4px;
|
||||
border:1px solid #C3D2E0;
|
||||
margin:5px;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
}
|
||||
.navtop, .maintop {
|
||||
font-size:110%;
|
||||
border-bottom:0 none;
|
||||
margin:0 0 0 0;
|
||||
padding:2px 10px;
|
||||
position:relative;
|
||||
left:0px;
|
||||
width:50%;
|
||||
}
|
||||
.navtop {
|
||||
top:5px;
|
||||
}
|
||||
.maintop {
|
||||
top:0px;
|
||||
margin-top:5px;
|
||||
margin-bottom:5px;
|
||||
}
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
3 things common to all pages *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
H1 A {
|
||||
color: black;
|
||||
}
|
||||
A, A:hover, A:active, A:visited {
|
||||
color: #2860AD;
|
||||
}
|
||||
H3 {
|
||||
text-align: center;
|
||||
margin: 0px;
|
||||
}
|
||||
THEAD {
|
||||
font-weight: bold;
|
||||
}
|
||||
TD {
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
CODE {
|
||||
background: #DEDEDE;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#subtitle {
|
||||
width: 256px;
|
||||
font-size: 0.75em;
|
||||
margin: auto;
|
||||
margin-top: -16px;
|
||||
text-align: center;
|
||||
border: 1px solid black;
|
||||
border-top: none;
|
||||
background: #DDD;
|
||||
}
|
||||
#body SELECT {width: 150px;}
|
||||
TD>INPUT[type="submit"] {width: 100%;}
|
||||
TD>INPUT[type="text"] {width: 100%;}
|
||||
TD>INPUT[type="password"] {width: 100%;}
|
||||
TD>TEXTAREA {width: 100%;}
|
||||
TD>SELECT {width: 100%;}
|
||||
[onclick] {cursor:pointer;}
|
||||
|
||||
TABLE.zebra {border-spacing: 0px; border: 2px solid #C3D2E0;}
|
||||
TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
|
||||
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #C3D2E0;}
|
||||
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #C3D2E0;}
|
||||
TABLE.zebra TR TD {border-bottom: 1px solid #C3D2E0;}
|
||||
TABLE.zebra TR.odd {background: #CEDFF0;}
|
||||
TABLE.zebra TR.even {background: #F0F7FF;}
|
||||
|
||||
INPUT, TEXTAREA {
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
border:1px solid #C8D1DB;
|
||||
padding:4px;
|
||||
cursor:default;
|
||||
margin-right:2px;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
INPUT:hover, TEXTAREA:hover {
|
||||
background-color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#footer {
|
||||
clear: both;
|
||||
padding: 8px;
|
||||
font-size: 0.7em;
|
||||
text-align: right;
|
||||
border-top: 1px solid #C3D2E0;
|
||||
background: #E3EFFA;
|
||||
}
|
||||
|
||||
*[onclick] {cursor: pointer;}
|
||||
IMG {border: none;}
|
||||
FORM {margin: 0px;}
|
||||
A {text-decoration: none;}
|
||||
A:hover {text-decoration: underline;}
|
||||
|
||||
BLOCKQUOTE {
|
||||
border: 1px solid black;
|
||||
padding: 8px;
|
||||
background: #DDD;
|
||||
}
|
||||
|
||||
UL {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* the navigation bar, and all its blocks *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#nav {
|
||||
width: 200px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
margin-left: 16px;
|
||||
}
|
||||
#nav .blockbody {
|
||||
font-size: 0.85em;
|
||||
text-align: center;
|
||||
}
|
||||
#nav TABLE {
|
||||
width: 190px;
|
||||
}
|
||||
#nav TD {
|
||||
vertical-align: middle;
|
||||
}
|
||||
#nav INPUT {
|
||||
width: 95%;
|
||||
padding: 0px;
|
||||
}
|
||||
#nav SELECT {
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#comments P {
|
||||
text-align: left;
|
||||
width: 150px;
|
||||
max-width: 150px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.comment {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.more:after {
|
||||
content: " >>>";
|
||||
}
|
||||
|
||||
.tag_count:before {
|
||||
content: "(";
|
||||
}
|
||||
.tag_count:after {
|
||||
content: ")";
|
||||
}
|
||||
|
||||
.paginator {
|
||||
clear: both;
|
||||
padding: 4px;
|
||||
border-right: 1px solid #C3D2E0;
|
||||
border-left: 1px solid #C3D2E0;
|
||||
}
|
||||
.paginator A {
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
color: #000;
|
||||
border:1px solid #C8D1DB;
|
||||
padding:4px;
|
||||
cursor:default;
|
||||
margin-right:2px;
|
||||
padding:2px;
|
||||
}
|
||||
.paginator A:hover {
|
||||
background-color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* the main part of each page *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#body {
|
||||
margin-left: 226px;
|
||||
margin-right: 16px;
|
||||
text-align: left;
|
||||
height: 1%;
|
||||
}
|
||||
#body TABLE {
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* specific page types *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#pagelist {
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
#tagmap A {
|
||||
padding: 8px 4px 8px 4px;
|
||||
}
|
||||
|
||||
/*.rr {text-align: left; background: #E3EFFA; margin: 8px;}
|
||||
.rrtop {background: url("circle-tl.png") no-repeat top left;}
|
||||
.rrtop div {background: url("circle-tr.png") no-repeat top right;}
|
||||
.rrbot {background: url("circle-bl.png") no-repeat bottom left;}
|
||||
.rrbot div {background: url("circle-br.png") no-repeat bottom right;}
|
||||
.rrtop, .rrtop div, .rrbot, .rrbot div {height: 8px; width: 100%;}
|
||||
.rrcontent {margin: 0px 8px; text-align: left;}
|
||||
|
||||
.hrr {text-align: left; background: #C3D2E0; margin: 8px;}
|
||||
.hrrtop {background: url("circle-tl.png") no-repeat top left;}
|
||||
.hrrtop div {background: url("circle-tr.png") no-repeat top right;}
|
||||
.hrrbot {background: url("circle-bl.png") no-repeat bottom left;}
|
||||
.hrrbot div {background: url("circle-br.png") no-repeat bottom right;}
|
||||
.hrrtop, .hrrtop div, .hrrbot, .hrrbot div {height: 8px; width: 100%;}
|
||||
.hrrcontent {margin: 0px 8px;}*/
|
||||
|
||||
.setupblock {
|
||||
text-align: center;
|
||||
width: 350px;
|
||||
}
|
||||
.setupblock TEXTAREA {
|
||||
width: 300px;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.helpable {
|
||||
border-bottom: 1px dashed gray;
|
||||
}
|
||||
|
||||
.ok {
|
||||
background: #AFA;
|
||||
}
|
||||
.bad {
|
||||
background: #FAA;
|
||||
}
|
||||
|
||||
#nav .thumbblock {
|
||||
float: none;
|
||||
height: auto;
|
||||
}
|
||||
#nav .thumb {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.thumbblock {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
.thumb {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
#downtime #message, #downtime #login {
|
||||
text-align: center;
|
||||
}
|
||||
#downtime H3 {
|
||||
margin-top: 32px;
|
||||
}
|
||||
#downtime #login_table {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.tooltip{
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
z-index:3;
|
||||
display:none;
|
||||
}
|
354
themes/lite/test.html
Normal file
354
themes/lite/test.html
Normal file
|
@ -0,0 +1,354 @@
|
|||
<html>
|
||||
|
||||
<div class="menu">
|
||||
<img src="http://localhost/favicon.ico" style="position: relative; top: 3px;">
|
||||
<a class="tab-selected">Account</a>
|
||||
<a class="tab">Posts</a>
|
||||
<a class="tab">Comments</a>
|
||||
<a class="tab">Tags</a>
|
||||
<a class="tab">Upload</a>
|
||||
<a class="tab">Rules</a>
|
||||
<a class="tab">Wiki</a>
|
||||
</div>
|
||||
<form method="GET" action="./index.php?q=/post/list">
|
||||
<div class="sbar">
|
||||
<a class="tab">«</a>
|
||||
<a class="tab">Index</a>
|
||||
<a class="tab">»</a>
|
||||
<input autocomplete="off" value="" name="search" id="search_input" type="text">
|
||||
<input value="/post/list" name="q" type="hidden">
|
||||
<input class="tab" value="Search" type="submit">
|
||||
<a class="tab">Random</a>
|
||||
<a class="tab">Feed</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<div id="nav">
|
||||
|
||||
|
||||
|
||||
<div class="navtop navside tab">Comments</div>
|
||||
<div class="navside tab">
|
||||
|
||||
<a href="./index.php?q=/user/Anonymous">Anonymous</a>: fairies, now crazy as shit...
|
||||
<a href="./index.php?q=/post/view/53">>>></a><br><br>
|
||||
|
||||
<a href="./index.php?q=/user/Anonymous">Anonymous</a>: niiiiiiiice...
|
||||
<a href="./index.php?q=/post/view/51">>>></a><br><br>
|
||||
|
||||
<a href="./index.php?q=/user/Anonymous">Anonymous</a>: wow niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiic...
|
||||
<a href="./index.php?q=/post/view/27">>>></a><br><br>
|
||||
|
||||
<a href="./index.php?q=/user/Anonymous">Anonymous</a>: plus he is an ADMIRAL not a general. not same thin...
|
||||
<a href="./index.php?q=/post/view/21">>>></a><br><br>
|
||||
|
||||
<a href="./index.php?q=/user/Anonymous">Anonymous</a>: watch star wars episode 6 then you will know...<br>
|
||||
|
||||
<p><a href="./index.php?q=/comment/list" class="more">Full List</a></p></div>
|
||||
|
||||
|
||||
<div class="navtop navside tab">Popular Tags</div>
|
||||
<div class="navside tab">
|
||||
|
||||
<a href="http://encyclopediadramatica.com/tagme" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/tagme/1" class="tag_name">tagme</a> <span class="tag_count">392</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/anime" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/anime/1" class="tag_name">anime</a> <span class="tag_count">329</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/animals" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/animals/1" class="tag_name">animals</a> <span class="tag_count">293</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/vehicles" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/vehicles/1" class="tag_name">vehicles</a> <span class="tag_count">238</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/weapons" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/weapons/1" class="tag_name">weapons</a> <span class="tag_count">163</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/girl" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/girl/1" class="tag_name">girl</a> <span class="tag_count">147</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/cat" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/cat/1" class="tag_name">cat</a> <span class="tag_count">107</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/fail" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/fail/1" class="tag_name">fail</a> <span class="tag_count">84</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/car" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/car/1" class="tag_name">car</a> <span class="tag_count">84</span>
|
||||
<br> <a href="http://encyclopediadramatica.com/0featured-image" class="tag_info_link">?</a> <a href="./index.php?q=/post/list/0featured-image/1" class="tag_name">0featured-image</a> <span class="tag_count">84</span><br> <br><a href="./index.php?q=/tags" class="more">Full List</a>
|
||||
</div>
|
||||
<div class="navtop navside tab">Login</div>
|
||||
<div class="navside tab">
|
||||
<form method="POST" action="./index.php?q=/user_admin/login">
|
||||
<table summary="Login Form">
|
||||
<tbody><tr>
|
||||
<td width="1"><label for="user">Name</label></td>
|
||||
<td width="99"><input id="user" name="user" style="width: 98%;" type="text"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="pass">Password</label></td>
|
||||
<td><input id="pass" name="pass" style="width: 98%;" type="password"></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"><input class="tab" value="Log In" type="submit"></td></tr>
|
||||
</tbody></table>
|
||||
</form>
|
||||
</div></div>
|
||||
<div id="body">
|
||||
|
||||
<div class="blockbody" id="Imagesmain">
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3463" style="position: relative; display: block; height: 120px; width: 150px;">
|
||||
<img id="thumb_3463" title="downtime fail forum real_life // 750x600 // 56.8KB" alt="downtime fail forum real_life // 750x600 // 56.8KB" style="height: 120px; width: 150px;" src="./index.php?q=/thumb/3463.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3462" style="position: relative; display: block; height: 120px; width: 150px;">
|
||||
<img id="thumb_3462" title="matt_damon // 750x600 // 59.7KB" alt="matt_damon // 750x600 // 59.7KB" style="height: 120px; width: 150px;" src="./index.php?q=/thumb/3462.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3461" style="position: relative; display: block; height: 120px; width: 150px;">
|
||||
<img id="thumb_3461" title="animals armed crab dumb numbers // 640x512 // 50.9KB" alt="animals armed crab dumb numbers // 640x512 // 50.9KB" style="height: 120px; width: 150px;" src="./index.php?q=/thumb/3461.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3460" style="position: relative; display: block; height: 129px; width: 150px;">
|
||||
<img id="thumb_3460" title="animals dog foot jar peanut_butter unfair // 480x414 // 23.9KB" alt="animals dog foot jar peanut_butter unfair // 480x414 // 23.9KB" style="height: 129px; width: 150px;" src="./index.php?q=/thumb/3460.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3459" style="position: relative; display: block; height: 131px; width: 150px;">
|
||||
<img id="thumb_3459" title="children signs ugly // 480x420 // 31.4KB" alt="children signs ugly // 480x420 // 31.4KB" style="height: 131px; width: 150px;" src="./index.php?q=/thumb/3459.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3458" style="position: relative; display: block; height: 120px; width: 150px;">
|
||||
<img id="thumb_3458" title="continent definition egocentric map usa // 480x384 // 31.1KB" alt="continent definition egocentric map usa // 480x384 // 31.1KB" style="height: 120px; width: 150px;" src="./index.php?q=/thumb/3458.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3457" style="position: relative; display: block; height: 124px; width: 150px;">
|
||||
<img id="thumb_3457" title="creepy friends girls hair // 480x397 // 27.0KB" alt="creepy friends girls hair // 480x397 // 27.0KB" style="height: 124px; width: 150px;" src="./index.php?q=/thumb/3457.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3456" style="position: relative; display: block; height: 150px; width: 112px;">
|
||||
<img id="thumb_3456" title="complex jenga structure // 480x639 // 35.9KB" alt="complex jenga structure // 480x639 // 35.9KB" style="height: 150px; width: 112px;" src="./index.php?q=/thumb/3456.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3455" style="position: relative; display: block; height: 150px; width: 111px;">
|
||||
<img id="thumb_3455" title="girl love nerd // 480x643 // 35.8KB" alt="girl love nerd // 480x643 // 35.8KB" style="height: 150px; width: 111px;" src="./index.php?q=/thumb/3455.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3454" style="position: relative; display: block; height: 120px; width: 150px;">
|
||||
<img id="thumb_3454" title="bike php wheels // 750x600 // 56.7KB" alt="bike php wheels // 750x600 // 56.7KB" style="height: 120px; width: 150px;" src="./index.php?q=/thumb/3454.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3453" style="position: relative; display: block; height: 150px; width: 111px;">
|
||||
<img id="thumb_3453" title="drunk hat lamp shade // 480x645 // 32.9KB" alt="drunk hat lamp shade // 480x645 // 32.9KB" style="height: 150px; width: 111px;" src="./index.php?q=/thumb/3453.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3452" style="position: relative; display: block; height: 116px; width: 150px;">
|
||||
<img id="thumb_3452" title="versatile women // 480x372 // 19.6KB" alt="versatile women // 480x372 // 19.6KB" style="height: 116px; width: 150px;" src="./index.php?q=/thumb/3452.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3451" style="position: relative; display: block; height: 129px; width: 150px;">
|
||||
<img id="thumb_3451" title="face governor spitzer // 480x415 // 26.0KB" alt="face governor spitzer // 480x415 // 26.0KB" style="height: 129px; width: 150px;" src="./index.php?q=/thumb/3451.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3450" style="position: relative; display: block; height: 150px; width: 120px;">
|
||||
<img id="thumb_3450" title="blood hockey illusion ouch pain // 480x600 // 42.6KB" alt="blood hockey illusion ouch pain // 480x600 // 42.6KB" style="height: 150px; width: 120px;" src="./index.php?q=/thumb/3450.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3449" style="position: relative; display: block; height: 150px; width: 102px;">
|
||||
<img id="thumb_3449" title="band cheerleader girl motives ulterior // 480x703 // 40.5KB" alt="band cheerleader girl motives ulterior // 480x703 // 40.5KB" style="height: 150px; width: 102px;" src="./index.php?q=/thumb/3449.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3448" style="position: relative; display: block; height: 116px; width: 150px;">
|
||||
<img id="thumb_3448" title="fishing ocean woman // 710x552 // 232.5KB" alt="fishing ocean woman // 710x552 // 232.5KB" style="height: 116px; width: 150px;" src="./index.php?q=/thumb/3448.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3447" style="position: relative; display: block; height: 130px; width: 150px;">
|
||||
<img id="thumb_3447" title="couple dance obvious // 710x617 // 204.7KB" alt="couple dance obvious // 710x617 // 204.7KB" style="height: 130px; width: 150px;" src="./index.php?q=/thumb/3447.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3446" style="position: relative; display: block; height: 130px; width: 150px;">
|
||||
<img id="thumb_3446" title="doing-it-wrong erotica // 710x618 // 201.5KB" alt="doing-it-wrong erotica // 710x618 // 201.5KB" style="height: 130px; width: 150px;" src="./index.php?q=/thumb/3446.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3445" style="position: relative; display: block; height: 116px; width: 150px;">
|
||||
<img id="thumb_3445" title=":( animals bird car owned vehicles woman // 710x552 // 224.6KB" alt=":( animals bird car owned vehicles woman // 710x552 // 224.6KB" style="height: 116px; width: 150px;" src="./index.php?q=/thumb/3445.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="thumbblock">
|
||||
<div class="rr thumb">
|
||||
<div class="rrtop"><div></div></div>
|
||||
<div class="rrcontent">
|
||||
<a href="./index.php?q=/post/view/3444" style="position: relative; display: block; height: 118px; width: 150px;">
|
||||
<img id="thumb_3444" title="cool Dude mask // 710x561 // 220.3KB" alt="cool Dude mask // 710x561 // 220.3KB" style="height: 118px; width: 150px;" src="./index.php?q=/thumb/3444.jpg">
|
||||
</a>
|
||||
</div>
|
||||
<div class="rrbot"><div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><div class="blockbody" id="main"> <!-- rrcontent --></div></div>
|
||||
|
||||
|
||||
<div class="paginator sfoot">
|
||||
<span class="tab">First</span>
|
||||
<span class="tab">Prev</span>
|
||||
<< <b><a href="./index.php?q=/post/list/1">1</a></b>
|
||||
<a href="./index.php?q=/post/list/2">2</a>
|
||||
<a href="./index.php?q=/post/list/3">3</a>
|
||||
<a href="./index.php?q=/post/list/4">4</a>
|
||||
<a href="./index.php?q=/post/list/5">5</a>
|
||||
<a href="./index.php?q=/post/list/6">6</a>
|
||||
<a href="./index.php?q=/post/list/7">7</a>
|
||||
<a href="./index.php?q=/post/list/8">8</a>
|
||||
<a href="./index.php?q=/post/list/9">9</a>
|
||||
<a href="./index.php?q=/post/list/10">10</a>
|
||||
<a href="./index.php?q=/post/list/11">11</a> >>
|
||||
<a href="./index.php?q=/post/list/2">Next</a>
|
||||
<a href="./index.php?q=/post/list/169">Last</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="footer">
|
||||
Images © their respective owners,
|
||||
<a href="http://code.shishnet.org/shimmie2/">Shimmie</a> ©
|
||||
<a href="http://www.shishnet.org/">Shish</a> & Co 2007-2010,
|
||||
based on the Danbooru concept.
|
||||
<br>Took ??? + ??? seconds and 4.19MB of RAM; Used 62 files and 26 queries; Sent 49 events; 0 cache hits and 0 misses
|
||||
<br><a href="mailto:contactNOSPAM%28at.%29NOSPAM.seemslegit.com">Contact</a>
|
||||
</div>
|
||||
</html>
|
116
themes/lite/themelet.class.php
Normal file
116
themes/lite/themelet.class.php
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
/**
|
||||
* A collection of common functions for theme parts
|
||||
*/
|
||||
class Themelet {
|
||||
/**
|
||||
* Generic error message display
|
||||
*/
|
||||
public function display_error(Page $page, $title, $message) {
|
||||
$page->set_title($title);
|
||||
$page->set_heading($title);
|
||||
$page->add_block(new NavBlock());
|
||||
$page->add_block(new Block("Error", $message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A specific, common error message
|
||||
*/
|
||||
public function display_permission_denied(Page $page) {
|
||||
header("HTTP/1.0 403 Permission Denied");
|
||||
$this->display_error($page, "Permission Denied", "You do not have permission to access this page");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generic thumbnail code; returns HTML rather than adding
|
||||
* a block since thumbs tend to go inside blocks...
|
||||
*/
|
||||
public function build_thumb_html(Image $image, $query=null) {
|
||||
global $config;
|
||||
$i_id = int_escape($image->id);
|
||||
$h_view_link = make_link("post/view/$i_id", $query);
|
||||
$h_tip = html_escape($image->get_tooltip());
|
||||
$h_thumb_link = $image->get_thumb_link();
|
||||
$tsize = get_thumbnail_size($image->width, $image->height);
|
||||
return "
|
||||
<div class='thumbblock'>
|
||||
|
||||
<a href='$h_view_link' style='position: relative; display: block; height: {$tsize[1]}px; width: {$tsize[0]}px;'>
|
||||
<img id='thumb_$i_id' title='$h_tip' alt='$h_tip' class='highlighted' style='height: {$tsize[1]}px; width: {$tsize[0]}px;' src='$h_thumb_link'>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put something in a rounded rectangle box; specific to the default theme
|
||||
*/
|
||||
public function rr($html) {
|
||||
return "
|
||||
<div class='tab'>
|
||||
$html
|
||||
</div>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a generic paginator
|
||||
*/
|
||||
public function display_paginator(Page $page, $base, $query, $page_number, $total_pages) {
|
||||
if($total_pages == 0) $total_pages = 1;
|
||||
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
||||
$page->add_block(new Block(null, $body, "main", 90));
|
||||
}
|
||||
|
||||
private function gen_page_link($base_url, $query, $page, $name, $link_class=null) {
|
||||
$link = make_link("$base_url/$page", $query);
|
||||
return "<a class='$link_class' href='$link'>$name</a>";
|
||||
}
|
||||
|
||||
private function gen_page_link_block($base_url, $query, $page, $current_page, $name) {
|
||||
$paginator = "";
|
||||
|
||||
if($page == $current_page) {$link_class = "tab-selected";} else {$link_class = "";}
|
||||
$paginator .= $this->gen_page_link($base_url, $query, $page, $name, $link_class);
|
||||
|
||||
return $paginator;
|
||||
}
|
||||
|
||||
private function build_paginator($current_page, $total_pages, $base_url, $query) {
|
||||
$next = $current_page + 1;
|
||||
$prev = $current_page - 1;
|
||||
$rand = rand(1, $total_pages);
|
||||
|
||||
$at_start = ($current_page <= 1 || $total_pages <= 1);
|
||||
$at_end = ($current_page >= $total_pages);
|
||||
|
||||
$first_html = $at_start ? "<span class='tab'>First</span>" : $this->gen_page_link($base_url, $query, 1, "First");
|
||||
$prev_html = $at_start ? "<span class='tab'>Prev</span>" : $this->gen_page_link($base_url, $query, $prev, "Prev");
|
||||
$random_html = $this->gen_page_link($base_url, $query, $rand, "Random");
|
||||
$next_html = $at_end ? "<span class='tab'>Next</span>" : $this->gen_page_link($base_url, $query, $next, "Next");
|
||||
$last_html = $at_end ? "<span class='tab'>Last</span>" : $this->gen_page_link($base_url, $query, $total_pages, "Last");
|
||||
|
||||
$start = $current_page-5 > 1 ? $current_page-5 : 1;
|
||||
$end = $start+10 < $total_pages ? $start+10 : $total_pages;
|
||||
|
||||
$pages = array();
|
||||
foreach(range($start, $end) as $i) {
|
||||
$pages[] = $this->gen_page_link_block($base_url, $query, $i, $current_page, $i);
|
||||
}
|
||||
$pages_html = implode(" ", $pages);
|
||||
|
||||
return "<div class='paginator sfoot'>
|
||||
$first_html
|
||||
$prev_html
|
||||
$random_html
|
||||
<< $pages_html >>
|
||||
$next_html $last_html
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
?>
|
1301
themes/lite/wz_tooltip.js
Normal file
1301
themes/lite/wz_tooltip.js
Normal file
File diff suppressed because it is too large
Load diff
Reference in a new issue