hugo_idunn/static/css/base.css

280 lines
5.1 KiB
CSS
Raw Normal View History

2020-04-27 16:49:21 +02:00
/******************* Constants *******************/
:root {
--font-color: black;
--background-color: white;
--main-color: grey;
--font_above-color: white;
2020-04-27 16:49:21 +02:00
--max-width: 800px;
--max-width-full: 1000px;
--icon-size: 1em;
--footer-height-inline: 4em;
--footer-height-block: 8em;
2020-04-27 23:17:53 +02:00
--navbar-height: 8vh;
2020-04-27 16:49:21 +02:00
}
/******************* Base *******************/
*,
*::before,
*::after {
2020-04-27 23:17:53 +02:00
box-sizing: border-box;
}
html {
font-family: Roboto, Ubuntu, Oxygen, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-size: medium;
2020-04-27 16:49:21 +02:00
}
a {
color: black;
text-decoration: none;
}
a:visited {
color: black;
text-decoration: none;
}
body {
2020-04-27 23:17:53 +02:00
padding-top: var(--navbar-height);
2020-04-27 16:49:21 +02:00
line-height: 1.62;
2020-04-27 23:17:53 +02:00
min-height: 100vh;
2020-04-27 16:49:21 +02:00
margin: 0;
}
.page-icon {
display: inline-block;
max-width: var(--icon-size);
max-height: var(--icon-size);
}
/******************* Post *******************/
.post {
2020-04-27 23:17:53 +02:00
min-height: 92vh;
2020-04-27 16:49:21 +02:00
padding-top: 3em;
2020-04-27 23:17:53 +02:00
padding-bottom: var(--footer-height-inline);
2020-04-27 16:49:21 +02:00
margin-bottom: calc(-1 * var(--footer-height-inline));
}
.post:after {
content: "";
display: block;
}
.post_header {
margin: 0 auto;
width: 80%;
text-align: center;
max-width: var(--max-width);
}
.post_header .post_title {
font-size: 2em;
font-weight: normal;
}
.post_body {
margin: 0 auto;
width: 80%;
max-width: var(--max-width);
}
.post a {
text-decoration: underline dotted;
}
.post a:hover {
text-decoration: underline solid;
}
.post:after {
height: var(--footer-height-inline);
}
/******************* Footer *******************/
.footer {
height: var(--footer-height-inline);
background-color: var(--main-color);
color: var(--font_above-color);
2020-04-27 16:49:21 +02:00
}
.footer .footer_link {
color: var(--font_above-color);
2020-04-27 16:49:21 +02:00
}
.footer .footer_link:hover {
color: black;
}
.footer address {
margin: auto;
width: 90%;
max-width: var(--max-width-full);
display: flex;
justify-content: space-between;
line-height: var(--footer-height-inline);
}
.footer p {
margin: 0;
}
/******************* Navbar *******************/
.navbar {
position: fixed;
top: 0;
width: 100%;
margin: auto;
padding: 0 5vw;
2020-04-27 23:17:53 +02:00
line-height: 8vh;
2020-04-27 16:49:21 +02:00
z-index: 50;
background: white;
2020-04-27 18:58:52 +02:00
box-shadow: 0 1px 5px black;
2020-04-27 16:49:21 +02:00
}
#navigation {
max-width: var(--max-width-full);
margin: auto;
}
2020-04-27 23:17:53 +02:00
.navigation-container {
height: 8vh
}
2020-04-27 18:58:52 +02:00
#navigation-list {
margin-bottom: 0;
}
2020-04-27 16:49:21 +02:00
.navigation-item a {
color: var(--primary-text);
padding: 0.5rem 0;
position: relative;
}
.navigation-item a:hover,
.navigation-item a:focus {
color: var(--primary-text);
}
.navigation-item a::before {
bottom: 0;
content: "";
display: inline-block;
height: 3px;
position: absolute;
transition: all 0.25s ease-in-out;
width: 0%;
}
.navigation-item a::before {
background-color: var(--main-color);
2020-04-27 16:49:21 +02:00
}
.navigation-item a:hover::before,
.navigation-item a:focus::before {
opacity: 1;
width: 100%;
}
.navigation-item.active a::before {
opacity: 1;
width: 100%;
}
.navbar_title_logo {
max-width: 7rem;
vertical-align: middle;
}
/******************* Navbar Toggle *******************/
#menu-toggle {
display: none;
}
#navigation .menu-button {
float: right;
position:relative;
width: 4em;
height: 4em;
2020-04-28 08:10:37 +02:00
cursor: pointer;
max-height: var(--navbar-height);
2020-04-27 16:49:21 +02:00
}
#navigation .menu-button-inner {
2020-04-28 08:10:37 +02:00
width: 100%;
height: 100%;
2020-04-27 16:49:21 +02:00
position:relative;
text-align:center
}
#navigation .menu-button .menu-button-image {
display: inline-block;
2020-04-28 08:10:37 +02:00
position: absolute;
2020-04-27 16:49:21 +02:00
height: 20px;
width: 24px;
2020-04-28 08:10:37 +02:00
top: 50%;
left: 50%;
2020-04-27 16:49:21 +02:00
background-image: url(../svg/bars.svg);
background-size: contain;
2020-04-28 08:10:37 +02:00
transform: translateX(-50%) translateY(-50%);
2020-04-27 16:49:21 +02:00
}
#menu-toggle:checked + .menu-button .menu-button-image {
opacity: 40%;
}
#navigation-list {
position: absolute;
top: 6rem;
right: 0;
visibility: hidden;
opacity: 0;
max-height: 0;
width: 100%;
font-size: 1.5em;
background-color: var(--background-color);
border-top: solid 2px var(--font-color);
border-bottom: solid 2px var(--font-color);
transition: opacity .5s, max-height .35s linear;
padding: 0;
}
#navigation-list .navigation-item {
float: none !important;
text-align: center;
margin: 0;
display: block;
}
#navigation-list .navigation-item,
#navigation-list .navigation-item span {
line-height: 5rem;
margin: 0 1.5rem;
}
#menu-toggle:checked + label + ul {
visibility: visible;
opacity: 1;
max-height: max-content;
}
/******************* Front-screen *******************/
.front-screen {
2020-04-27 23:17:53 +02:00
height: 93vh;
2020-04-27 16:49:21 +02:00
position: relative;
padding-left: 3em;
margin: auto;
max-width: var(--max-width-full);
}
.front-screen_caption {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.front-screen_caption h1 {
font-weight: normal;
font-size: 4rem;
}
.front-screen_caption h2 {
font-weight: normal;
font-size: 1.5rem;
}
/******************* Main - Sections *******************/
.section, .separator {
width: 60%;
max-width: var(--max-width);
margin: auto;
}
.separator {
text-align: center;
}
.separator img {
width: .5em;
}
.section:last-of-type {
margin-bottom: 3em;
}
/******************* Social *******************/
#social {
text-align: center;
width: 60%;
max-width: var(--max-width);
margin: auto;
margin-top: 5em;
margin-bottom: 1em;
}
#social .social-icon {
max-width: 2em;
height: 2em;
margin: 0 1em;
}