julienmonnerie/assets/css/main.scss

304 lines
5.9 KiB
SCSS
Raw Normal View History

2022-07-18 19:15:03 +02:00
@use 'utils/minireset';
2022-08-02 18:50:27 +02:00
@use '@splidejs/splide/dist/css/splide-core.min';
2022-06-17 17:51:59 +02:00
@use 'partials/fonts';
@use 'partials/variables' as *;
@use 'partials/animations';
// ----------------------------------------------------------------------------
// GENERALITIES
// ----------------------------------------------------------------------------
// Fonts and colors
2022-07-06 17:18:42 +02:00
body {
2022-09-09 15:26:04 +02:00
font-family: var(--text-font-family);
font-size: var(--text-font-size);
line-height: var(--text-line-height);
color: var(--black);
background-color: var(--feldgrau);
2022-08-01 16:59:46 +02:00
}
2022-07-06 17:18:42 +02:00
h1 {
2022-09-09 15:26:04 +02:00
font-family: var(--title-font-family);
font-size: var(--h1-font-size);
line-height: var(--h1-line-height);
2022-07-06 17:18:42 +02:00
}
2022-06-17 17:51:59 +02:00
2022-07-06 17:18:42 +02:00
h2 {
2022-09-09 15:26:04 +02:00
font-family: var(--text-font-family);
font-size: var(--h2-font-size);
line-height: var(--h2-line-height);
margin: 0 0 4rem 0;
2022-07-06 17:18:42 +02:00
}
h3 {
2022-09-09 15:26:04 +02:00
font-family: var(--text-font-family);
font-size: var(--h3-font-size);
line-height: var(--h3-line-height);
margin: 2rem 0 1rem 0;
2022-07-06 17:18:42 +02:00
}
p {
2022-09-09 15:26:04 +02:00
text-align: justify;
2022-07-01 16:04:59 +02:00
}
2022-07-06 17:18:42 +02:00
strong {
2022-09-09 15:26:04 +02:00
font-weight: var(--bold-font-weight);
2022-07-01 16:04:59 +02:00
}
2022-07-06 17:18:42 +02:00
em {
2022-09-09 15:26:04 +02:00
font-style: italic;
2022-07-01 16:04:59 +02:00
}
2022-07-06 17:18:42 +02:00
// Link style
a {
2022-09-09 15:26:04 +02:00
color: var(--black);
text-decoration: none;
transition: text-decoration 200ms ease-in-out;
&:hover,
&:focus,
&:active {
text-decoration: underline;
}
&:focus-visible {
outline: 1px dashed var(--black);
outline-offset: 2px;
animation: expand-outline 200ms ease-in-out;
}
2022-07-06 17:18:42 +02:00
}
// General layout
body {
2022-09-09 15:26:04 +02:00
min-height: 100vh;
overflow-x: hidden;
2022-08-08 12:40:16 +02:00
}
@media screen and (min-width: $desktop-media-query) {
2022-09-09 15:26:04 +02:00
body {
overflow-y: hidden;
}
2022-07-01 16:04:59 +02:00
}
2022-06-17 17:51:59 +02:00
// ----------------------------------------------------------------------------
// HEADER
// ----------------------------------------------------------------------------
2022-07-21 17:20:07 +02:00
// Sidebar
2022-06-17 17:51:59 +02:00
2022-07-21 17:20:07 +02:00
.sidebar {
position: relative;
z-index: 2;
2022-09-09 15:26:04 +02:00
width: 100%;
padding: var(--sidebar-padding);
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
background-color: transparent;
.sidebar__nav {
max-width: 100%;
}
.sidebar__nav-item {
+ .sidebar__nav-item {
margin: 0.5rem 0 0 0;
}
}
.sidebar__nav-link {
display: inline-block;
max-width: 100%;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
transition: color 200ms ease-in-out;
&--white {
color: var(--white);
&:focus-visible {
outline: 1px dashed var(--white);
}
}
2022-09-09 15:26:04 +02:00
}
.sidebar__social {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
margin: 1rem 0 0 0;
}
.sidebar__social-link {
width: var(--icon-size);
height: var(--icon-size);
display: flex;
justify-content: center;
align-items: center;
+ .sidebar__social-link {
margin: 0 0 0 1rem;
}
svg {
width: 100%;
height: 100%;
fill: var(--black);
transition: fill 200ms ease-in-out;
}
&--white {
&:focus-visible {
outline: 1px dashed var(--white);
}
svg {
fill: var(--white);
}
}
2022-09-09 15:26:04 +02:00
}
2022-08-05 17:14:28 +02:00
}
2022-07-26 17:03:58 +02:00
2022-08-08 12:40:16 +02:00
@media screen and (min-width: $desktop-media-query) {
2022-07-22 17:53:26 +02:00
2022-09-09 15:26:04 +02:00
.sidebar {
&--fixed {
position: fixed;
z-index: 3;
overflow-y: auto;
2022-09-09 15:26:04 +02:00
top: 0;
bottom: 0;
left: 0;
}
&--slimmed {
width: 15%;
min-width: 15rem;
.sidebar__nav-link {
color: var(--transparent-black);
}
.sidebar__social-link {
svg {
fill: var(--transparent-black);
}
2022-09-09 15:26:04 +02:00
}
&:hover {
.sidebar__nav-link {
color: var(--black);
}
.sidebar__social-link {
svg {
fill: var(--black);
}
2022-09-09 15:26:04 +02:00
}
}
.sidebar__nav-link {
2022-09-09 15:26:04 +02:00
&:focus-visible {
color: var(--black);
}
}
.sidebar__social-link {
&:focus-visible {
svg {
fill: var(--black);
}
}
2022-09-09 15:26:04 +02:00
}
}
.sidebar__social {
width: auto;
justify-content: flex-start;
}
}
2022-07-06 17:18:42 +02:00
}
2022-06-17 17:51:59 +02:00
// ----------------------------------------------------------------------------
// MAIN
// ----------------------------------------------------------------------------
2022-08-02 18:50:27 +02:00
// Slider section
.slider-section {
position: fixed;
z-index: 1;
top: 0;
right: 0;
visibility: visible;
opacity: 1;
transition:
visibility 0ms 400ms,
opacity 400ms ease-in-out;
&--hidden {
visibility: hidden;
opacity: 0;
transition:
visibility 0ms,
opacity 400ms ease-in-out;
2022-09-09 15:26:04 +02:00
}
2022-08-02 18:50:27 +02:00
}
.splide__image {
width: 100%;
height: 100%;
object-fit: cover;
}
2022-07-22 17:53:26 +02:00
// Exhibition section
2022-06-17 17:51:59 +02:00
2022-07-22 17:53:26 +02:00
.exhibition-section {
2022-09-09 15:26:04 +02:00
display: none;
2022-07-06 17:18:42 +02:00
}
2022-08-08 12:40:16 +02:00
@media screen and (min-width: $desktop-media-query) {
2022-08-05 17:14:28 +02:00
2022-09-09 15:26:04 +02:00
.exhibition-section {
position: relative;
z-index: 2;
2022-09-09 15:26:04 +02:00
display: block;
width: 100vw;
height: 100vh;
}
.exhibition {
visibility: hidden;
2022-09-09 15:26:04 +02:00
opacity: 0;
width: 100%;
height: 100%;
transition:
visibility 0ms,
opacity 400ms ease-in-out;
2022-09-09 15:26:04 +02:00
&--visible {
visibility: visible;
2022-09-09 15:26:04 +02:00
opacity: 1;
transition:
visibility 0ms 400ms,
opacity 400ms ease-in-out;
2022-09-09 15:26:04 +02:00
}
}
2022-07-28 18:59:14 +02:00
}