Set up home style and Splide carousel

This commit is contained in:
Paul Nicoué 2025-05-23 17:17:38 +02:00
parent 750f457488
commit 9afaa44c4b
14 changed files with 222 additions and 232 deletions

View file

@ -0,0 +1,5 @@
// --------------------------------------------------
// ABSTRACTS (INDEX)
// --------------------------------------------------
@forward 'variables';

View file

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------------
// --------------------------------------------------
// VARIABLES
// ----------------------------------------------------------------------------
// --------------------------------------------------
:root {

View file

@ -0,0 +1,80 @@
@use '../abstracts' as *;
// --------------------------------------------------
// BASE STYLE
// --------------------------------------------------
// Fonts and colors
body {
font-family: var(--text-font-family);
font-size: var(--text-font-size);
line-height: var(--text-line-height);
color: var(--black);
}
strong {
font-weight: var(--bold-font-weight);
}
em {
font-style: italic;
}
// Link style
a {
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;
}
}
// General layout
body {
min-height: 100vh !important;
header {
position: fixed;
top: 0;
.header__logo {
width: 5rem;
}
}
main {}
footer {
position: fixed;
bottom: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 0.8rem;
.footer__link {
display: flex;
justify-content: center;
align-items: center;
width: var(--icon-size);
height: var(--icon-size);
svg {
width: 100%;
height: 100%;
}
}
}
}

View file

@ -0,0 +1,6 @@
// --------------------------------------------------
// BASE (INDEX)
// --------------------------------------------------
@forward 'minireset';
@forward 'base';

View file

@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
/* --------------------------------------------------
MINIRESET V0.0.6
---------------------------------------------------------------------------- */
-------------------------------------------------- */
html,
body,

View file

@ -1,128 +1,7 @@
@use 'utils/minireset';
@use '@splidejs/splide/dist/css/splide-core.min';
@use 'partials/variables' as *;
@use 'partials/animations';
// ----------------------------------------------------------------------------
// GENERALITIES
// ----------------------------------------------------------------------------
// Fonts and colors
body {
font-family: var(--text-font-family);
font-size: var(--text-font-size);
line-height: var(--text-line-height);
color: var(--black);
}
strong {
font-weight: var(--bold-font-weight);
}
em {
font-style: italic;
}
// Link style
a {
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;
}
}
// General layout
body {
min-height: 100vh;
overflow-x: hidden;
}
// ----------------------------------------------------------------------------
// --------------------------------------------------
// MAIN
// ----------------------------------------------------------------------------
// --------------------------------------------------
// Home section
.home-section {
position: relative;
z-index: 1;
width: 100%;
min-height: 100vh;
padding: var(--sidebar-padding);
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
}
.social {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
margin: 0.8rem 0 0 0;
&__link {
width: var(--icon-size);
height: var(--icon-size);
display: flex;
justify-content: center;
align-items: center;
+ .social__link {
margin: 0 0 0 0.8rem;
}
svg {
width: 100%;
height: 100%;
}
&--white {
&:focus-visible {
outline: 1px dashed var(--white);
}
}
}
}
@media screen and (min-width: $tablet-media-query) {
.social {
justify-content: flex-start;
}
}
@media screen and (min-width: $desktop-media-query) {}
// Slider section
.slider-section {
position: fixed;
top: 0;
left: 0;
}
.splide {
&__image {
width: 100%;
height: 100%;
object-fit: cover;
}
}
@use '@splidejs/splide/dist/css/splide-core.min';
@use "base" as *;
@use "pages" as *;

View file

@ -0,0 +1,58 @@
@use '../abstracts' as *;
// --------------------------------------------------
// HOME STYLE
// --------------------------------------------------
.home {
.home__gallery {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
.home__gallery-item {
display: table;
max-width: min(1280px, 100%);
.home__carousel {
&:where(.splide) {
cursor: pointer;
.splide__track {
.splide__list {
position: relative;
.splide__slide {
transform: none !important;
&:not(.is-active) {
position: absolute;
inset: 0;
}
.splide__image {
max-height: 80vh;
}
}
}
}
}
}
.home__main-image {
max-height: 80vh;
}
.home__image-caption {
display: table-caption;
caption-side: bottom;
width: fit-content;
margin: 0.5rem auto 0;
}
}
}
}

View file

@ -0,0 +1,5 @@
// --------------------------------------------------
// PAGES (INDEX)
// --------------------------------------------------
@forward 'home';

View file

@ -1,9 +1,8 @@
// ----------------------------------------------------------------------------
// --------------------------------------------------
// KIRBY PANEL CUSTOMIZATION
// ----------------------------------------------------------------------------
// Image gallery structure field gallery
// --------------------------------------------------
// Image gallery structure field
.k-field-name-image_gallery {
table {
@ -16,7 +15,6 @@
}
// CV writer field
.k-field-name-cv {
.k-text {

View file

@ -1,12 +0,0 @@
// ----------------------------------------------------------------------------
// ANIMATIONS
// ----------------------------------------------------------------------------
@keyframes expand-outline {
0% {
outline-offset: 0;
}
100% {
outline-offset: 2px;
}
}