lite theme fix

This commit is contained in:
NottyNoz 2023-03-20 22:37:24 -04:00 committed by Shish
parent cf6d994de4
commit 39c939583b
3 changed files with 29 additions and 25 deletions

View file

@ -77,15 +77,16 @@ class Page extends BasePage
$custom_sublinks .= "</div>";
}
$flash_html = $this->flash ? "<b id='flash'>".nl2br(html_escape(implode("\n", $this->flash)))."</b>" : "";
if (!$this->left_enabled) {
$left_block_html = "";
$main_block_html = "<article id='body_noleft'>{$main_block_html}</article>";
} else {
$left_block_html = "<nav>{$left_block_html}</nav>";
$main_block_html = "<article>{$main_block_html}</article>";
$main_block_html = "<article>$flash_html{$main_block_html}</article>";
}
$flash_html = $this->flash ? "<b id='flash'>".nl2br(html_escape(implode("\n", $this->flash)))."</b>" : "";
$head_html = $this->head_html();
$footer_html = $this->footer_html();
@ -100,7 +101,6 @@ class Page extends BasePage
$sub_block_html
</header>
$left_block_html
$flash_html
$main_block_html
<footer>
$footer_html
@ -115,16 +115,17 @@ EOD;
$h = $block->header;
$b = $block->body;
$i = $block->id;
$html = "<section id='{$i}'>";
if (!is_null($h)) {
$html .= "<div class='navtop navside tab shm-toggler' data-toggle-sel='#{$i}'>{$h}</div>";
$html = $b;
if ($h != "Paginator"){
$html = "<section id='{$i}'>";
if (!is_null($h)) {
$html .= "<div class='navtop navside tab shm-toggler' data-toggle-sel='#{$i}'>{$h}</div>";
}
if (!is_null($b)) {
$html .= "<div class='navside tab".($hidable ? " blockbody" : "")."'>$b</div>";
}
$html .= "</section>";
}
if (!is_null($b)) {
$html .= "
<div class='navside tab'>{$b}</div>
";
}
$html .= "</section>";
return $html;
}

View file

@ -35,6 +35,7 @@ a.tab:hover, a.tab:active, .tab-selected {
cursor:default;
margin-right:2px;
padding:2px;
break-inside: avoid;
}
.tframe {
margin:4px;
@ -57,11 +58,10 @@ a.tab:hover, a.tab:active, .tab-selected {
margin-bottom: 0;
padding: 4px;
background: #CEDFF0;
text-align: right;
text-align: center;
}
.navside {
.navside, #comment-list-recent .blockbody {
background:none repeat scroll 0 0 #CEDFF0;
text-align:left;
padding:4px;
font-size:85%;
border:1px solid #C3D2E0;
@ -69,6 +69,12 @@ a.tab:hover, a.tab:active, .tab-selected {
-moz-border-radius:4px;
-webkit-border-radius:4px;
}
.navside.navtop, .shm-image-list, #Statsmain {
text-align:left;
}
.shm-image-list {
margin-top: 10px;
}
.lazy{
background:none repeat scroll 0 0 #CEDFF0;
padding:4px;
@ -139,6 +145,7 @@ 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:nth-child(odd) {background: #CEDFF0;}
TABLE.zebra TR:nth-child(even) {background: #F0F7FF;}
TABLE.image_info {margin: auto;}
INPUT, TEXTAREA, button {
-moz-border-radius:4px;
@ -158,7 +165,7 @@ FOOTER {
clear: both;
padding: 8px;
font-size: 0.7em;
text-align: right;
text-align: center;
border-top: 1px solid #C3D2E0;
background: #E3EFFA;
}
@ -242,7 +249,6 @@ TABLE.tag_list>TBODY>TR>TD:after {
}
.paginator {
clear: both;
padding: 4px;
border-right: 1px solid #C3D2E0;
border-left: 1px solid #C3D2E0;
@ -268,7 +274,7 @@ TABLE.tag_list>TBODY>TR>TD:after {
ARTICLE {
margin-left: 226px;
margin-right: 16px;
text-align: left;
text-align: center;
height: 1%;
}
ARTICLE.body_noleft {
@ -284,7 +290,6 @@ ARTICLE TABLE {
width: 90%;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* specific page types *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -336,11 +341,9 @@ NAV .thumbblock {
NAV .thumb {
margin-bottom: 0;
}
.thumbblock {
width: 220px;
height: 220px;
.shm-thumb {
width: 200px;
display: inline-block;
float: left;
}
.thumb {
display: inline-block;

View file

@ -27,7 +27,7 @@ class Themelet extends BaseThemelet
$total_pages = 1;
}
$body = $this->litetheme_build_paginator($page_number, $total_pages, $base, $query, $show_random);
$page->add_block(new Block(null, $body, "main", 90));
$page->add_block(new Block("Paginator", $body, "main", 90));
}
public function litetheme_gen_page_link(string $base_url, ?string $query, int $page, string $name, ?string $link_class=null): string
@ -64,7 +64,7 @@ class Themelet extends BaseThemelet
$random_html = "";
if ($show_random) {
$rand = mt_rand(1, $total_pages);
$random_html = $this->litetheme_gen_page_link($base_url, $query, $rand, "Random");
$random_html = $this->litetheme_gen_page_link($base_url, $query, $rand, "Random");
}
$next_html = $at_end ? "<span class='tab'>Next</span>" : $this->litetheme_gen_page_link($base_url, $query, $next, "Next");