tanguy.gerome.fi/style/main.scss

385 lines
6.5 KiB
SCSS

$mainGreen: #2b762f;
$mainGrey: #0F0F0F;
@mixin main-width {
max-width: 800px;
}
@mixin top-level-padding {
padding: 0 16px;
@media all and (max-width: 400px) {
padding: 0 8px;
}
margin-bottom: 32px;
}
* {
box-sizing: border-box;
}
button {
&.link {
all: unset;
text-decoration: underline;
color: $mainGreen!important;
cursor: pointer;
}
}
a {
color: $mainGreen!important;
}
body {
font-family: 'Ubuntu', sans-serif;
text-align: left;
font-weight: 300;
font-size: 16px;
line-height: 1.4;
background: white;
color: $mainGrey;
display: flex;
height: 100%;
min-height: 100vh;
flex-direction: column;
align-items: center;
justify-content: space-between;
margin: 0;
.main-width {
width: 100%;
@include main-width;
@include top-level-padding;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Roboto Slab", serif;
font-weight: 300;
line-height: 1.3;
}
h1 { font-size: 42px; margin: 32px 0 16px 0; }
h2 { font-size: 32px; margin: 64px 0 16px 0; }
h3 { font-size: 22px; margin: 32px 0 16px 0; }
h4 { font-size: 18px; margin: 32px 0 16px 0; }
header {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.title-links-and-banner {
background: $mainGrey;
color: white;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
@media all and (max-width: 2000px) {
justify-content: flex-end;
}
@media all and (max-width: 800px) {
flex-direction: column;
align-items: stretch;
}
.text {
@include top-level-padding;
flex-basis: auto;
flex-shrink: 0;
flex-grow: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 16px;
h1 {
display: flex;
flex-direction: column;
align-items: flex-start;
margin: 0;
}
.links {
flex-shrink: 1;
display: flex;
flex-direction: column;
align-items: flex-end;
text-align: right;
gap: 8px;
a {
color: white!important;
font-size: 20px;
}
}
}
picture {
max-width: 800px;
width: 100%;
max-height: 300px;
height: 100%;
// display: contents;
.image {
max-width: 800px;
width: 100%;
max-height: 300px;
height: 100%;
object-fit: cover;
object-position: top;
flex-shrink: 1;
}
}
}
.language-switcher {
@include top-level-padding;
margin: 16px 0;
gap: 8px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
p {
margin: 0;
}
}
}
.markdown {
b, strong {
font-weight: 500;
}
img {
max-width: 100%;
}
}
footer {
background: $mainGrey;
color: white;
order: 100;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 10px 0;
.name-and-links {
@include top-level-padding;
flex-grow: 1;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
gap: 8px;
@media all and (max-width: 400px) {
flex-direction: column;
align-items: stretch;
}
.name {
}
.links {
display: flex;
flex-direction: row;
gap: 32px;
@media all and (max-width: 800px) {
gap: 8px;
flex-direction: column;
text-align: right;
}
a {
color: white!important;
}
}
}
}
}
.resume-image {
float: right;
max-width: 300px;
width: 100%;
margin: 16px;
@media all and (max-width: 550px) {
float: unset;
display: block;
margin: auto;
margin-top: 16px;
margin-bottom: 16px;
}
}
.gallery-entries, .blog-entries {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
padding: 0;
gap: 16px;
}
.blog-open-entry {
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
align-items: center;
.blog-illustration {
position: relative;
img {
max-height: 60vh;
width: 100vw;
max-width: 100vw;
object-fit: cover;
}
.blog-title {
display: block;
width: 100%;
position: absolute;
bottom: 0px;
padding-bottom: 16px;
padding-top: 64px;
margin: 0;
background: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 1.0));
color: white;
display: flex;
align-items: center;
justify-content: center;
p {
margin: 0;
}
}
}
}
.blog-wrapper {
max-width: 1250px!important;
width: fit-content;
}
.blog-thumbnail {
position: relative;
img {
height: 100%;
width: 100%;
max-height: 300px;
max-width: 300px;
object-fit: contain;
}
.blog-title {
text-align: center;
display: block;
width: 100%;
position: absolute;
bottom: 0px;
padding: 16px;
padding-top: 64px;
margin: 0;
background: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 1.0));
color: white;
}
}
.gallery-wrapper {
max-width: 1000px!important;
}
.gallery-thumbnail {
flex-grow: 1;
display: flex;
flex-basis: 300px;
align-items: center;
justify-content: center;
a {
display: block;
position: relative;
height: fit-content;
width: fit-content;
img {
max-height: 300px;
max-width: 300px;
object-fit: contain;
}
p {
text-align: center;
display: block;
width: 100%;
position: absolute;
bottom: 0px;
padding: 16px;
padding-top: 64px;
margin: 0;
background: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 1.0));
color: white;
}
}
}
.gallery-open-entry {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-top: 32px;
img {
object-fit: contain;
width: 100%;
max-height: 90vh;
max-width: 1232px;
align-self: center;
}
.gallery-title {
margin-bottom: 16px;
}
.gallery-subtitle {
margin-top: 16px;
margin-bottom: 8px;
}
.gallery-description {
margin-top: 8px;
margin-bottom: 64px;
}
}