patch from Shuugo; Danbooru theme uses CSS rather than a table
git-svn-id: file:///home/shish/svn/shimmie2/trunk@482 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
24f94fe84d
commit
e910df8e6b
@ -47,5 +47,25 @@ class CustomIndexTheme extends IndexTheme {
|
||||
|
||||
return $h_search;
|
||||
}
|
||||
|
||||
protected function build_table($images, $query) {
|
||||
global $config;
|
||||
|
||||
$width = $config->get_int('index_width');
|
||||
$height = $config->get_int('index_height');
|
||||
|
||||
$table = "<div>\n";
|
||||
for($i=0; $i<$height; $i++) {
|
||||
for($j=0; $j<$width; $j++) {
|
||||
$image = isset($images[$i*$width+$j]) ? $images[$i*$width+$j] : null;
|
||||
if(!is_null($image)) {
|
||||
$table .= "\t<span class=\"thumb\">" . build_thumb_html($image, $query) . "</span>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
$table .= "</div>";
|
||||
|
||||
return $table;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -122,26 +122,45 @@ A:hover {text-decoration: underline;}
|
||||
.withleft {
|
||||
margin-left: 160px;
|
||||
}
|
||||
|
||||
/*Shuugo: more danboorish*/
|
||||
div#paginator {
|
||||
display: block;
|
||||
padding: 2em 0 1em 0;
|
||||
font-size: 1em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
clear: both;
|
||||
}
|
||||
.paginator {
|
||||
margin: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
.paginator B {
|
||||
div#paginator B {
|
||||
padding: 4px 8px 4px 8px;
|
||||
margin: 3px;
|
||||
}
|
||||
.paginator A {
|
||||
div#paginator A {
|
||||
padding: 4px 8px 4px 8px;
|
||||
margin: 3px;
|
||||
border: 1px solid #EEE;
|
||||
}
|
||||
.paginator A:hover {
|
||||
div#paginator A:hover {
|
||||
border: 1px solid #EEE;
|
||||
background: blue;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
span.thumb {
|
||||
height: 220px;
|
||||
width: 220px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
text-align: center;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
@ -55,7 +55,7 @@ class Themelet {
|
||||
if(strlen($last_html) > 0) $ndots = "...";
|
||||
else $ndots = "";
|
||||
|
||||
return "<p class='paginator'>$prev_html $first_html $pdots $pages_html $ndots $last_html $next_html</p>";
|
||||
return "<div id='paginator'>$prev_html $first_html $pdots $pages_html $ndots $last_html $next_html</div>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user