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

index aac64193f816c216a22fb5bb6cfb56290f2d02c3..b5acbfd6850592ba5d99956bd13a77f664756757 100644 (file)
@@ -333,6 +333,24 @@ sub openbigbox {
 sub closebigbox {
 }
 
+# Sections
+
+sub opensection($) {
+       my $title = shift;
+
+       # Open the section
+       print "<section class=\"section\">";
+
+       # Show the title if set
+       if ($title) {
+               print " <h2 class=\"title\">${title}</h2>\n";
+       }
+}
+
+sub closesection() {
+       print "</section>";
+}
+
 ###############################################################################
 #
 # print box opening html layout
@@ -346,7 +364,7 @@ sub openbox {
 
        my $title = shift;
 
-       print "<div class=\"box\">\n";
+       print "<section class=\"section is-box\">\n";
 
        # Show the title
        if ($title) {
@@ -358,7 +376,7 @@ sub openbox {
 #
 # print box closing html layout
 sub closebox {
-       print "</div>";
+       print "</section>";
 }
 
 sub green_used() {
index 82ee9dd2271aab19f94058b72366b1de72cca506..edf75c50eda452435ac8985b27791b4a571b2c91 100644 (file)
@@ -184,13 +184,16 @@ iframe {
        border-radius: 3px 3px 3px 3px;
 }
 
-.box {
-       border: 1px solid var(--color-grey);
-       padding: 0.75rem 1rem;
+section {
        margin-bottom: 2rem;
 }
 
-.box .title {
+section.is-box {
+       padding: 0.75rem 1rem;
+       border: 1px solid var(--color-grey);
+}
+
+section .title {
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--color-grey);
 }