Edit base and home style
This commit is contained in:
parent
9b238fcf7d
commit
00d58f620d
10 changed files with 61 additions and 32 deletions
|
@ -2,23 +2,38 @@
|
|||
// VARIABLES
|
||||
// --------------------------------------------------
|
||||
|
||||
// Fonts
|
||||
// ----- FONTS
|
||||
|
||||
$text-font-family: Helvetica, Arial, sans-serif;
|
||||
$text-font-size: 0.9rem;
|
||||
$text-line-height: 1.15;
|
||||
|
||||
// Dimensions
|
||||
$app-width: min(100%, 120rem); // => 1920px
|
||||
$large-content-width: min(100%, 100rem); // => 1600px
|
||||
$medium-content-width: min(100%, 80rem); // => 1280px
|
||||
$small-content-width: min(100%, 60rem); // => 960px
|
||||
$icon-size: clamp(2rem, 1.667rem + 0.694vw, 2.5rem); // Viewport range: 48rem <=> 120rem
|
||||
$icon-spacing: clamp(0.25rem, 0.083rem + 0.347vw, 0.5rem); // Viewport range: 48rem <=> 120rem
|
||||
// ----- COLORS
|
||||
|
||||
// Colors
|
||||
$black: #000;
|
||||
$white: #fff;
|
||||
|
||||
// ----- DIMENSIONS
|
||||
|
||||
// Content
|
||||
$content-width-xs: min(100%, 40rem); // => 640px
|
||||
$content-width-s: min(100%, 60rem); // => 960px
|
||||
$content-width-m: min(100%, 80rem); // => 1280px
|
||||
$content-width-l: min(100%, 100rem); // => 1600px
|
||||
$content-width-xl: min(100%, 120rem); // => 1920px
|
||||
|
||||
// Sidebar
|
||||
$sidebar-padding-x: clamp(0.75rem, -0.75rem + 3.125vw, 3rem); // Viewport range: 48rem <=> 120rem
|
||||
$sidebar-padding-y: clamp(0.75rem, 0.25rem + 1.042vw, 1.5rem); // Viewport range: 48rem <=> 120rem
|
||||
|
||||
// Logo
|
||||
$logo-portrait-width: clamp(2rem, 1.333rem + 1.389vw, 3rem); // Viewport range: 48rem <=> 120rem
|
||||
$logo-landscape-width: calc($logo-portrait-width * 2);
|
||||
|
||||
// Icons
|
||||
$icon-size: clamp(2rem, 1.667rem + 0.694vw, 2.5rem); // Viewport range: 48rem <=> 120rem
|
||||
$icon-spacing: clamp(0.25rem, 0.083rem + 0.347vw, 0.5rem); // Viewport range: 48rem <=> 120rem
|
||||
|
||||
// Media queries
|
||||
$tablet-media-query: 48rem; // => 768px
|
||||
$desktop-media-query: 62rem; // => 992px
|
||||
|
|
|
@ -43,55 +43,65 @@ body {
|
|||
#app {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
justify-content: center;
|
||||
justify-items: center;
|
||||
width: $app-width;
|
||||
width: $content-width-xl;
|
||||
|
||||
header {
|
||||
grid-column: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100vh; // Fallback in case dvh unit is not supported
|
||||
height: 100dvh;
|
||||
padding: 1rem;
|
||||
padding: $sidebar-padding-y $sidebar-padding-x;
|
||||
|
||||
.header__logo {
|
||||
position: relative;
|
||||
width: $icon-size;
|
||||
width: $logo-portrait-width;
|
||||
aspect-ratio: calc(1 / 2);
|
||||
background-image: url("/public/images/signature-vertical.svg");
|
||||
background-image: url("/public/images/signature-portrait.svg");
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
|
||||
@media screen and (min-width: $desktop-media-query) {
|
||||
width: calc(($icon-size * 2) + $icon-spacing);
|
||||
@media (orientation: landscape) {
|
||||
width: $logo-landscape-width;
|
||||
aspect-ratio: calc(2 / 1);
|
||||
background-image: url("/public/images/signature-horizontal.svg");
|
||||
background-image: url("/public/images/signature-landscape.svg");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
grid-column: 2;
|
||||
width: $large-content-width;
|
||||
padding: calc(2rem + $icon-size) 0;
|
||||
padding: calc(($sidebar-padding-y * 2) + ($logo-portrait-width * 2)) 0;
|
||||
|
||||
@media (orientation: landscape) {
|
||||
padding: calc(($sidebar-padding-y * 2) + ($logo-landscape-width / 2)) 0;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
grid-column: 3;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100vh; // Fallback in case dvh unit is not supported
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
gap: $icon-spacing;
|
||||
padding: 1rem;
|
||||
padding: $sidebar-padding-y $sidebar-padding-x;
|
||||
|
||||
@media screen and (min-width: $desktop-media-query) {
|
||||
@media (orientation: landscape) {
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
width: $content-width-m;
|
||||
|
||||
.home__gallery-item {
|
||||
display: table;
|
||||
max-width: $medium-content-width;
|
||||
|
||||
.home__carousel {
|
||||
|
||||
|
@ -50,10 +50,7 @@
|
|||
.home__image-caption {
|
||||
display: table-caption;
|
||||
caption-side: bottom;
|
||||
width: fit-content;
|
||||
margin: 0.5rem auto 0;
|
||||
padding: 0 0.5rem;
|
||||
text-align: center;
|
||||
margin: 0.5rem 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue