hugo_idunn/static/css/base.css

280 lines
5.1 KiB
CSS

/******************* Constants *******************/
:root {
--font-color: black;
--background-color: white;
--main-color: grey;
--font_above-color: white;
--max-width: 800px;
--max-width-full: 1000px;
--icon-size: 1em;
--footer-height-inline: 4em;
--footer-height-block: 8em;
--navbar-height: 8vh;
}
/******************* Base *******************/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: Roboto, Ubuntu, Oxygen, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-size: medium;
}
a {
color: black;
text-decoration: none;
}
a:visited {
color: black;
text-decoration: none;
}
body {
padding-top: var(--navbar-height);
line-height: 1.62;
min-height: 100vh;
margin: 0;
}
.page-icon {
display: inline-block;
max-width: var(--icon-size);
max-height: var(--icon-size);
}
/******************* Post *******************/
.post {
min-height: 92vh;
padding-top: 3em;
padding-bottom: var(--footer-height-inline);
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);
}
.footer .footer_link {
color: var(--font_above-color);
}
.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;
line-height: 8vh;
z-index: 50;
background: white;
box-shadow: 0 1px 5px black;
}
#navigation {
max-width: var(--max-width-full);
margin: auto;
}
.navigation-container {
height: 8vh
}
#navigation-list {
margin-bottom: 0;
}
.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);
}
.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;
cursor: pointer;
max-height: var(--navbar-height);
}
#navigation .menu-button-inner {
width: 100%;
height: 100%;
position:relative;
text-align:center
}
#navigation .menu-button .menu-button-image {
display: inline-block;
position: absolute;
height: 20px;
width: 24px;
top: 50%;
left: 50%;
background-image: url(../svg/bars.svg);
background-size: contain;
transform: translateX(-50%) translateY(-50%);
}
#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 {
height: 93vh;
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;
}