vertical lines : centraliser en fixed dans App.svelte
- Retirer les lignes des views (Home, Expertise, About, Portfolio) - Centraliser dans App.svelte en position:fixed, visibilité par slide via transition de hauteur 0→100vh selon slides.active.template - Positions calculées depuis la golden-grid (1/6, 1/3, 1/2, 2/3, 5/6) - Nettoyer layout.css (garder seulement les classes pour Menu.svelte) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9b548ecc12
commit
a043a8c281
7 changed files with 57 additions and 62 deletions
|
|
@ -36,6 +36,15 @@
|
|||
const wrapperWidth = $derived(`${slides.all.length * 100}vw`)
|
||||
const wrapperTransform = $derived(`translateX(-${slides.activeIndex * 100}vw)`)
|
||||
|
||||
const linesBySlide = {
|
||||
home: [6, 11, 16],
|
||||
expertise: [6, 8, 11, 14, 16],
|
||||
about: [6, 8, 11, 14, 16],
|
||||
portfolio: [11, 16],
|
||||
}
|
||||
const ALL_COLS = [6, 8, 11, 14, 16]
|
||||
const activeLines = $derived(new Set(linesBySlide[slides.active?.template] ?? []))
|
||||
|
||||
let isReady = $state(false)
|
||||
let isResizing = $state(false)
|
||||
let resizeTimer = null
|
||||
|
|
@ -127,6 +136,12 @@
|
|||
<Header />
|
||||
<div class="bg-fixed" style="background-image: url('/assets/img/scrollable-page-background.png')"></div>
|
||||
|
||||
<div class="vertical-lines" aria-hidden="true">
|
||||
{#each ALL_COLS as col}
|
||||
<div class="vl vl-col{col}" class:visible={activeLines.has(col)}></div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<main class="main">
|
||||
<div
|
||||
class="slides-wrapper"
|
||||
|
|
@ -204,4 +219,28 @@
|
|||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.vertical-lines {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: var(--z-base);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.vl {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 0;
|
||||
border-left: 0.1px solid rgba(238, 238, 238, 0.2);
|
||||
overflow: hidden;
|
||||
transition: height 600ms cubic-bezier(0.77, 0, 0.175, 1);
|
||||
}
|
||||
|
||||
.vl.visible { height: 100vh; }
|
||||
|
||||
.vl-col6 { left: calc(10.66 / 63.96 * 100%); }
|
||||
.vl-col8 { left: calc(21.32 / 63.96 * 100%); }
|
||||
.vl-col11 { left: calc(31.98 / 63.96 * 100%); }
|
||||
.vl-col14 { left: calc(42.64 / 63.96 * 100%); }
|
||||
.vl-col16 { left: calc(53.30 / 63.96 * 100%); }
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue