Files
bpfire/html/html/themes/ipfire/include/css/style.css
Michael Tremer 3cd821c122 web: Refactor graphs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:43:33 +02:00

487 lines
7.9 KiB
CSS

:root {
--color-green : #339933;
--color-green-invert : #ffffff;
--color-red : #993333;
--color-red-invert : #ffffff;
--color-blue : #333399;
--color-blue-invert : #ffffff;
--color-grey : #d6d6d6;
--color-light-grey : #f0f0f0;
--color-primary : #ff2e52;
--color-primary-invert : #ffffff;
--color-text : #363636;
}
/* This controls the width of the fixed width layouts */
.fixed {
width: 960px !important;
}
/* Fonts */
@font-face {
font-family: "Prompt";
font-style: normal;
font-weight: 400;
src: local("Prompt Regular"), local("Prompt-Regular"), url(../fonts/Prompt-Regular.ttf) format("truetype");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Prompt";
font-style: normal;
font-weight: 400;
src: local("Prompt Regular"), local("Prompt-Regular"), url(../fonts/Prompt-Regular.ttf) format("truetype");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Prompt';
font-style: normal;
font-weight: 500;
src: local("Prompt Medium"), local("Prompt-Medium"), url(../fonts/Prompt-Medium.ttf) format("truetype");
unicode-range:U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Prompt';
font-style: normal;
font-weight: 500;
src: local("Prompt Medium"), local("Prompt-Medium"), url(../fonts/Prompt-Medium.ttf) format("truetype");
unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Prompt";
font-style: normal;
font-weight: 700;
src: local("Prompt Bold"), local("Prompt-Bold"), url(../fonts/Prompt-Bold.ttf) format("truetype");
unicode-range:U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Prompt";
font-style: normal;
font-weight: 700;
src: local("Prompt Bold"), local("Prompt-Bold"), url(../fonts/Prompt-Bold.ttf) format("truetype");
unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Basic Stuff */
* {
margin: 0;
}
html {
height: 100vh;
}
body {
background: linear-gradient(
#ff2e52,
#000000
);
background-attachment: fixed;
font-family: "Prompt", sans-serif;
font-size: 9pt;
color: #363636;
}
h1, h2, h3, h4, h5, h6 {
font-size: 20px;
}
select, textarea, input[type=text], input[type=number] {
width: 100%;
}
br.clear {
clear: both;
}
img {
padding: 3px;
}
a {
text-decoration: underline;
color: #ff2e52;
}
a:hover {
text-decoration: none;
}
p {
line-height: 1.8em;
}
hr {
margin: 0.3em 0 0.3em 0;
}
iframe {
border: 0;
}
.pull-right {
float: right !important;
}
/* Header */
#header {
margin: 0 auto;
}
/* Logo */
#logo {
height: 65px;
margin-top: 1em;
}
#logo h1 {
color: #ffffff;
font-size: 3.5em;
font-weight: bold;
}
#logo h1 a {
color: inherit;
text-decoration: none;
}
/* Main */
.bigbox {
margin: 0 auto;
margin-top: 0.5em;
padding: 1.5em 2em 0 2em;
background: #ffffff;
border: 2px solid black;
border-radius: 3px 3px 3px 3px;
}
section {
margin-bottom: 2rem;
}
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);
}
#main_inner {
padding-bottom: 1.5em;
}
#main_inner p {
text-align: justify;
margin-bottom: 2em;
}
#main_inner ul {
margin-bottom: 2em;
}
#main_inner h1 {
font-size: 1.8em;
margin-bottom: 1em;
}
#main_header > * {
display: inline-block;
vertical-align: baseline;
}
#main_header > span {
margin-left: 0.8em;
}
#main_header img {
padding: 0;
}
#footer {
height: 2.5em;
margin-bottom: 1.5em;
padding-bottom: 0.5em;
}
#footer a {
color: inherit;
text-decoration: none;
}
#footer a:hover {
text-decoration: underline;
}
#traffic {
float: right;
min-width: 20em;
line-height: 32px;
}
/* Menu */
#cssmenu {
padding-top: 0;
font-weight: 500;
height: 32px;
}
#cssmenu a {
color: #363636;
display: inline-block;
line-height: 32px;
padding: 0 1em;
text-decoration: none;
}
#cssmenu ul {
list-style: none;
padding: 0;
}
#cssmenu > ul > li {
display: inline-block;
}
#cssmenu > ul > li.active a, #cssmenu > ul > li:hover > a {
color: #ffffff;
background: #363636;
}
#cssmenu .has-sub:hover > ul {
display: block;
}
#cssmenu .has-sub ul {
display: none;
position: absolute;
z-index: 1;
}
#cssmenu .has-sub ul li a {
min-width: 12em;
background: #ffffff;
color: #363636;
display: block;
line-height: 40%;
padding: 12px 5px;
border: 1px solid black;
}
#cssmenu .has-sub ul li:hover a {
color: #ffffff;
background: #363636;
}
/* This decorates all tables with class="tbl" */
table {
*border-collapse: collapse; /* IE7 and lower */
border-spacing: 0;
}
.tbl th {
color: #ffffff;
border-top: 1px solid #363636;
border-bottom: 1px solid #363636;
background: #363636;
padding-left: 0.5em;
padding-right: 0.5em;
}
.tbl th[scope=row] {
text-align: left;
}
.tbl tr:nth-child(odd) td {
background-color: var(--color-grey);
}
.tbl tr:nth-child(even) td {
background-color: var(--color-light-grey);
}
.tbl th:first-child {
border-left: 1px solid #363636;
border-top: 1px solid #363636;
border-bottom: 1px solid #363636;
}
.tbl th:last-child {
border-right: 1px solid #363636;
border-top: 1px solid #363636;
border-bottom: 1px solid #363636;
}
.tbl th:only-child {
border: 1px solid #363636;
}
.tbl td {
padding: 0.25em 0.5em;
}
.tbl tr td:first-child {
border-left: 1px solid #363636;
}
.tbl tr td:last-child {
border-right: 1px solid #363636;
}
.tbl tr:first-child td {
border-top: 1px solid #363636;
}
.tbl tr:last-child td:only-child {
border-bottom: 1px solid #363636;
}
.tbl tr:last-child td:first-child {
border-bottom: 1px solid #363636;
}
.tbl tr:last-child td:last-child {
border-bottom: 1px solid #363636;
}
.tbl tr:last-child td {
border-bottom: 1px solid #363636;
}
.tbl .status {
text-align: center;
font-weight: bold;
}
.tbl .status.is-running {
background-color: var(--color-green);
color: var(--color-green-invert);
}
.tbl .status.is-stopped {
background-color: var(--color-red);
color: var(--color-red-invert);
width: 33%;
}
.tbl .status.is-vulnerable {
background-color: var(--color-red);
color: var(--color-red-invert);
}
.tbl .status.is-mitigation {
background-color: var(--color-blue);
color: var(--color-blue-invert);
}
.tbl .status.is-not-affected {
background-color: var(--color-green);
color: var(--color-green-invert);
}
table.fw-nat tbody tr td {
height: 2.25em;
}
/*
Graphs
*/
.graph {
padding: 0.125rem;
}
.graph img {
width: 100%;
min-height: 360px;
margin-bottom: 0.5rem;
padding: 0;
border: 1px solid var(--color-grey);
}
.graph ul {
list-style-type: none;
display: flex;
justify-content: center;
}
.graph ul li {
margin: 0 0.125rem;
}
.graph ul li button {
background: none;
border: none;
cursor: pointer;
background-color: var(--color-grey);
color: var(--color-text);
padding: 0.5rem 1rem;
}
.graph ul li button.selected {
background-color: var(--color-primary);
color: var(--color-primary-invert);
}
/* RRD graph images */
div.rrdimage > ul {
list-style-type: none;
margin: 0;
display: flex;
justify-content: center;
}
.rrdimage li:not(:first-child)::before {
content: "-";
padding: 0 0.3em;
}
.rrdimage button {
padding: 0.3em;
font-weight: 700;
color: #ff2e52;
border: none;
background: none;
cursor: pointer;
text-decoration: none;
}
.rrdimage button:focus {
outline: none;
box-shadow: none;
}
.rrdimage button.selected {
text-decoration: underline;
}
div.rrdimage > img {
padding: 0;
max-width: 100%;
min-height: 290px;
}