mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-15 21:43:00 +02:00
web: Introduce sections
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -165,13 +165,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user