ddstats-server/src/sass/theme.scss

327 lines
5.6 KiB
SCSS

@use "partials/_shadows.scss";
@use "partials/_settings.scss";
@use "partials/_palette.scss";
*, *::before, *::after {
margin: 0;
padding: 0;
border: 0 none transparent;
box-sizing: border-box;
scroll-behavior: smooth;
font-family: 'Manrope Regular', sans-serif;
font-size: 1rem;
line-height: 1.5;
}
html, body {
color: palette.$text;
background-color: palette.$surface;
height: 100%;
}
nav {
display: flex;
align-items: center;
background-color: palette.$grey3;
border-radius: 0 0 settings.$border_radius_l settings.$border_radius_l;
box-shadow: shadows.$large;
margin: 0 0 2rem 0;
padding: 1rem 2rem;
.logo {
width: 3rem;
height: 3rem;
margin-right: 2rem;
border-radius: 100%;
background-color: palette.$primary;
}
a {
color: palette.$accent;
border-bottom: .1rem solid transparent;
margin: .25rem 1rem .5rem 1rem;
padding: .15rem .5rem .25rem .5rem;
font-size: 1.25rem;
text-decoration: none transparent;
transition: border .3s;
&:hover {
border-bottom: .1rem solid palette.$accent;
}
&.current {
color: palette.$primary;
&:hover {
border-bottom: .1rem solid palette.$primary;
}
}
}
}
.flex-container {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-around;
margin: 0 10vw;
}
//
// TEXT
//
header, h1, h2, h3, h4, h5, h6 {
color: palette.$accent;
}
header {
font-size: 4rem;
}
// No, I am not lazy...
// - BurnyLlama
@mixin heading($level) {
font-size: 1.65rem - ($level * 0.15);
font-weight: normal;
margin-top: 1em;
}
@for $i from 1 to 6 {
h#{$i} {
@include heading($i);
}
}
a {
color: palette.$blue5;
}
.long-text {
width: min(60ch, 80vw);
text-align: justify;
}
ul, ol {
margin: 1rem 0 1rem 2rem;
ul, ol {
margin: .25rem 0 .25rem 1rem;
}
}
//
// FORMS, INPUT
//
form {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
input {
color: palette.$text;
background-color: palette.$grey3;
margin: 1em 0;
padding: .75em 1.25em;
outline: 0 none transparent;
border: .2rem solid transparent;
border-radius: settings.$border_radius_s;
box-shadow: shadows.$small;
transition: border .3s, background-color .5s, border-radius .5s;
&:hover {
background-color: palette.$grey4;
border-radius: settings.$border_radius_m;
}
&:active, &:focus {
border: .2rem solid palette.$primary;
}
}
button[type=submit] {
margin: .75rem auto 1.25rem auto;
padding: .15rem .5rem;
border: .1rem solid palette.$accent;
border-radius: settings.$border_radius_s;
color: palette.$accent;
background-color: transparent;
cursor: pointer;
text-decoration: none transparent;
transition: color .3s, background-color .3s;
&:hover {
color: palette.$surface;
background-color: palette.$accent;
}
}
label {
cursor: pointer;
margin: .25rem 0;
>input[type=radio] {
// RESET
-webkit-appearance: none;
appearance: none;
cursor: pointer;
margin: 0 .5rem -.25rem 1rem;
padding: 0;
width: 1.25rem;
height: 1.25rem;
background-color: palette.$grey15;
border: .25rem solid palette.$grey15;
border-radius: 100%;
&:checked {
border-color: palette.$primary;
}
}
&:hover>input[type=radio] {
background-color: palette.$accent;
}
}
#search {
display: grid;
grid-template-columns: 2fr 1fr;
grid-template-columns: repeat(auto, 4);
grid-template-areas: 'header header'
'map map'
'category category'
'stars sort'
'submit submit';
width: min(90ch, 80vw);
margin: 2rem 10vw;
>* {
width: 100%;
}
h1 {
grid-area: header;
}
#map {
grid-area: map;
}
#categories {
grid-area: category;
}
#stars {
grid-area: stars;
}
.sorting {
grid-area: sort;
display: flex;
flex-direction: column;
}
button[type=submit] {
grid-area: submit;
width: max-content;
margin: auto;
}
}
//
// PAGINATION
//
.pages {
width: 100%;
justify-content: center;
}
.page {
margin: .5rem;
padding: .15rem .5rem;
border: .1rem solid palette.$accent;
border-radius: settings.$border_radius_s;
color: palette.$accent;
background-color: transparent;
cursor: pointer;
text-decoration: none transparent;
transition: color .3s, background-color .3s;
&:hover {
color: palette.$surface;
background-color: palette.$accent;
}
&.current-page {
color: palette.$primary;
border-color: palette.$primary;
&:hover {
color: palette.$surface;
background-color: palette.$primary;
}
}
}
//
// TABLES
//
tr {
width: max-content;
td {
padding: .25rem 0;
vertical-align: middle;
width: max-content;
}
td:first-child {
padding: .25rem 1.5rem .25rem 0;
}
}
//
// FOOTER
//
footer {
display: flex;
flex-direction: column;
align-items: center;
margin: 5vh 2rem;
a {
color: palette.$blue4;
font-size: 0.8rem;
}
}