]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
header.pl: Simplify boxes
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 23 Mar 2024 18:39:40 +0000 (19:39 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 23 Mar 2024 18:39:40 +0000 (19:39 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/header.pl
html/html/themes/ipfire/include/css/style.css

index c62bc44f623045e6bf9c5e5da06beb63c96a6211..aac64193f816c216a22fb5bb6cfb56290f2d02c3 100644 (file)
@@ -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 "<div class='post' align='center'>\n"
-       }
-       else {
-               print "<div class='post'>\n";
-       }
+       my $title = shift;
+
+       print "<div class=\"box\">\n";
 
-       if ($caption) {
-               print "<h2>$caption</h2>\n";
+       # Show the title
+       if ($title) {
+               print " <h2 class=\"title\">${title}</h2>\n";
        }
 }
 
index d8503c17856eb68421d84bfe188344b412ad5f67..dfe7caa43aa7a775a16feed04c26d3285d1726bb 100644 (file)
@@ -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;