Compare commits
3 commits
0b19589288
...
3ce350d2d7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ce350d2d7 | ||
|
|
7bc6451ae5 | ||
|
|
594d53f50e |
1 changed files with 28 additions and 12 deletions
|
|
@ -122,16 +122,22 @@
|
|||
|
||||
<!-- Sidebar navigation (extrême droite) -->
|
||||
<nav class="portfolio-nav" aria-label="Projets">
|
||||
{#each projects as project, i}
|
||||
<button
|
||||
class="portfolio-nav-item"
|
||||
class:active={i === currentIndex}
|
||||
onclick={() => { currentIndex = i; setAnchor(i) }}
|
||||
>
|
||||
<img src={project.thumbnail} alt={project.title} />
|
||||
<span class="portfolio-nav-number">{String(i + 1).padStart(2, '0')}</span>
|
||||
</button>
|
||||
{/each}
|
||||
<ul role="list">
|
||||
{#each projects as project, i}
|
||||
<li class="portfolio-nav-item" class:active={i === currentIndex}>
|
||||
<button
|
||||
aria-current={i === currentIndex ? 'true' : undefined}
|
||||
aria-label={project.title}
|
||||
onclick={() => { currentIndex = i; setAnchor(i) }}
|
||||
>
|
||||
{#if project.thumbnail?.length}
|
||||
<img src={project.thumbnail} alt="" />
|
||||
{/if}
|
||||
<span class="portfolio-nav-number" aria-hidden="true">{String(i + 1).padStart(2, '0')}</span>
|
||||
</button>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
|
||||
|
|
@ -182,6 +188,7 @@
|
|||
|
||||
.portfolio-text h2 {
|
||||
font-size: var(--font-size-title-main);
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
|
@ -215,6 +222,11 @@
|
|||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.portfolio-nav ul {
|
||||
list-style: none;
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.portfolio-nav {
|
||||
grid-area: 4/17 / span 14 / span 4;
|
||||
padding-right: 8rem;
|
||||
|
|
@ -226,7 +238,11 @@
|
|||
gap: 1rem;
|
||||
}
|
||||
|
||||
.portfolio-nav-item {
|
||||
.portfolio-nav-item:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.portfolio-nav-item button {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
|
|
@ -238,7 +254,7 @@
|
|||
transition: transform 0.6s var(--ease-standard), opacity 0.6s var(--ease-standard);
|
||||
}
|
||||
|
||||
.portfolio-nav-item.active {
|
||||
.portfolio-nav-item.active button {
|
||||
transform: scale(1.5) translateX(-20%);
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue