Set up home style and Splide carousel
This commit is contained in:
parent
750f457488
commit
9afaa44c4b
14 changed files with 222 additions and 232 deletions
5
assets/css/abstracts/_index.scss
Normal file
5
assets/css/abstracts/_index.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
// --------------------------------------------------
|
||||
// ABSTRACTS (INDEX)
|
||||
// --------------------------------------------------
|
||||
|
||||
@forward 'variables';
|
|
@ -1,6 +1,6 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// --------------------------------------------------
|
||||
// VARIABLES
|
||||
// ----------------------------------------------------------------------------
|
||||
// --------------------------------------------------
|
||||
|
||||
:root {
|
||||
|
80
assets/css/base/_base.scss
Normal file
80
assets/css/base/_base.scss
Normal 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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
6
assets/css/base/_index.scss
Normal file
6
assets/css/base/_index.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
// --------------------------------------------------
|
||||
// BASE (INDEX)
|
||||
// --------------------------------------------------
|
||||
|
||||
@forward 'minireset';
|
||||
@forward 'base';
|
|
@ -1,6 +1,6 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
/* --------------------------------------------------
|
||||
MINIRESET V0.0.6
|
||||
---------------------------------------------------------------------------- */
|
||||
-------------------------------------------------- */
|
||||
|
||||
html,
|
||||
body,
|
|
@ -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 *;
|
||||
|
|
58
assets/css/pages/_home.scss
Normal file
58
assets/css/pages/_home.scss
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
5
assets/css/pages/_index.scss
Normal file
5
assets/css/pages/_index.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
// --------------------------------------------------
|
||||
// PAGES (INDEX)
|
||||
// --------------------------------------------------
|
||||
|
||||
@forward 'home';
|
|
@ -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 {
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// ANIMATIONS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@keyframes expand-outline {
|
||||
0% {
|
||||
outline-offset: 0;
|
||||
}
|
||||
100% {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue