[style] use CSS for text-wrapping

This commit is contained in:
Shish 2024-01-08 21:24:41 +00:00
parent 5a05f58792
commit 7146d07f4e
2 changed files with 5 additions and 6 deletions

View file

@ -584,16 +584,11 @@ class BasePage
} }
} }
$wrapper = "";
if (strlen($this->heading) > 100) {
$wrapper = ' style="height: 3em; overflow: auto;"';
}
$footer_html = $this->footer_html(); $footer_html = $this->footer_html();
$flash_html = $this->flash ? "<b id='flash'>".nl2br(html_escape(implode("\n", $this->flash)))."</b>" : ""; $flash_html = $this->flash ? "<b id='flash'>".nl2br(html_escape(implode("\n", $this->flash)))."</b>" : "";
return " return "
<header> <header>
<h1$wrapper>{$this->heading}</h1> <h1>{$this->heading}</h1>
$sub_block_html $sub_block_html
</header> </header>
<nav> <nav>

View file

@ -50,6 +50,10 @@
font-family: sans-serif; font-family: sans-serif;
} }
HEADER H1 {
max-height: 3em;
overflow: hidden;
}
BODY { BODY {
background: var(--page); background: var(--page);
color: var(--text); color: var(--text);