Migration vers architecture Svelte + Kirby inspirée de design-to-pack
- Mise en place de Svelte 4 avec Vite pour le frontend (SPA) - Simplification des templates PHP (header/footer minimalistes) - Création de templates JSON pour API (home, about, expertise, portfolio, jouer, game, blog, article, project) - Ajout d'un controller de site pour définir genericData globalement - Structure des stores Svelte (page, navigation, locale, site) - Router avec navaid pour navigation SPA et interception des liens - Composants layout (Header, Footer, Cursor) et vues de base - Build Vite vers assets/dist/ (index.js/css) - Header PHP détecte assets/dist pour basculer dev/prod Architecture fonctionnelle de base établie, à améliorer et compléter. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c4456d587c
commit
cbe89acb21
53 changed files with 3348 additions and 772 deletions
83
src/App.svelte
Normal file
83
src/App.svelte
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<script>
|
||||
import { pageStore } from '@stores/page'
|
||||
|
||||
import Header from '@components/layout/Header.svelte'
|
||||
import Footer from '@components/layout/Footer.svelte'
|
||||
import Cursor from '@components/layout/Cursor.svelte'
|
||||
|
||||
import Home from '@views/Home.svelte'
|
||||
import About from '@views/About.svelte'
|
||||
import Expertise from '@views/Expertise.svelte'
|
||||
import Portfolio from '@views/Portfolio.svelte'
|
||||
import Project from '@views/Project.svelte'
|
||||
import Jouer from '@views/Jouer.svelte'
|
||||
import Game from '@views/Game.svelte'
|
||||
import Blog from '@views/Blog.svelte'
|
||||
import Article from '@views/Article.svelte'
|
||||
import Default from '@views/Default.svelte'
|
||||
|
||||
const templates = {
|
||||
'home': Home,
|
||||
'about': About,
|
||||
'expertise': Expertise,
|
||||
'portfolio': Portfolio,
|
||||
'project': Project,
|
||||
'jouer': Jouer,
|
||||
'game': Game,
|
||||
'blog': Blog,
|
||||
'article': Article,
|
||||
'default': Default
|
||||
}
|
||||
|
||||
$: template = $pageStore.template || 'default'
|
||||
$: component = templates[template] || Default
|
||||
$: data = $pageStore.data
|
||||
</script>
|
||||
|
||||
<div class="app">
|
||||
<Cursor />
|
||||
<Header />
|
||||
|
||||
<main class="main">
|
||||
{#if data}
|
||||
<svelte:component this={component} {data} />
|
||||
{/if}
|
||||
</main>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:global(*) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:global(body) {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.app {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:global(a) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
:global(img) {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
68
src/components/layout/Cursor.svelte
Normal file
68
src/components/layout/Cursor.svelte
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<script>
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
let cursorX = 0
|
||||
let cursorY = 0
|
||||
let outlineX = 0
|
||||
let outlineY = 0
|
||||
let rafId
|
||||
|
||||
onMount(() => {
|
||||
const handleMouseMove = (e) => {
|
||||
cursorX = e.clientX
|
||||
cursorY = e.clientY
|
||||
}
|
||||
|
||||
const animate = () => {
|
||||
outlineX += (cursorX - outlineX) * 0.2
|
||||
outlineY += (cursorY - outlineY) * 0.2
|
||||
rafId = requestAnimationFrame(animate)
|
||||
}
|
||||
|
||||
window.addEventListener('mousemove', handleMouseMove)
|
||||
animate()
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('mousemove', handleMouseMove)
|
||||
if (rafId) cancelAnimationFrame(rafId)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="cursor" style="transform: translate({cursorX}px, {cursorY}px)"></div>
|
||||
<div class="cursor-outline" style="transform: translate({outlineX}px, {outlineY}px)"></div>
|
||||
|
||||
<style>
|
||||
.cursor,
|
||||
.cursor-outline {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.cursor {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #04fea0;
|
||||
border-radius: 50%;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
.cursor-outline {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 2px solid #04fea0;
|
||||
border-radius: 50%;
|
||||
transform-origin: center;
|
||||
margin: -16px 0 0 -16px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.cursor,
|
||||
.cursor-outline {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
73
src/components/layout/Footer.svelte
Normal file
73
src/components/layout/Footer.svelte
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<script>
|
||||
import { siteStore } from '@stores/site'
|
||||
|
||||
$: siteTitle = $siteStore.title || 'World Game'
|
||||
$: currentYear = new Date().getFullYear()
|
||||
</script>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="footer__container">
|
||||
<div class="footer__brand">
|
||||
<p class="footer__title">{siteTitle}</p>
|
||||
<p class="footer__tagline">Play to Engage</p>
|
||||
</div>
|
||||
|
||||
<div class="footer__copyright">
|
||||
<p>© {currentYear} {siteTitle}. Tous droits réservés.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<style>
|
||||
.footer {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
padding: 3rem 2rem 2rem;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.footer__container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.footer__brand {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.footer__title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 0.5rem;
|
||||
}
|
||||
|
||||
.footer__tagline {
|
||||
color: #04fea0;
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.footer__copyright {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.footer__copyright p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.footer__container {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer__copyright {
|
||||
order: 2;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
245
src/components/layout/Header.svelte
Normal file
245
src/components/layout/Header.svelte
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
<script>
|
||||
import { navigationStore } from '@stores/navigation'
|
||||
import { localeStore } from '@stores/locale'
|
||||
import { siteStore } from '@stores/site'
|
||||
import { navigateTo } from '@lib/router'
|
||||
|
||||
$: isMenuOpen = $navigationStore.isMenuOpen
|
||||
$: currentLang = $localeStore.current
|
||||
$: site = $siteStore
|
||||
$: logo = site.logo
|
||||
$: siteTitle = site.title
|
||||
$: navigation = site.navigation || []
|
||||
$: languages = site.languages || []
|
||||
|
||||
function handleNav(path) {
|
||||
navigateTo(path)
|
||||
navigationStore.closeMenu()
|
||||
}
|
||||
|
||||
function handleLanguageChange(langCode) {
|
||||
// In a full implementation, this would switch to the translated URL
|
||||
localeStore.setLanguage(langCode)
|
||||
}
|
||||
</script>
|
||||
|
||||
<header class="header" class:menu-open={isMenuOpen}>
|
||||
<div class="header__container">
|
||||
<!-- Logo -->
|
||||
<a href="/" on:click|preventDefault={() => handleNav('/')} class="header__logo">
|
||||
{#if logo}
|
||||
<img src={logo} alt={siteTitle} />
|
||||
{:else}
|
||||
<span class="header__logo-text">{siteTitle}</span>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="header__nav" class:open={isMenuOpen}>
|
||||
<ul class="header__nav-list">
|
||||
{#each navigation as item}
|
||||
{#if item.url}
|
||||
<li class="header__nav-item" class:active={item.isActive}>
|
||||
<a
|
||||
href={item.url}
|
||||
on:click|preventDefault={() => handleNav(item.url)}
|
||||
>
|
||||
{currentLang === 'en' ? item.label_en : item.label_fr}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/each}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<!-- Language Switcher -->
|
||||
{#if languages.length > 1}
|
||||
<div class="header__lang">
|
||||
{#each languages as lang}
|
||||
<button
|
||||
class="header__lang-btn"
|
||||
class:active={lang.code === currentLang}
|
||||
on:click={() => handleLanguageChange(lang.code)}
|
||||
>
|
||||
{lang.code.toUpperCase()}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Mobile Menu Toggle -->
|
||||
<button
|
||||
class="header__toggle"
|
||||
on:click={() => navigationStore.toggleMenu()}
|
||||
aria-label="Menu"
|
||||
>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<style>
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.header__container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 1.5rem 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.header__logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.header__logo img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.header__logo-text {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.header__nav {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header__nav-list {
|
||||
display: flex;
|
||||
gap: 2rem;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.header__nav-item a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.9rem;
|
||||
letter-spacing: 0.05em;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.header__nav-item a:hover,
|
||||
.header__nav-item.active a {
|
||||
color: #04fea0;
|
||||
}
|
||||
|
||||
.header__lang {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.header__lang-btn {
|
||||
background: none;
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
padding: 0.5rem 1rem;
|
||||
cursor: pointer;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.header__lang-btn:hover,
|
||||
.header__lang-btn.active {
|
||||
background: #04fea0;
|
||||
border-color: #04fea0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.header__toggle {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0.5rem;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.header__toggle span {
|
||||
width: 25px;
|
||||
height: 2px;
|
||||
background: #fff;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.header__container {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.header__toggle {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.header__nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
transform: translateX(100%);
|
||||
transition: transform 0.3s;
|
||||
padding: 5rem 2rem 2rem;
|
||||
}
|
||||
|
||||
.header__nav.open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.header__nav-list {
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.header__nav-item a {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.header__lang {
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
}
|
||||
|
||||
.menu-open .header__toggle span:nth-child(1) {
|
||||
transform: rotate(45deg) translate(5px, 5px);
|
||||
}
|
||||
|
||||
.menu-open .header__toggle span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.menu-open .header__toggle span:nth-child(3) {
|
||||
transform: rotate(-45deg) translate(7px, -6px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
98
src/components/ui/Button.svelte
Normal file
98
src/components/ui/Button.svelte
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<script>
|
||||
export let variant = 'primary' // primary, secondary, outline
|
||||
export let size = 'medium' // small, medium, large
|
||||
export let disabled = false
|
||||
export let href = null
|
||||
</script>
|
||||
|
||||
{#if href}
|
||||
<a
|
||||
{href}
|
||||
class="btn btn--{variant} btn--{size}"
|
||||
class:disabled
|
||||
on:click
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
{:else}
|
||||
<button
|
||||
class="btn btn--{variant} btn--{size}"
|
||||
{disabled}
|
||||
on:click
|
||||
>
|
||||
<slot />
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 2rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
border: 2px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.btn--primary {
|
||||
background: #04fea0;
|
||||
color: #000;
|
||||
border-color: #04fea0;
|
||||
}
|
||||
|
||||
.btn--primary:hover {
|
||||
background: #03d98c;
|
||||
border-color: #03d98c;
|
||||
}
|
||||
|
||||
.btn--secondary {
|
||||
background: #000;
|
||||
color: #04fea0;
|
||||
border-color: #04fea0;
|
||||
}
|
||||
|
||||
.btn--secondary:hover {
|
||||
background: #04fea0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn--outline {
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.btn--outline:hover {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn--small {
|
||||
padding: 0.5rem 1.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.btn--medium {
|
||||
padding: 0.75rem 2rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.btn--large {
|
||||
padding: 1rem 2.5rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.btn:disabled,
|
||||
.btn.disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
68
src/components/ui/VideoBackground.svelte
Normal file
68
src/components/ui/VideoBackground.svelte
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<script>
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
export let src
|
||||
export let poster = ''
|
||||
export let overlay = true
|
||||
|
||||
let videoElement
|
||||
|
||||
onMount(() => {
|
||||
if (videoElement && src) {
|
||||
videoElement.play().catch(err => {
|
||||
console.log('Autoplay failed:', err)
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="video-background">
|
||||
{#if src}
|
||||
<video
|
||||
bind:this={videoElement}
|
||||
{poster}
|
||||
muted
|
||||
loop
|
||||
playsinline
|
||||
preload="metadata"
|
||||
class="video-background__video"
|
||||
>
|
||||
<source {src} type="video/mp4" />
|
||||
</video>
|
||||
{/if}
|
||||
|
||||
{#if overlay}
|
||||
<div class="video-background__overlay"></div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.video-background {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.video-background__video {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
transform: translate(-50%, -50%);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.video-background__overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
rgba(0, 0, 0, 0.3),
|
||||
rgba(0, 0, 0, 0.7)
|
||||
);
|
||||
}
|
||||
</style>
|
||||
142
src/lib/animations.js
Normal file
142
src/lib/animations.js
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
import gsap from 'gsap'
|
||||
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger)
|
||||
|
||||
/**
|
||||
* Fade in animation for page enter
|
||||
*/
|
||||
export function pageEnter(element, options = {}) {
|
||||
const defaults = {
|
||||
opacity: 0,
|
||||
y: 50,
|
||||
duration: 0.8,
|
||||
ease: 'power3.out'
|
||||
}
|
||||
|
||||
return gsap.from(element, { ...defaults, ...options })
|
||||
}
|
||||
|
||||
/**
|
||||
* Fade out animation for page exit
|
||||
*/
|
||||
export function pageExit(element, options = {}) {
|
||||
const defaults = {
|
||||
opacity: 0,
|
||||
y: -50,
|
||||
duration: 0.5,
|
||||
ease: 'power3.in'
|
||||
}
|
||||
|
||||
return gsap.to(element, { ...defaults, ...options })
|
||||
}
|
||||
|
||||
/**
|
||||
* Carousel slide animation
|
||||
*/
|
||||
export function carouselSlide(element, offset, options = {}) {
|
||||
const defaults = {
|
||||
x: `-${offset}%`,
|
||||
duration: 0.8,
|
||||
ease: 'power2.inOut'
|
||||
}
|
||||
|
||||
return gsap.to(element, { ...defaults, ...options })
|
||||
}
|
||||
|
||||
/**
|
||||
* Scroll reveal animation
|
||||
*/
|
||||
export function scrollReveal(elements, options = {}) {
|
||||
const defaults = {
|
||||
scrollTrigger: {
|
||||
trigger: elements,
|
||||
start: 'top 80%',
|
||||
toggleActions: 'play none none none'
|
||||
},
|
||||
y: 50,
|
||||
opacity: 0,
|
||||
stagger: 0.1,
|
||||
duration: 0.8,
|
||||
ease: 'power3.out'
|
||||
}
|
||||
|
||||
return gsap.from(elements, { ...defaults, ...options })
|
||||
}
|
||||
|
||||
/**
|
||||
* Fade in elements on scroll
|
||||
*/
|
||||
export function fadeInOnScroll(elements, options = {}) {
|
||||
const defaults = {
|
||||
scrollTrigger: {
|
||||
trigger: elements,
|
||||
start: 'top 80%'
|
||||
},
|
||||
opacity: 0,
|
||||
duration: 1,
|
||||
stagger: 0.2,
|
||||
ease: 'power2.out'
|
||||
}
|
||||
|
||||
return gsap.from(elements, { ...defaults, ...options })
|
||||
}
|
||||
|
||||
/**
|
||||
* Scale animation
|
||||
*/
|
||||
export function scaleIn(element, options = {}) {
|
||||
const defaults = {
|
||||
scale: 0,
|
||||
duration: 0.5,
|
||||
ease: 'back.out(1.7)'
|
||||
}
|
||||
|
||||
return gsap.from(element, { ...defaults, ...options })
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup all ScrollTrigger instances
|
||||
*/
|
||||
export function cleanupScrollTriggers() {
|
||||
ScrollTrigger.getAll().forEach(trigger => trigger.kill())
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh ScrollTrigger (useful after content changes)
|
||||
*/
|
||||
export function refreshScrollTriggers() {
|
||||
ScrollTrigger.refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom cursor follow animation
|
||||
*/
|
||||
export function cursorFollow(cursorElement, outlineElement) {
|
||||
let cursorX = 0
|
||||
let cursorY = 0
|
||||
let outlineX = 0
|
||||
let outlineY = 0
|
||||
|
||||
const handleMouseMove = (e) => {
|
||||
cursorX = e.clientX
|
||||
cursorY = e.clientY
|
||||
}
|
||||
|
||||
const animate = () => {
|
||||
outlineX += (cursorX - outlineX) * 0.2
|
||||
outlineY += (cursorY - outlineY) * 0.2
|
||||
|
||||
gsap.set(cursorElement, { x: cursorX, y: cursorY })
|
||||
gsap.set(outlineElement, { x: outlineX, y: outlineY })
|
||||
|
||||
requestAnimationFrame(animate)
|
||||
}
|
||||
|
||||
window.addEventListener('mousemove', handleMouseMove)
|
||||
animate()
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('mousemove', handleMouseMove)
|
||||
}
|
||||
}
|
||||
100
src/lib/router.js
Normal file
100
src/lib/router.js
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
import navaid from "navaid";
|
||||
import { pageStore } from "@stores/page";
|
||||
import { navigationStore } from "@stores/navigation";
|
||||
import { siteStore } from "@stores/site";
|
||||
import { localeStore } from "@stores/locale";
|
||||
|
||||
export const router = navaid("/", () => {
|
||||
// Default handler
|
||||
});
|
||||
|
||||
async function loadPage(path) {
|
||||
navigationStore.setLoading(true);
|
||||
pageStore.setLoading(true);
|
||||
|
||||
try {
|
||||
// Fetch JSON data for this page
|
||||
const response = await fetch(`${path}.json`);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to load page: ${response.status}`);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
// Update site store with site data (from genericData)
|
||||
if (data.site) {
|
||||
siteStore.set(data.site);
|
||||
localeStore.initialize(data.site.language, data.site.languages);
|
||||
}
|
||||
|
||||
// Update page store with page data
|
||||
pageStore.set({
|
||||
data,
|
||||
template: data.template || "default",
|
||||
url: path,
|
||||
loading: false,
|
||||
error: null,
|
||||
});
|
||||
|
||||
// Scroll to top
|
||||
window.scrollTo(0, 0);
|
||||
} catch (error) {
|
||||
console.error("Failed to load page:", error);
|
||||
pageStore.setError(error);
|
||||
} finally {
|
||||
navigationStore.setLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Route handlers
|
||||
router
|
||||
.on("/", () => loadPage("/home"))
|
||||
.on("/expertise", () => loadPage("/expertise"))
|
||||
.on("/portfolio", () => loadPage("/portfolio"))
|
||||
.on("/portfolio/:slug", ({ slug }) => loadPage(`/portfolio/${slug}`))
|
||||
.on("/jouer", () => loadPage("/jouer"))
|
||||
.on("/jouer/:slug", ({ slug }) => loadPage(`/jouer/${slug}`))
|
||||
.on("/a-propos", () => loadPage("/a-propos"))
|
||||
.on("/blog", () => loadPage("/blog"))
|
||||
.on("/blog/:slug", ({ slug }) => loadPage(`/blog/${slug}`))
|
||||
.on("*", (params) => {
|
||||
// Fallback for other routes
|
||||
loadPage(window.location.pathname);
|
||||
});
|
||||
|
||||
export function initRouter() {
|
||||
// Load initial page data
|
||||
loadPage(window.location.pathname);
|
||||
|
||||
// Start listening to route changes
|
||||
router.listen();
|
||||
|
||||
// Intercept internal link clicks
|
||||
document.addEventListener("click", (e) => {
|
||||
const link = e.target.closest("a");
|
||||
if (!link) return;
|
||||
|
||||
const url = new URL(link.href, window.location.origin);
|
||||
|
||||
// Only intercept same-origin links without target attribute
|
||||
if (
|
||||
url.origin === window.location.origin &&
|
||||
!link.target &&
|
||||
!link.hasAttribute("download")
|
||||
) {
|
||||
e.preventDefault();
|
||||
navigateTo(url.pathname);
|
||||
}
|
||||
});
|
||||
|
||||
// Handle browser back/forward
|
||||
window.addEventListener("popstate", () => {
|
||||
loadPage(window.location.pathname);
|
||||
});
|
||||
}
|
||||
|
||||
export function navigateTo(path) {
|
||||
window.history.pushState({}, "", path);
|
||||
loadPage(path);
|
||||
}
|
||||
13
src/main.js
Normal file
13
src/main.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import './style.css'
|
||||
import App from './App.svelte'
|
||||
import { initRouter } from './lib/router'
|
||||
|
||||
// Initialize the router
|
||||
initRouter()
|
||||
|
||||
// Mount the app
|
||||
const app = new App({
|
||||
target: document.getElementById('app')
|
||||
})
|
||||
|
||||
export default app
|
||||
17
src/stores/locale.js
Normal file
17
src/stores/locale.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { writable } from 'svelte/store'
|
||||
|
||||
function createLocaleStore() {
|
||||
const { subscribe, set, update } = writable({
|
||||
current: 'fr',
|
||||
languages: []
|
||||
})
|
||||
|
||||
return {
|
||||
subscribe,
|
||||
set,
|
||||
setLanguage: (code) => update(s => ({ ...s, current: code })),
|
||||
initialize: (language, languages) => set({ current: language, languages })
|
||||
}
|
||||
}
|
||||
|
||||
export const localeStore = createLocaleStore()
|
||||
18
src/stores/navigation.js
Normal file
18
src/stores/navigation.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { writable } from 'svelte/store'
|
||||
|
||||
function createNavigationStore() {
|
||||
const { subscribe, update } = writable({
|
||||
isLoading: false,
|
||||
isMenuOpen: false
|
||||
})
|
||||
|
||||
return {
|
||||
subscribe,
|
||||
setLoading: (loading) => update(s => ({ ...s, isLoading: loading })),
|
||||
toggleMenu: () => update(s => ({ ...s, isMenuOpen: !s.isMenuOpen })),
|
||||
openMenu: () => update(s => ({ ...s, isMenuOpen: true })),
|
||||
closeMenu: () => update(s => ({ ...s, isMenuOpen: false }))
|
||||
}
|
||||
}
|
||||
|
||||
export const navigationStore = createNavigationStore()
|
||||
27
src/stores/page.js
Normal file
27
src/stores/page.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { writable } from 'svelte/store'
|
||||
|
||||
function createPageStore() {
|
||||
const { subscribe, set, update } = writable({
|
||||
data: null,
|
||||
template: null,
|
||||
url: null,
|
||||
loading: false,
|
||||
error: null
|
||||
})
|
||||
|
||||
return {
|
||||
subscribe,
|
||||
set,
|
||||
setLoading: (loading) => update(s => ({ ...s, loading })),
|
||||
setError: (error) => update(s => ({ ...s, error, loading: false })),
|
||||
reset: () => set({
|
||||
data: null,
|
||||
template: null,
|
||||
url: null,
|
||||
loading: false,
|
||||
error: null
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const pageStore = createPageStore()
|
||||
19
src/stores/site.js
Normal file
19
src/stores/site.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { writable } from 'svelte/store'
|
||||
|
||||
function createSiteStore() {
|
||||
const { subscribe, set } = writable({
|
||||
title: 'World Game',
|
||||
url: '',
|
||||
logo: null,
|
||||
language: 'fr',
|
||||
languages: [],
|
||||
navigation: []
|
||||
})
|
||||
|
||||
return {
|
||||
subscribe,
|
||||
set
|
||||
}
|
||||
}
|
||||
|
||||
export const siteStore = createSiteStore()
|
||||
82
src/style.css
Normal file
82
src/style.css
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/* Global Styles */
|
||||
|
||||
/* Custom fonts */
|
||||
@font-face {
|
||||
font-family: 'Danzza';
|
||||
src: url('/assets/fonts/danzza.woff2') format('woff2'),
|
||||
url('/assets/fonts/danzza.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
/* Reset */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
line-height: 1.6;
|
||||
overflow-x: hidden;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
/* Images */
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
button {
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Selection */
|
||||
::selection {
|
||||
background: #04fea0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #04fea0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #03d98c;
|
||||
}
|
||||
177
src/views/About.svelte
Normal file
177
src/views/About.svelte
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
|
||||
export let data
|
||||
|
||||
$: intro = data?.intro || {}
|
||||
$: mission = data?.mission || {}
|
||||
$: manifesto = data?.manifesto || {}
|
||||
$: team = data?.team || {}
|
||||
</script>
|
||||
|
||||
<div class="about" transition:fade>
|
||||
<section class="about__intro">
|
||||
<h1>{intro.title || data?.title}</h1>
|
||||
{#if intro.text}
|
||||
<p class="about__intro-text">{@html intro.text}</p>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
{#if mission.text}
|
||||
<section class="about__section">
|
||||
<h2>{mission.title}</h2>
|
||||
<div class="about__section-content">
|
||||
{@html mission.text}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{#if manifesto.text}
|
||||
<section class="about__section">
|
||||
<h2>{manifesto.title}</h2>
|
||||
<div class="about__section-content">
|
||||
{@html manifesto.text}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{#if team.members && team.members.length > 0}
|
||||
<section class="about__team">
|
||||
<h2>{team.title}</h2>
|
||||
|
||||
<div class="about__team-grid">
|
||||
{#each team.members as member}
|
||||
<article class="team-card">
|
||||
{#if member.photo}
|
||||
<div class="team-card__photo">
|
||||
<img src={member.photo} alt={member.name} />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="team-card__info">
|
||||
<h3>{member.name}</h3>
|
||||
<p class="team-card__role">{member.role}</p>
|
||||
|
||||
{#if member.bio}
|
||||
<p class="team-card__bio">{member.bio}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</article>
|
||||
{/each}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.about {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.about__intro {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto 6rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.about__intro h1 {
|
||||
font-size: clamp(2.5rem, 6vw, 5rem);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.about__intro-text {
|
||||
font-size: clamp(1.1rem, 2vw, 1.5rem);
|
||||
opacity: 0.9;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.about__section {
|
||||
max-width: 1200px;
|
||||
margin: 4rem auto;
|
||||
}
|
||||
|
||||
.about__section h2 {
|
||||
font-size: clamp(2rem, 4vw, 3rem);
|
||||
margin-bottom: 2rem;
|
||||
color: #04fea0;
|
||||
}
|
||||
|
||||
.about__section-content {
|
||||
line-height: 1.8;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.about__team {
|
||||
max-width: 1400px;
|
||||
margin: 6rem auto 0;
|
||||
}
|
||||
|
||||
.about__team h2 {
|
||||
font-size: clamp(2rem, 4vw, 3rem);
|
||||
margin-bottom: 3rem;
|
||||
text-align: center;
|
||||
color: #04fea0;
|
||||
}
|
||||
|
||||
.about__team-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.team-card {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
padding: 2rem;
|
||||
border-radius: 8px;
|
||||
transition: transform 0.3s, border-color 0.3s;
|
||||
}
|
||||
|
||||
.team-card:hover {
|
||||
transform: translateY(-5px);
|
||||
border-color: #04fea0;
|
||||
}
|
||||
|
||||
.team-card__photo {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.team-card__photo img {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.team-card h3 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.team-card__role {
|
||||
color: #04fea0;
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 1rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.team-card__bio {
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.6;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.about {
|
||||
padding: 6rem 1rem 3rem;
|
||||
}
|
||||
|
||||
.about__team-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
24
src/views/Article.svelte
Normal file
24
src/views/Article.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="article" transition:fade>
|
||||
<div class="article__container">
|
||||
<h1>{data?.title || 'Article'}</h1>
|
||||
<p>Article view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.article {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.article__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
24
src/views/Blog.svelte
Normal file
24
src/views/Blog.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="blog" transition:fade>
|
||||
<div class="blog__container">
|
||||
<h1>{data?.title || 'Blog'}</h1>
|
||||
<p>Blog view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.blog {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.blog__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
45
src/views/Default.svelte
Normal file
45
src/views/Default.svelte
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="default" transition:fade>
|
||||
<div class="default__container">
|
||||
<h1>{data?.title || 'Page'}</h1>
|
||||
{#if data?.body}
|
||||
<div class="default__content">
|
||||
{@html data.body}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.default {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
}
|
||||
|
||||
.default__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2rem, 5vw, 4rem);
|
||||
margin-bottom: 2rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.default__content {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.default {
|
||||
padding: 6rem 1rem 3rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
24
src/views/Expertise.svelte
Normal file
24
src/views/Expertise.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="expertise" transition:fade>
|
||||
<div class="expertise__container">
|
||||
<h1>{data?.title || 'Expertise'}</h1>
|
||||
<p>Expertise view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.expertise {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.expertise__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
24
src/views/Game.svelte
Normal file
24
src/views/Game.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="game" transition:fade>
|
||||
<div class="game__container">
|
||||
<h1>{data?.title || 'Game'}</h1>
|
||||
<p>Game view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.game {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.game__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
164
src/views/Home.svelte
Normal file
164
src/views/Home.svelte
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
<script>
|
||||
import { onMount } from 'svelte'
|
||||
import { fade } from 'svelte/transition'
|
||||
import VideoBackground from '@components/ui/VideoBackground.svelte'
|
||||
import Button from '@components/ui/Button.svelte'
|
||||
import { navigateTo } from '@lib/router'
|
||||
import { pageEnter } from '@lib/animations'
|
||||
|
||||
export let data
|
||||
|
||||
let contentElement
|
||||
|
||||
onMount(() => {
|
||||
if (contentElement) {
|
||||
pageEnter(contentElement)
|
||||
}
|
||||
})
|
||||
|
||||
function handleExplore() {
|
||||
navigateTo(data?.hero?.cta_link || '/portfolio')
|
||||
}
|
||||
|
||||
$: hero = data?.hero || {}
|
||||
$: backgroundVideo = data?.background_video
|
||||
$: floatingBubbles = data?.floating_bubbles || []
|
||||
</script>
|
||||
|
||||
<div class="home" transition:fade>
|
||||
{#if backgroundVideo}
|
||||
<VideoBackground src={backgroundVideo} />
|
||||
{/if}
|
||||
|
||||
<div class="home__content" bind:this={contentElement}>
|
||||
<h1 class="home__title">
|
||||
{@html hero.title || 'PLAY TO ENGAGE'}
|
||||
</h1>
|
||||
|
||||
{#if hero.subtitle}
|
||||
<p class="home__subtitle">
|
||||
{@html hero.subtitle}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
{#if hero.cta_text}
|
||||
<Button on:click={handleExplore} variant="primary" size="large">
|
||||
{hero.cta_text}
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if floatingBubbles.length > 0}
|
||||
<div class="home__bubbles">
|
||||
{#each floatingBubbles as bubble}
|
||||
<div class="bubble bubble--{bubble.position}">
|
||||
{bubble.text}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.home {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
padding: 6rem 2rem 2rem;
|
||||
}
|
||||
|
||||
.home__content {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
max-width: 1200px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.home__title {
|
||||
font-size: clamp(3rem, 8vw, 8rem);
|
||||
font-family: 'Danzza', sans-serif;
|
||||
font-weight: 700;
|
||||
margin: 0 0 1.5rem;
|
||||
line-height: 1.1;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.home__title :global(.highlight) {
|
||||
color: #04fea0;
|
||||
}
|
||||
|
||||
.home__subtitle {
|
||||
font-size: clamp(1.2rem, 3vw, 2rem);
|
||||
margin: 0 0 3rem;
|
||||
opacity: 0.9;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.home__bubbles {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.bubble {
|
||||
position: absolute;
|
||||
background: rgba(4, 254, 160, 0.1);
|
||||
border: 1px solid rgba(4, 254, 160, 0.3);
|
||||
border-radius: 50%;
|
||||
padding: 1rem 1.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: #04fea0;
|
||||
backdrop-filter: blur(10px);
|
||||
animation: float 6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.bubble--top-left {
|
||||
top: 15%;
|
||||
left: 10%;
|
||||
}
|
||||
|
||||
.bubble--top-right {
|
||||
top: 20%;
|
||||
right: 15%;
|
||||
animation-delay: -2s;
|
||||
}
|
||||
|
||||
.bubble--bottom-left {
|
||||
bottom: 25%;
|
||||
left: 15%;
|
||||
animation-delay: -4s;
|
||||
}
|
||||
|
||||
.bubble--bottom-right {
|
||||
bottom: 20%;
|
||||
right: 10%;
|
||||
animation-delay: -3s;
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-20px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.home {
|
||||
padding: 5rem 1rem 2rem;
|
||||
}
|
||||
|
||||
.bubble {
|
||||
font-size: 0.7rem;
|
||||
padding: 0.75rem 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
24
src/views/Jouer.svelte
Normal file
24
src/views/Jouer.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="jouer" transition:fade>
|
||||
<div class="jouer__container">
|
||||
<h1>{data?.title || 'Jouer'}</h1>
|
||||
<p>Jouer view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.jouer {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.jouer__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
24
src/views/Portfolio.svelte
Normal file
24
src/views/Portfolio.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="portfolio" transition:fade>
|
||||
<div class="portfolio__container">
|
||||
<h1>{data?.title || 'Portfolio'}</h1>
|
||||
<p>Portfolio view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.portfolio {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.portfolio__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
24
src/views/Project.svelte
Normal file
24
src/views/Project.svelte
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
import { fade } from 'svelte/transition'
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="project" transition:fade>
|
||||
<div class="project__container">
|
||||
<h1>{data?.title || 'Project'}</h1>
|
||||
<p>Project view - To be implemented</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.project {
|
||||
min-height: 100vh;
|
||||
padding: 8rem 2rem 4rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.project__container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue