theme changes
This commit is contained in:
parent
4163432e32
commit
b0448eba6f
@ -60,7 +60,7 @@ class CommentListTheme extends Themelet {
|
|||||||
public function add_comment_list(Page $page, Image $image, $comments, $position, $with_postbox) {
|
public function add_comment_list(Page $page, Image $image, $comments, $position, $with_postbox) {
|
||||||
$html = "<div style='text-align: left'>";
|
$html = "<div style='text-align: left'>";
|
||||||
$html .= "<div style='float: left; margin-right: 16px;'>" . $this->build_thumb_html($image) . "</div>";
|
$html .= "<div style='float: left; margin-right: 16px;'>" . $this->build_thumb_html($image) . "</div>";
|
||||||
$html .= $this->comments_to_html($comments);
|
$html .= "<div style='margin-left: 230px;'>" . $this->comments_to_html($comments) . "</div>";
|
||||||
$html .= "</div>";
|
$html .= "</div>";
|
||||||
if($with_postbox) {
|
if($with_postbox) {
|
||||||
$html .= "<div style='clear:both;'>".($this->build_postbox($image->id))."</div>";
|
$html .= "<div style='clear:both;'>".($this->build_postbox($image->id))."</div>";
|
||||||
@ -80,10 +80,11 @@ class CommentListTheme extends Themelet {
|
|||||||
|
|
||||||
|
|
||||||
protected function comments_to_html($comments, $trim=false) {
|
protected function comments_to_html($comments, $trim=false) {
|
||||||
$html = "";
|
$html = "<div class='commentblock'>";
|
||||||
foreach($comments as $comment) {
|
foreach($comments as $comment) {
|
||||||
$html .= $this->comment_to_html($comment, $trim);
|
$html .= $this->comment_to_html($comment, $trim);
|
||||||
}
|
}
|
||||||
|
$html .= "</div>";
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,27 +91,10 @@ EOD;
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function build_table($images, $query) {
|
protected function build_table($images, $query) {
|
||||||
global $config;
|
$table = "";
|
||||||
|
foreach($images as $image) {
|
||||||
$width = $config->get_int('index_width');
|
$table .= $this->build_thumb_html($image, $query);
|
||||||
$height = $config->get_int('index_height');
|
|
||||||
|
|
||||||
$table = "<table>\n";
|
|
||||||
for($i=0; $i<$height; $i++) {
|
|
||||||
$table .= "<tr>\n";
|
|
||||||
for($j=0; $j<$width; $j++) {
|
|
||||||
$image = isset($images[$i*$width+$j]) ? $images[$i*$width+$j] : null;
|
|
||||||
if(!is_null($image)) {
|
|
||||||
$table .= "\t<td>" . $this->build_thumb_html($image, $query) . "</td>\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$table .= "\t<td> </td>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$table .= "</tr>\n";
|
|
||||||
}
|
}
|
||||||
$table .= "</table>\n";
|
|
||||||
|
|
||||||
return $table;
|
return $table;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ class UserPageTheme extends Themelet {
|
|||||||
global $config;
|
global $config;
|
||||||
$html = "
|
$html = "
|
||||||
<form action='".make_link("user_admin/login")."' method='POST'>
|
<form action='".make_link("user_admin/login")."' method='POST'>
|
||||||
<table summary='Login Form'>
|
<table summary='Login Form' align='center'>
|
||||||
<tr><td width='70'>Name</td><td width='70'><input type='text' name='user'></td></tr>
|
<tr><td width='70'>Name</td><td width='70'><input type='text' name='user'></td></tr>
|
||||||
<tr><td>Password</td><td><input type='password' name='pass'></td></tr>
|
<tr><td>Password</td><td><input type='password' name='pass'></td></tr>
|
||||||
<tr><td colspan='2'><input type='submit' name='gobu' value='Log In'></td></tr>
|
<tr><td colspan='2'><input type='submit' name='gobu' value='Log In'></td></tr>
|
||||||
|
@ -175,4 +175,10 @@ UL {
|
|||||||
background: #FAA;
|
background: #FAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thumb {
|
||||||
|
width: 220px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class Themelet {
|
|||||||
$h_tip = html_escape($image->get_tooltip());
|
$h_tip = html_escape($image->get_tooltip());
|
||||||
$h_thumb_link = $image->get_thumb_link();
|
$h_thumb_link = $image->get_thumb_link();
|
||||||
$tsize = get_thumbnail_size($image->width, $image->height);
|
$tsize = get_thumbnail_size($image->width, $image->height);
|
||||||
return "<a href='$h_view_link'><img id='$i_id' title='$h_tip' alt='$h_tip' ".
|
return "<a class='thumb' href='$h_view_link'><img id='$i_id' title='$h_tip' alt='$h_tip' ".
|
||||||
"width='{$tsize[0]}' height='{$tsize[1]}' src='$h_thumb_link' /></a>";
|
"width='{$tsize[0]}' height='{$tsize[1]}' src='$h_thumb_link' /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,3 +105,8 @@ TD {
|
|||||||
display: inline;
|
display: inline;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
.thumb {
|
||||||
|
width: 220px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
@ -22,7 +22,7 @@ class Themelet {
|
|||||||
$h_tip = html_escape($image->get_tooltip());
|
$h_tip = html_escape($image->get_tooltip());
|
||||||
$h_thumb_link = $image->get_thumb_link();
|
$h_thumb_link = $image->get_thumb_link();
|
||||||
$tsize = get_thumbnail_size($image->width, $image->height);
|
$tsize = get_thumbnail_size($image->width, $image->height);
|
||||||
return "<a href='$h_view_link'><img title='$h_tip' alt='$h_tip' ".
|
return "<a class='thumb' href='$h_view_link'><img title='$h_tip' alt='$h_tip' ".
|
||||||
"width='{$tsize[0]}' height='{$tsize[1]}' src='$h_thumb_link' /></a>";
|
"width='{$tsize[0]}' height='{$tsize[1]}' src='$h_thumb_link' /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,3 +165,8 @@ UL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.thumb {
|
||||||
|
width: 220px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
@ -32,7 +32,7 @@ class Themelet {
|
|||||||
$h_tip = html_escape($image->get_tooltip());
|
$h_tip = html_escape($image->get_tooltip());
|
||||||
$h_thumb_link = $image->get_thumb_link();
|
$h_thumb_link = $image->get_thumb_link();
|
||||||
$tsize = get_thumbnail_size($image->width, $image->height);
|
$tsize = get_thumbnail_size($image->width, $image->height);
|
||||||
return "<a href='$h_view_link'><img id='$i_id' title='$h_tip' alt='$h_tip' ".
|
return "<a class='thumb' href='$h_view_link'><img id='$i_id' title='$h_tip' alt='$h_tip' ".
|
||||||
"width='{$tsize[0]}' height='{$tsize[1]}' src='$h_thumb_link' /></a>";
|
"width='{$tsize[0]}' height='{$tsize[1]}' src='$h_thumb_link' /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user