Files
ISPDowntimeMonitor/src/site/style.css
KevinMidboe 06b01e5a3a /site contains static start of frontend.
Started a frontend for displaying the information collected.
 - Need dynamic data.
 - Needs a webserver to serve page.
2020-06-01 23:22:25 +02:00

216 lines
3.5 KiB
CSS

/**/
:root {
color-scheme: light;
--text-color: black;
--background-color: white;
--page-background-color: #ebeceb;
--page-background-color-40: rgba(247,249,249,0.4);
--page-background-color-80: rgba(247,249,249,0.8);
--green: #7bed9f;
--red: #ff4757;
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: light dark;
--text-color: white;
--background-color: #1c1d1e;
--page-background-color: black;
--page-background-color-40: rgba(0,0,0,0.4);
--page-background-color-80: rgba(0,0,0,0.8);
}
}
@font-face {
font-family: AppleSF;
src: url(SF-Pro-Rounded-Light.otf);
}
body {
font-family: AppleSF;
background-color: var(--page-background-color);
padding: 0 1rem;
margin: 1rem;
}
.page-container {
background-color: var(--background-color);
border-radius: 0.5rem;
min-height: 60vh;
height: 100%;
padding: .1px 2rem 1.5rem 2rem;
}
h1,h2,h3,h4 {
margin: 1.5rem 0;
padding: 0;
}
h1 {
font-size: 3rem;
}
h2 {
font-size: 2rem;
}
.container {
border-radius: 0.5rem;
}
hr {
margin: 2.5rem 1rem;
height: 1px;
background-color: var(--text-color);
border: none
}
#bar-graph {
position: relative;
width: 100%;
height: 55px;
display: flex;
flex-direction: row-reverse;
border-radius: 0.4rem;
/*overflow: hidden;*/
/*margin: 2rem 0;*/
background-color: var(--page-background-color-40);
}
.event.error {
/* position: absolute;
height: 100%;
width: 0.5rem;*/
background-color: var(--red);
}
.event {
height: 100%;
width: 1rem;
background-color: var(--green);
position: relative;
transition: transform 0.1s ease;
}
.event:not(:last-of-type) {
margin-left: 1px;
}
.event .tooltip {
visibility: hidden;
background-color: var(--page-background-color-80);
text-align: center;
padding: 0.4rem;
border-radius: 0.2rem;
position: absolute;
width: max-content;
top: calc(100% + 1rem);
left: 50%;
margin-left: -5rem;
}
.event:hover {
transform: scale(1.2);
z-index: 1;
box-shadow: -2px -2px 4px rgba(0,0,0,0.4),
2px 2px 4px rgba(0,0,0,0.4);
}
.event:hover .tooltip {
visibility: visible;
}
/*.error:nth-of-type(1) {
left: 2rem;
}
.error:nth-of-type(2) {
left: 22rem;
}
.error:nth-of-type(3) {
right: 12rem;
}*/
.color-indicators {
display: flex;
flex-direction: row;
margin: 1rem 0;
}
.color-indicator-box {
display: block;
width: 1.1rem;
height: 1.1rem;
border-radius: 0.2rem;
margin-right: 0.5rem;
}
.color-indicators .color-indicator-box:not(:first-of-type) {
margin-left: 1.5rem;
}
.color-indicators span {
font-size: 1.1rem;
font-weight: 500;
letter-spacing: 1.5px;
}
/*.color-indicator-box:first-child) {
background-color: red;
}*/
.green {
background-color: var(--green);
}
.red {
background-color: var(--red);
}
#log-table {
width: 100%;
}
th {
text-align: left;
padding: 0.2rem 0.4rem;
}
tr {
font-size: 1.2rem;
margin: 0.3rem 0;
transition: transform 0.3s ease;
}
td {
padding: 0.6rem 0.4rem;
}
tr td:first-child {
border-radius: 0.3rem 0 0 0.3rem;
}
tr td:last-child {
border-radius: 0 0.3rem 0.3rem 0;
}
tbody tr:hover {
background-color: var(--page-background-color);
transform: scale(1.01);
cursor: pointer;
}
#popover {
position: absolute;
top: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
background-color: var(--page-background-color-40);
}
#popover .container {
width: 70%;
height: 80%;
background-color: var(--background-color);
border-radius: 0.75rem;
}