From bf345851e9f92cd0859e227a422b659ffb69b3fb Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 23 Mar 2024 19:39:40 +0100 Subject: [PATCH] header.pl: Simplify boxes Signed-off-by: Michael Tremer --- config/cfgroot/header.pl | 20 +++++++--------- html/html/themes/ipfire/include/css/style.css | 24 +++++++++---------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index c62bc44f6..aac64193f 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -340,19 +340,17 @@ sub closebigbox { # @param page align # @param page caption sub openbox { - $width = $_[0]; - $align = $_[1]; - $caption = $_[2]; + # The width parameter is ignored and should always be '100%' + my $width = shift; + my $align = shift; - if($align eq 'center') { - print "
\n" - } - else { - print "
\n"; - } + my $title = shift; + + print "
\n"; - if ($caption) { - print "

$caption

\n"; + # Show the title + if ($title) { + print "

${title}

\n"; } } diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index d8503c178..dfe7caa43 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -182,6 +182,17 @@ iframe { border-radius: 3px 3px 3px 3px; } +.box { + border: 1px solid var(--color-grey); + padding: 0.75rem 1rem; + margin-bottom: 2rem; +} + +.box .title { + margin-bottom: 1rem; + border-bottom: 1px solid var(--color-grey); +} + #main_inner { padding-bottom: 1.5em; } @@ -200,19 +211,6 @@ iframe { margin-bottom: 1em; } -#main_inner .post { - border: 1px solid silver; - padding: 1em 2em 1em 2em; - margin-bottom: 1em; - clear: both; -} - -#main_inner .post h2 { - border-bottom: dotted 1px #e1e1e1; - font-size: 1.6em; - margin-bottom: 1em; -} - #main_header > * { display: inline-block; vertical-align: baseline; -- 2.39.5