mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
header.pl: Simplify boxes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -340,19 +340,17 @@ sub closebigbox {
|
|||||||
# @param page align
|
# @param page align
|
||||||
# @param page caption
|
# @param page caption
|
||||||
sub openbox {
|
sub openbox {
|
||||||
$width = $_[0];
|
# The width parameter is ignored and should always be '100%'
|
||||||
$align = $_[1];
|
my $width = shift;
|
||||||
$caption = $_[2];
|
my $align = shift;
|
||||||
|
|
||||||
if($align eq 'center') {
|
my $title = shift;
|
||||||
print "<div class='post' align='center'>\n"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print "<div class='post'>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($caption) {
|
print "<div class=\"box\">\n";
|
||||||
print "<h2>$caption</h2>\n";
|
|
||||||
|
# Show the title
|
||||||
|
if ($title) {
|
||||||
|
print " <h2 class=\"title\">${title}</h2>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,17 @@ iframe {
|
|||||||
border-radius: 3px 3px 3px 3px;
|
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 {
|
#main_inner {
|
||||||
padding-bottom: 1.5em;
|
padding-bottom: 1.5em;
|
||||||
}
|
}
|
||||||
@@ -181,19 +192,6 @@ iframe {
|
|||||||
margin-bottom: 1em;
|
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 > * {
|
#main_header > * {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
|
|||||||
Reference in New Issue
Block a user