Setup frontend — fonts, SCSS structure, header scroll animation

- Add Bartok font-faces (Regular, Poster, Highlight)
- Structure SCSS with reset, variables, global, header, home partials
- Build fixed header with characters SVG and scroll-driven offset animation
- Add home template wiring snippets
- Update .gitignore to track src/ and exclude local/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-04-28 17:53:54 +02:00
parent 4c0fad1446
commit c85e0c5a1a
17 changed files with 230 additions and 2 deletions

7
.gitignore vendored
View file

@ -61,8 +61,6 @@ content/*
# CSS
# ---------------
assets/css/src
assets/css/src/*
assets/css/style.css
assets/css/style.css.map
@ -72,3 +70,8 @@ kirby
kirby/*
vendor
vendor/*
# Local files
# ---------------
local
local/*

View file

@ -0,0 +1,20 @@
@font-face {
font-family: "Bartok";
src: url("../fonts/BartokTrial-Regular.otf") format("opentype");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Bartok";
src: url("../fonts/BartokTrial-Poster.otf") format("opentype");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: "Bartok";
src: url("../fonts/BartokTrial-Highlight.otf") format("opentype");
font-weight: 900;
font-style: normal;
}

View file

@ -0,0 +1,9 @@
// Styles of the raw HTML elements
body {
background-color: var(--color-green);
}
button {
cursor: pointer;
}

View file

@ -0,0 +1,53 @@
body > .logo {
width: 100%;
box-sizing: border-box;
text-align: center;
position: absolute;
font-family: "Bartok", sans-serif;
font-size: 6rem;
text-transform: uppercase;
line-height: 0.8;
z-index: -1;
}
.main-header {
position: fixed;
top: 0;
width: 100%;
text-align: center;
z-index: 1;
.top {
display: flex;
justify-content: space-between;
button {
font-family: "Bartok", sans-serif;
text-transform: uppercase;
font-size: 2rem;
font-weight: 600;
}
}
.characters {
margin-top: var(--offset);
svg {
margin-top: -2.5rem;
#left-character-background,
#right-character-background path {
fill: var(--color-green) !important;
}
}
}
.strip {
box-sizing: border-box;
width: 100%;
padding: 1rem 0;
background-color: var(--color-beige);
border-radius: var(--radius);
border: var(--border);
font-family: "Bartok", sans-serif;
font-size: 2rem;
font-weight: 600;
}
}

View file

@ -0,0 +1,24 @@
body,
html {
margin: 0;
padding: 0;
}
button {
border: none;
background-color: transparent;
padding: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
figcaption {
margin: 0;
padding: 0;
}

View file

@ -0,0 +1,7 @@
:root {
--color-green: #0bb786;
--color-beige: #f3f0e7;
--radius: 0.8rem;
--border: 2px solid #000;
}

View file

@ -0,0 +1,5 @@
[data-template="home"] {
main {
height: 200vh;
}
}

View file

@ -0,0 +1,6 @@
@import "src/reset";
@import "src/fonts";
@import "src/variables";
@import "src/global";
@import "src/header";
@import "src/pages/home";

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="304px" height="259px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:10;">
<g transform="matrix(1,0,0,1,19.906396,19.909726)">
<g id="right-character-background" transform="matrix(1,0,0,1,-0.12,0)">
<path d="M249.93,112.67C257.02,113.3 256.91,107.59 256.61,102.85C256.12,95.14 260.71,91.79 261.31,88.25C262.61,80.54 257.62,77.55 253.38,80.39L248.44,86.77C252.75,53.53 252.3,39.3 242.17,26.37C229.79,10.57 209.7,2.2 198.36,2.2C187.01,2.2 166.92,10.57 154.55,26.37C144.931,38.648 144.04,52.099 147.665,81.887C147.858,83.468 148.063,85.095 148.28,86.77L143.58,80.39C139.34,77.55 134.35,80.54 135.65,88.25C136.25,91.79 140.84,95.14 140.35,102.85C140.05,107.59 139.94,113.3 147.03,112.67L150.12,113.56C149.66,117.67 150.16,119.74 150.65,122.32C151.92,129.09 155.79,139.79 167.27,149.93C174.38,156.21 176.05,170.49 198.93,170.49C221.81,170.49 223.48,156.22 230.59,149.93C239.3,142.23 243.62,134.22 245.76,127.84C246.22,126.48 246.96,123.91 247.17,122.97L249.93,112.67Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<path id="left-character-background" d="M45.5,173.18C34.228,172.52 22.917,167.768 18.566,157.754C17.05,154.265 16.38,150.136 16.85,145.32C17.43,139.42 19.71,132.5 24.24,124.45L30.7,114.13C33.95,128.47 35.67,140.61 36.3,142.98C39.46,154.89 48.69,160.41 57.83,164.7C66.29,168.67 70.46,170.49 78.77,170.49C87.08,170.49 91.26,168.67 99.71,164.7C108.85,160.41 118.08,154.89 121.24,142.98C121.9,140.48 123.78,127.1 127.39,111.73C131,96.36 125.34,72.09 125.34,72.09C125.34,72.09 139.71,104.44 133.64,124.61C127.57,144.78 143.17,159.84 125.2,172.25C125.2,172.25 142.583,177.257 146.26,171.34C160.015,149.207 138.12,139.12 141.53,118.34C144.94,97.56 138.95,58.32 138.95,58.32C137.41,41.95 131.03,28.37 119.84,19.22C117.21,17.07 100.53,2.2 78.78,2.2C57.03,2.2 40.34,17.07 37.72,19.22C-5.21,54.32 24.62,92.5 8.92,126.81C2.04,141.84 -3.45,159.68 13,170.47C29.45,181.26 45.5,173.18 45.5,173.18Z" style="fill:white;fill-rule:nonzero;"/>
<g id="characters">
<path d="M200.69,80.41C200.69,80.41 197.25,91.26 204.24,96.36C210.84,101.18 212.3,104.84 211.74,108.15C210.61,114.83 202.41,115.62 199.4,115.69" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M169.84,132.38C163.4,118.53 181.92,121.34 188.5,108.15" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M231.14,132.79C236.78,120.67 224.08,120.72 216.98,113.74" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M198.92,132.62C199.76,132.6 200.74,132.42 201.93,132C209.46,129.4 218.69,132 218.69,132C212.56,138.24 204.63,140.14 198.97,139.83L198.85,139.83C193.19,140.14 185.26,138.23 179.13,132C179.13,132 188.36,129.4 195.89,132C197.09,132.41 198.06,132.59 198.9,132.62L198.92,132.62Z" style="fill-rule:nonzero;"/>
<path d="M210.93,217.6C210.93,217.6 225.79,220.44 231.13,224.24C236.47,228.04 208.82,226.26 208.82,226.26L210.94,217.6L210.93,217.6Z" style="fill-rule:nonzero;"/>
<path d="M209.01,216.53C221.33,194.34 209.01,173.32 209.01,173.32" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M187.09,217.6C187.09,217.6 172.23,220.44 166.89,224.24C161.55,228.04 189.2,226.26 189.2,226.26L187.08,217.6L187.09,217.6Z" style="fill-rule:nonzero;"/>
<path d="M189.01,216.53C176.69,194.34 189.01,173.32 189.01,173.32" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M90.69,217.6C90.69,217.6 105.55,220.44 110.89,224.24C116.23,228.04 88.58,226.26 88.58,226.26L90.7,217.6L90.69,217.6Z" style="fill-rule:nonzero;"/>
<path d="M88.77,216.53C101.09,194.34 88.77,173.32 88.77,173.32" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M66.86,217.6C66.86,217.6 52,220.44 46.66,224.24C41.32,228.04 68.97,226.26 68.97,226.26L66.85,217.6L66.86,217.6Z" style="fill-rule:nonzero;"/>
<path d="M68.78,216.53C56.46,194.34 68.78,173.32 68.78,173.32" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M92.4,27.88C96.26,35.15 118.35,68.65 136.47,69.46" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M24.19,115.03C39.27,87.82 11.37,51.75 59.95,34.57C73.27,29.86 89.44,28.69 90.97,16.3" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M81.1,134.66C82.46,133.88 84.34,133.24 89.37,135C98.06,138.04 102.67,137.45 102.67,137.45C102.67,137.45 93.76,146.33 78.78,146.33C63.8,146.33 54.89,137.45 54.89,137.45C54.89,137.45 59.5,138.04 68.19,135C73.22,133.24 75.1,133.88 76.46,134.66C76.87,134.89 77.73,135.37 78.78,135.37C79.83,135.37 80.7,134.9 81.1,134.66Z" style="fill-rule:nonzero;"/>
<path d="M78.75,86.97C78.75,86.97 76.7,93.36 80.63,100.34C84.31,106.88 90.55,107.08 90.62,112.68C90.68,117.35 84.14,120.69 80.77,121.18" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M138.95,58.32C137.41,41.95 131.03,28.37 119.84,19.22C117.21,17.07 100.53,2.2 78.78,2.2C57.03,2.2 40.34,17.07 37.72,19.22C-5.21,54.32 24.62,92.5 8.92,126.81C2.04,141.84 -3.45,159.68 13,170.47" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M138.95,58.32C137.41,41.95 131.03,28.37 119.84,19.22C117.21,17.07 100.53,2.2 78.78,2.2C57.03,2.2 40.34,17.07 37.72,19.22C-5.21,54.32 24.62,92.5 8.92,126.81C2.04,141.84 -3.45,159.68 13,170.47" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M24.24,124.45C19.71,132.5 17.43,139.42 16.85,145.32C15.03,163.96 30.3,172.29 45.5,173.18" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M141.53,118.34C138.12,139.12 158.27,148.88 146.26,171.34" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M133.64,124.61C127.57,144.78 143.17,159.84 125.2,172.25" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M125.34,72.09C125.34,72.09 131,96.36 127.39,111.73C123.78,127.1 121.9,140.48 121.24,142.98C118.08,154.89 108.85,160.41 99.71,164.7C91.26,168.67 87.08,170.49 78.77,170.49C70.46,170.49 66.29,168.67 57.83,164.7C48.69,160.41 39.46,154.89 36.3,142.98C35.67,140.61 33.95,128.47 30.7,114.13" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M249.93,112.67C257.02,113.3 256.91,107.59 256.61,102.85C256.12,95.14 260.71,91.79 261.31,88.25C262.61,80.54 257.62,77.55 253.38,80.39" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M255.94,107.41C259.48,109.52 260.64,114 258.53,117.42C256.42,120.84 251.84,121.91 248.31,119.8C244.77,117.69 243.61,113.21 245.72,109.79" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M147.03,112.67C139.94,113.3 140.05,107.59 140.35,102.85C140.84,95.14 136.25,91.79 135.65,88.25C134.35,80.54 139.34,77.55 143.58,80.39" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M150.12,113.56C149.66,117.67 150.16,119.74 150.65,122.32C151.92,129.09 155.79,139.79 167.27,149.93C174.38,156.21 176.05,170.49 198.93,170.49C221.81,170.49 223.48,156.22 230.59,149.93C239.3,142.23 243.62,134.22 245.76,127.84C246.22,126.48 246.96,123.91 247.17,122.97" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M208.37,150.31C202.83,147.78 193.86,147.78 188.32,150.31" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M168.82,77.89C167.49,80.69 168.6,83.99 171.3,85.27C174,86.55 177.26,85.32 178.59,82.53C179.92,79.73 178.81,76.43 176.11,75.15C173.41,73.87 170.15,75.1 168.82,77.89ZM170.08,79.76C170.54,78.8 171.65,78.38 172.58,78.82C173.51,79.26 173.89,80.39 173.43,81.35C172.97,82.31 171.86,82.73 170.93,82.29C170,81.85 169.63,80.72 170.08,79.76Z" style="fill-rule:nonzero;"/>
<path d="M225.71,84.43C227.96,82.46 228.12,78.98 226.08,76.65C224.04,74.32 220.57,74.03 218.32,76C216.07,77.97 215.91,81.45 217.95,83.78C219.99,86.11 223.46,86.4 225.71,84.44L225.71,84.43ZM218.78,78.96C219.55,78.29 220.74,78.39 221.44,79.19C222.14,79.99 222.08,81.18 221.31,81.86C220.54,82.53 219.35,82.43 218.65,81.64C217.95,80.84 218.01,79.65 218.78,78.97L218.78,78.96Z" style="fill-rule:nonzero;"/>
<path d="M192.6,69.09C192.6,69.09 184.87,67.11 179,64.24C173.56,61.58 167.57,57.96 167.57,57.96C167.57,57.96 160.61,66.63 157,68.2" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M204.1,69.09C204.1,69.09 211.83,67.11 217.7,64.24C223.14,61.58 229.13,57.96 229.13,57.96C229.13,57.96 236.09,66.63 239.7,68.2" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M187.36,82.47C184,79.48 179.55,75.69 173.96,75.68C169.92,75.67 165.27,77.64 160.01,83.31" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M209.33,82.47C215.12,77.33 224.14,69.78 236.68,83.31" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M248.44,86.77C252.75,53.53 252.3,39.3 242.17,26.37C229.79,10.57 209.7,2.2 198.36,2.2C187.01,2.2 166.92,10.57 154.55,26.37C144.42,39.3 143.97,53.53 148.28,86.77" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M36.44,78.4C36.44,78.4 46.24,69.47 57.39,72.38C65.7,74.55 66.28,75.39 72.14,76.2" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M38.74,89.35C45.09,83.98 54.74,77.4 69.83,88.35" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M49.14,84.47C47.81,87.27 48.92,90.57 51.62,91.85C54.32,93.13 57.58,91.9 58.91,89.11C60.24,86.31 59.13,83.01 56.43,81.73C53.73,80.45 50.47,81.68 49.14,84.47ZM50.39,86.35C50.85,85.39 51.96,84.97 52.89,85.41C53.82,85.85 54.2,86.98 53.74,87.94C53.28,88.9 52.17,89.32 51.24,88.88C50.31,88.44 49.94,87.31 50.39,86.35Z" style="fill-rule:nonzero;"/>
<path d="M121.11,78.4C121.11,78.4 111.31,69.47 100.16,72.38C91.85,74.55 91.27,75.39 85.41,76.2" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M118.81,89.35C112.46,83.98 102.81,77.4 87.72,88.35" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:4.4px;"/>
<path d="M98.72,84.47C97.39,87.27 98.5,90.57 101.2,91.85C103.9,93.13 107.16,91.9 108.49,89.11C109.82,86.31 108.71,83.01 106.01,81.73C103.31,80.45 100.05,81.68 98.72,84.47ZM99.98,86.35C100.44,85.39 101.55,84.97 102.48,85.41C103.41,85.85 103.79,86.98 103.33,87.94C102.87,88.9 101.76,89.32 100.83,88.88C99.9,88.44 99.53,87.31 99.98,86.35Z" style="fill-rule:nonzero;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

12
assets/js/script.js Normal file
View file

@ -0,0 +1,12 @@
document.addEventListener("DOMContentLoaded", () => {
function updateCharactersOffset() {
const charactersWrapper = document.querySelector(".characters");
const MAX_OFFSET = 7;
const SPEED = 0.6;
const topSpace = Math.max(0, MAX_OFFSET - (window.scrollY / 16) * SPEED);
charactersWrapper.style.setProperty("--offset", topSpace + "rem");
}
window.addEventListener("scroll", updateCharactersOffset);
});

3
site/snippets/footer.php Normal file
View file

@ -0,0 +1,3 @@
</main>
</body>
</html>

11
site/snippets/head.php Normal file
View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<meta name="robots" content="noindex,nofollow">
<link rel="stylesheet" href="<?= url('assets/css/style.css') ?>">
<script src="<?= url('assets/js/script.js') ?>"></script>
</head>

20
site/snippets/header.php Normal file
View file

@ -0,0 +1,20 @@
<body data-template="<?= $page->intendedTemplate() ?>">
<h1 class="logo">
Lesort<br>
Hecq
</h1>
<header class="main-header">
<div class="top">
<div class="lang-switcher">
<button>FR</button>
/
<button>EN</button>
</div>
<button>menu</button>
</div>
<div class="characters" style="--offset: 7rem">
<?= svg('assets/images/characters/characters.svg') ?>
</div>
<div class="strip"><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi, tenetur.</p></div>
</header>
<main>

View file

@ -0,0 +1,3 @@
<?php snippet('head') ?>
<?php snippet('header') ?>
<?php snippet('footer') ?>