2025-02-20 16:00:24 +01:00

335 lines
5.1 KiB
CSS

* {
box-sizing: border-box;
}
body {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
background-color: #EDEDED;
min-height: 100vh;
}
body, input, textarea {
font-family: "Calibri", sans-serif;
font-size: 18px;
}
header {
background-color: #002E5F;
color: #FFFFFF;
width: 100vw;
padding-left: 1.5rem;
padding-right: 1.5rem;
position: sticky;
top: 0;
display: flex;
align-items: baseline;
justify-content: space-between;
flex-grow: 0;
}
h1, h3 {
font-weight: initial;
}
topbox, configs {
width: 60rem;
padding: 1.5rem;
}
topbox {
display: flex;
justify-content: space-between;
background-color: #DCE4EE;
width: 60rem;
/*
fun!
z-index: 1;
position: sticky;
top: 0;
*/
}
topbox > button#create-config {
place-self: end;
}
h2, summary {
font-size: 1.5rem;
}
configs {
flex-grow: 10;
background-color: #FFFFFF;
display: grid;
gap: 1.5rem;
grid-template-columns: 1fr 1fr;
align-content: start;
}
placeholder {
display: none;
}
placeholder:only-child {
display: block;
color: #6A6A6A;
}
config, input, textarea {
border-radius: 0.5rem;
padding: 0.5rem;
}
config {
display: grid;
background-color: #EBF0F5;
border: 2px solid #DCE4EE;
border-radius: 0.5rem;
}
config >*:last-child {
margin-bottom: 0;
}
config > name {
grid-area: name;
align-self: baseline;
}
config > description {
grid-area: description;
align-self: stretch;
margin-bottom: 0.5rem;
}
config > data {
grid-area: data;
}
config > date {
grid-area: date;
justify-self: end;
align-self: baseline;
width: max-content;
}
config > svg {
grid-area: qr;
padding: 0.5rem;
background-color: #FFFFFF;
border: 2px solid #FFFFFF;
border-radius: 0.5rem;
}
config > footer {
grid-area: footer;
place-self: end;
}
name {
font-size: 1.5rem;
}
name, description {
margin-top: 0.2rem;
margin-bottom: 0.2rem;
}
description, data {
white-space: pre-wrap;
}
data, .conffile {
display: none;
}
backdrop {
background-color: rgba(0,0,0,0.6);
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
display: grid;
place-items: center;
}
wrapper {
background-color: #FFFFFF;
padding: 2rem;
border-radius: 1rem;
width: 60rem;
height: 30rem;
}
wrapper h3 {
margin-top: 0;
}
wrapper form {
height: 100%;
}
form {
display: flex;
flex-direction: column;
}
input, textarea {
border: 2px solid #DADADA;
}
textarea {
flex-grow: 10;
}
footer, left, right {
display: flex;
flex-direction: row-reverse;
}
footer {
justify-content: space-between;
}
form > footer {
margin-top: 0.5rem;
}
button {
color: #FFFFFF;
background-color: #002E5F;
border: 2px solid #33587F;
border-radius: 0.5rem;
padding: 0.5rem;
white-space: nowrap;
}
button + button {
margin-left: 0.2rem;
margin-right: 0.2rem;
}
button:hover {
background-color: #33587F;
}
button#create-config {
font-size: 1.2rem;
}
button.cancel {
color: #000000;
background-color: #BABABA;
border: 2px solid #DADADA;
}
button.cancel:hover {
background-color: #DADADA;
}
button.delete {
background-color: #D30000;
border: 2px solid #E43B3B;
}
button.delete:hover {
background-color: #E43B3B;
}
@media (width <= 66.7rem) {
wrapper {
width: 90vw;
}
}
@media (width < 60rem) {
topbox, configs {
width: 100vw;
}
topbox {
flex-direction: column;
}
config {
grid-template-areas:
"name date"
"description description"
"qr qr"
"footer footer";
grid-template-rows: min-content auto 280px 2.8rem;
}
config > svg {
justify-self: center;
width: 280px;
height: 280px;
}
}
@media (width >= 60rem), (width < 44rem) {
config {
grid-template-areas:
"name date"
"description description"
"qr footer";
grid-template-rows: min-content auto 240px;
}
config > svg {
justify-self: start;
align-self: start;
height: 240px;
width: 240px;
}
}
@media (width < 44rem) {
configs {
display: flex;
flex-direction: column;
}
}
@media (width < 30rem) {
config {
grid-template-areas:
"name date"
"description description"
"qr qr"
"footer footer";
grid-template-rows: min-content auto 280px 2.8rem;
}
config > svg {
justify-self: center;
width: 280px;
height: 280px;
}
}
@media (width < 22em) {
config {
display: flex;
flex-direction: column;
}
config > svg {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
margin-bottom: 0.5em;
}
}
@media (height < 33.3rem) {
wrapper {
height: 90vh;
}
textarea {
min-height: auto;
}
}