feat: UI/UX overhaul and content enhancements (#4)
Deploy React Site / build-and-deploy (push) Successful in 13s
Scroll system - Completely reworked `useRegionScroll` controller: paginated region-by-region scroll (wheel/swipe/arrows/Home/End/Space), native scroll neutralized, regions taller than viewport split into screens, time-based rAF animation, interruption only on effective deviation. - Region resolution in 3 levels: `data-region` (single element), `data-region-children` (each direct child), `.page-snap-section` as fallback. Added `data-no-region` to exclude hero/title. - Homepage: entire MagicBento as a single region. Projects page: one stop per project (`HorizontalMotion` with `data-region-children`), category title preserved, hero excluded. - Project detail pages (ProjectPage): hero excluded from regions, media in `data-region-children`, download button as separate region. - Contact/PageShell: updated markers, removed empty zones (no forced `min-height` on `.page-snap-section`). - Removed unbounded `--region-tail` in favor of capped reserve (15vh) + merged landing spots too close to each other. - Do not re-enable native `scroll-snap-type` (Chrome proximity snap traps the user on the first region). Content - Added Ensemble Scolaire Jean XXIII project page (Défi 6e - Class Life, CRM, Inventory IT) with images, wired into the route table, the projects list, the home bento grid and the navigation menu. - Sitemap: added the missing `/projects/hinterraum` and `/projects/overclock-uprising` routes, both live in `App.tsx`. Layout & navigation - Extracted shared `PageShell` and `ProjectPage` layout components. - Navigation: more reliable scroll-to-top, footer "Co Hai Se" bold with target cursor. - ZIP download: stopped propagation + global click handler ignores download. - Various fixes (cursor, 404, layouts), typecheck/ignoreDeprecations adjusted. Docs - Consolidated into `docs/AGENTS.md` as the single source of truth; removed the redundant `docs/README.md` and `docs/ROADMAP.md`. --------- Co-authored-by: xEsiah <[email protected]> Reviewed-on: #4 Reviewed-by: Esiah <[email protected]> Co-authored-by: Gitea Actions <-[email protected]>
@@ -0,0 +1,78 @@
|
||||
# AGENTS.md — Esiah's Universe
|
||||
|
||||
## Core Rules
|
||||
|
||||
- Never commit or push without explicit user request.
|
||||
- Always respond in English.
|
||||
- No automatic git operations (commit/push/amend/force).
|
||||
- Keep changes minimal and scoped to request.
|
||||
- Do not modify unrelated files.
|
||||
- Ask for clarification if ambiguous.
|
||||
|
||||
## Project Context
|
||||
|
||||
Esiah's Universe is an interactive React/Vite portfolio (WebGL/GSAP).
|
||||
Static site for showcase; projects data in `src/components/data/ProjectDetails.tsx`.
|
||||
Navigation via CardNav/InfiniteMenu. Build with `npm run build`.
|
||||
|
||||
## Git Workflow
|
||||
|
||||
- Check `git status`/`git diff` before any git action.
|
||||
- Only act on git when explicitly asked.
|
||||
- Never push to remote unless explicitly requested.
|
||||
- Use clear commit messages if asked to commit.
|
||||
|
||||
## Code Conventions
|
||||
|
||||
- TypeScript strict, React 18+, Vite
|
||||
- Tailwind CSS
|
||||
- GSAP for animations
|
||||
- gl-matrix for WebGL/math
|
||||
- Follow existing patterns, minimal diffs
|
||||
- No secrets in code
|
||||
|
||||
## Scroll System
|
||||
|
||||
- A **region** is an element or a group of elements, not a page wrapper.
|
||||
- Declare them in the markup, three levels of priority:
|
||||
1. `data-region` on the element: that element is exactly one region.
|
||||
2. `data-region-children` on a container: each **direct child** is one region.
|
||||
3. `.page-snap-section` is only a **fallback**: it counts as a region when it
|
||||
contains no `data-region` / `data-region-children` marker.
|
||||
- `data-no-region` excludes an element (and its subtree) from the regions: page
|
||||
titles/heroes are not landing points, the first region is the one **below** the
|
||||
title. Keep the hero excluded, otherwise the first scroll only moves a few
|
||||
percent of the viewport.
|
||||
- Every section must be covered: a section taller than its content creates an
|
||||
empty zone where the scroll feels like a plain scroll. Sections hug their
|
||||
content, and galleries expose one region per project (`data-region-children`
|
||||
on the list holding the project cards).
|
||||
- **The page never rests between two regions.** A gesture (wheel, swipe, arrow
|
||||
key, Space) moves to the next/previous region: native scrolling is
|
||||
neutralised (`wheel` / `touchmove` are `preventDefault`ed).
|
||||
- Regions taller than the viewport are subdivided into screens, so their content
|
||||
stays readable. Landing spots = region tops + screen offsets.
|
||||
- The wheel threshold is proportional to the region being crossed (50–300px):
|
||||
the pace follows the size of the content.
|
||||
- Keyboard: Arrow/PageUp/PageDown/Space step one region, Home/End jump to the
|
||||
first/last region.
|
||||
- Region targets are measured on the **layout** (`offsetTop` chain, not
|
||||
`getBoundingClientRect`) so entrance transforms (translate/scale) cannot offset
|
||||
the landing position. Offset = `--nav-offset` (100px) + 2rem.
|
||||
- Animation is a **time based rAF** loop (power3.out, 420–900ms), never a GSAP
|
||||
tween: `ScrollTrigger.refresh()` (triggered by `AnimatedContent` resizing the
|
||||
body) restores the scroll position and kills `ScrollToPlugin` tweens mid-flight.
|
||||
An animation is interrupted only by a scroll that does not match the position
|
||||
it just applied (compared to the last applied value, not to the interpolation).
|
||||
- The hook publishes `--region-tail` on `<html>`: the extra bottom padding needed (capped to 15vh) to align the last region without a large empty void
|
||||
so the last region can still be aligned under the nav.
|
||||
- Do NOT re-enable native `scroll-snap-type`: Chrome's proximity snap pulls the
|
||||
page backwards and traps the user on the first region.
|
||||
- Never put `overflow-x: hidden/clip` on `html`/`body`: it breaks the sticky nav.
|
||||
- Immersive routes (`html.no-snap`) must stay scroll-free.
|
||||
|
||||
## Before Finishing
|
||||
|
||||
- Run `npm run build` if changes affect build
|
||||
- Verify paths/imports
|
||||
- Keep assets organized
|
||||
@@ -26,7 +26,7 @@
|
||||
property="og:description"
|
||||
content="A journey through code, design, and imagination. Explore my interactive creations."
|
||||
/>
|
||||
<meta property="og:image" content="/images/Esiah-s-Universe.webp" />
|
||||
<meta property="og:image" content="/images/projects/static-sites/Esiah-s-Universe.webp" />
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "eslint .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -45,7 +46,7 @@
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"eslint-plugin-react-refresh": "^0.4.24",
|
||||
"globals": "^16.5.0",
|
||||
"shadcn": "^3.8.5",
|
||||
"shadcn": "^1.0.0",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"vite": "^8.0.0-beta.13"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
RewriteBase /
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^cohaise\.esiah\.dev$ [NC]
|
||||
RewriteRule ^(.*)$ https://esiah.dev/cohaise$1 [L,R=301]
|
||||
RewriteRule ^(.*)$ https://cohaise.dev$1 [L,R=301]
|
||||
|
||||
RewriteRule ^cohaise(/.*)?$ https://cohaise.dev [L,R=301]
|
||||
|
||||
RewriteRule ^index\.html$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
||||
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 998 KiB After Width: | Height: | Size: 998 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 488 KiB After Width: | Height: | Size: 488 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 822 KiB |
|
After Width: | Height: | Size: 296 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
@@ -3,11 +3,13 @@
|
||||
<url><loc>https://esiah.dev/</loc><priority>1.0</priority></url>
|
||||
<url><loc>https://esiah.dev/projects</loc><priority>0.8</priority></url>
|
||||
<url><loc>https://esiah.dev/contact</loc><priority>0.5</priority></url>
|
||||
<url><loc>https://esiah.dev/cohaise</loc><priority>0.7</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/hinterraum</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/overclock-uprising</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/neo-tokyo-rush</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/echoes-of-the-last-stop</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/shadow-purge-rite-of-the-demon</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/zatyshok</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/wyg-tiwif</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/ensemble-scolaire-jean-xxiii</loc><priority>0.6</priority></url>
|
||||
<url><loc>https://esiah.dev/projects/les-voix-de-l-exil</loc><priority>0.6</priority></url>
|
||||
</urlset>
|
||||
@@ -11,12 +11,15 @@ import LoadingScreen from "./components/LoadingScreen";
|
||||
import ScrollToTop from "./components/ScrollToTop";
|
||||
import CardNav from "./components/CardNav";
|
||||
import NotFound from "./components/NotFound";
|
||||
import useRegionScroll from "./hooks/useRegionScroll";
|
||||
|
||||
const Home = lazy(() => import("./pages/Home"));
|
||||
const Contact = lazy(() => import("./pages/Contact"));
|
||||
const Projects = lazy(() => import("./pages/Projects"));
|
||||
const Cohaise = lazy(() => import("./pages/Cohaise"));
|
||||
const Zatyshok = lazy(() => import("./pages/projects/Zatyshok"));
|
||||
const EnsembleScolaireJeanXXIII = lazy(
|
||||
() => import("./pages/projects/EnsembleScolaireJeanXXIII"),
|
||||
);
|
||||
const NeoTokyoRush = lazy(() => import("./pages/projects/NeoTokyoRush"));
|
||||
const Hinterraum = lazy(() => import("./pages/projects/Hinterraum"));
|
||||
const OverclockUprising = lazy(
|
||||
@@ -39,19 +42,35 @@ function AppContent() {
|
||||
const isImmersive = immersivePages.includes(location.pathname);
|
||||
|
||||
useEffect(() => {
|
||||
document.documentElement.classList.toggle("no-snap", isImmersive);
|
||||
}, [isImmersive]);
|
||||
|
||||
useRegionScroll();
|
||||
|
||||
useEffect(() => {
|
||||
const handleGlobalClick = (e: MouseEvent) => {
|
||||
const target = (e.target as HTMLElement).closest("a");
|
||||
const el = e.target as HTMLElement;
|
||||
const target = el.closest("a, button") as HTMLElement | null;
|
||||
|
||||
if (!target) return;
|
||||
|
||||
if (target.hasAttribute("download")) return;
|
||||
if (target.tagName === "BUTTON") {
|
||||
// vérifie si c'est le bouton download
|
||||
if (target.textContent?.includes("Download")) return;
|
||||
}
|
||||
|
||||
const anchor = target.tagName === "A" ? (target as HTMLAnchorElement) : null;
|
||||
if (anchor) {
|
||||
if (!anchor.href) return;
|
||||
if (anchor.href.match(/\.(zip|exe|rar|7z|msi|dmg|apk|pdf)(\?|$)/i)) return;
|
||||
if (anchor.target === "_blank") return;
|
||||
if (anchor.origin !== window.location.origin) return;
|
||||
if (e.ctrlKey || e.metaKey) return;
|
||||
if (anchor.href.startsWith("mailto:") || anchor.href.startsWith("tel:")) return;
|
||||
|
||||
if (
|
||||
target &&
|
||||
target.href &&
|
||||
target.origin === window.location.origin &&
|
||||
target.target !== "_blank" &&
|
||||
!e.ctrlKey &&
|
||||
!e.metaKey
|
||||
) {
|
||||
const currentPath = window.location.pathname;
|
||||
const targetPath = new URL(target.href).pathname;
|
||||
const targetPath = new URL(anchor.href).pathname;
|
||||
if (currentPath !== targetPath) {
|
||||
setIsPageLoading(true);
|
||||
}
|
||||
@@ -82,7 +101,6 @@ function AppContent() {
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/contact" element={<Contact />} />
|
||||
<Route path="/cohaise" element={<Cohaise />} />
|
||||
<Route path="/projects" element={<Projects />} />
|
||||
<Route path="/projects/neo-tokyo-rush" element={<NeoTokyoRush />} />
|
||||
<Route path="/projects/hinterraum" element={<Hinterraum />} />
|
||||
@@ -100,6 +118,10 @@ function AppContent() {
|
||||
/>
|
||||
<Route path="/projects/zatyshok" element={<Zatyshok />} />
|
||||
<Route path="/projects/wyg-tiwif" element={<WYGTIWIF />} />
|
||||
<Route
|
||||
path="/projects/ensemble-scolaire-jean-xxiii"
|
||||
element={<EnsembleScolaireJeanXXIII />}
|
||||
/>
|
||||
<Route
|
||||
path="/projects/les-voix-de-l-exil"
|
||||
element={<LesVoixDeLExil />}
|
||||
@@ -111,7 +133,13 @@ function AppContent() {
|
||||
|
||||
{!isImmersive && (
|
||||
<footer>
|
||||
<p>© 2026 - Co Hai Se | All rights reserved.</p>
|
||||
<p>
|
||||
© 2026 -{" "}
|
||||
<a className="cursor-target font-bold" href="https://cohaise.dev">
|
||||
Co Hai Se
|
||||
</a>{" "}
|
||||
| All rights reserved.
|
||||
</p>
|
||||
</footer>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
margin-bottom: 2em;
|
||||
margin-top: 2em;
|
||||
display: block;
|
||||
align-self: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.card-nav {
|
||||
|
||||
@@ -16,7 +16,6 @@ import { mainMenuItems, projectMenuItems, MenuItem } from "./data/DataMenuItem";
|
||||
const InfiniteMenu = lazy(
|
||||
() => import("./InfiniteMenu"),
|
||||
) as React.ComponentType<any>;
|
||||
const Lanyard = lazy(() => import("./Lanyard"));
|
||||
|
||||
interface CardNavProps {
|
||||
logo?: string;
|
||||
@@ -27,13 +26,12 @@ interface CardNavProps {
|
||||
|
||||
const CardNav: React.FC<CardNavProps> = ({
|
||||
logo = "/images/logo.webp",
|
||||
logoAlt = "Esiah Logo",
|
||||
logoAlt = "Co Hai Se",
|
||||
className = "",
|
||||
ease = "power3.out",
|
||||
}) => {
|
||||
const [isHamburgerOpen, setIsHamburgerOpen] = useState<boolean>(false);
|
||||
const [isExpanded, setIsExpanded] = useState<boolean>(false);
|
||||
const [showLanyard, setShowLanyard] = useState<boolean>(false);
|
||||
|
||||
const navRef = useRef<HTMLElement>(null);
|
||||
const tlRef = useRef<gsap.core.Timeline | null>(null);
|
||||
@@ -72,14 +70,6 @@ const CardNav: React.FC<CardNavProps> = ({
|
||||
closeMenuIfOpen();
|
||||
};
|
||||
|
||||
const handleCohaiseClick = () => {
|
||||
closeMenuIfOpen();
|
||||
if (location.pathname === "/cohaise") {
|
||||
setShowLanyard(true);
|
||||
setTimeout(() => setShowLanyard(false), 5000);
|
||||
}
|
||||
};
|
||||
|
||||
const menuItems: MenuItem[] = useMemo(() => {
|
||||
if (location.pathname.startsWith("/projects")) {
|
||||
return projectMenuItems;
|
||||
@@ -135,8 +125,7 @@ const CardNav: React.FC<CardNavProps> = ({
|
||||
</div>
|
||||
|
||||
<Link
|
||||
to="/cohaise"
|
||||
onClick={handleCohaiseClick}
|
||||
to="https://cohaise.dev"
|
||||
className="right-logo-btn cursor-target"
|
||||
>
|
||||
<img
|
||||
@@ -168,10 +157,6 @@ const CardNav: React.FC<CardNavProps> = ({
|
||||
</Suspense>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<Suspense fallback={null}>
|
||||
<Lanyard show={showLanyard} />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
interface DiagonalImageStripProps {
|
||||
images: string[];
|
||||
className?: string;
|
||||
diagonal?: string;
|
||||
}
|
||||
|
||||
const DiagonalImageStrip = ({
|
||||
images,
|
||||
className = "",
|
||||
diagonal = "clamp(0.75rem, 2vw, 2rem)",
|
||||
}: DiagonalImageStripProps) => {
|
||||
if (images.length === 0) return null;
|
||||
|
||||
const clipPath = (index: number) => {
|
||||
if (images.length === 1) return undefined;
|
||||
if (index === 0) {
|
||||
return `polygon(0 0, 100% 0, calc(100% - ${diagonal}) 100%, 0 100%)`;
|
||||
}
|
||||
if (index === images.length - 1) {
|
||||
return `polygon(${diagonal} 0, 100% 0, 100% 100%, 0 100%)`;
|
||||
}
|
||||
return `polygon(${diagonal} 0, 100% 0, calc(100% - ${diagonal}) 100%, 0 100%)`;
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`flex bg-black ${className}`}>
|
||||
{images.map((src, index) => (
|
||||
<div
|
||||
key={src}
|
||||
className="relative h-full w-1/3 shrink-0 overflow-hidden"
|
||||
style={{ clipPath: clipPath(index) }}
|
||||
>
|
||||
<div
|
||||
className="absolute inset-0 bg-cover bg-center"
|
||||
style={{ backgroundImage: `url(${src})` }}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DiagonalImageStrip;
|
||||
@@ -16,8 +16,9 @@ const DownloadButton: React.FC<DownloadButtonProps> = ({ projectId }) => {
|
||||
projectData.downloadUrl !== "#" &&
|
||||
projectData.downloadUrl !== "";
|
||||
|
||||
const handleDownload = () => {
|
||||
const handleDownload = (e: React.MouseEvent) => {
|
||||
if (!isAvailable) return;
|
||||
e.stopPropagation();
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = projectData.downloadUrl;
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
:root {
|
||||
--border-subtle: rgba(255, 255, 255, 0.15);
|
||||
--text-dim: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.menu-wrap {
|
||||
width: 100vw;
|
||||
margin-left: calc(-50vw + 50%);
|
||||
margin-right: calc(-50vw + 50%);
|
||||
margin-top: 8rem;
|
||||
margin-bottom: 8rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
left: 0;
|
||||
will-change: height;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.menu {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.menu__item {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
transition: background-color 0.4s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.menu__item:last-child {
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
}
|
||||
|
||||
.menu__item-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 140px;
|
||||
padding: 0 4vw;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
font-weight: 300;
|
||||
font-size: clamp(2rem, 4vw, 3.5rem);
|
||||
letter-spacing: -1px;
|
||||
color: #fff;
|
||||
transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.menu__item-link.link-active {
|
||||
background-color: #0808083b;
|
||||
backdrop-filter: blur(10px);
|
||||
border-left: 4px solid var(--accent-red);
|
||||
padding-left: 5vw;
|
||||
}
|
||||
|
||||
.menu__item-link:hover {
|
||||
padding-left: 6vw;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* --- ACCORDÉON (DETAILS) --- */
|
||||
.service-details-wrapper {
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
min-height: 0;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.details-inner {
|
||||
padding: 4rem 4vw;
|
||||
display: grid;
|
||||
gap: 4rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.details-inner {
|
||||
gap: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.service-detail-content h3 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 400;
|
||||
color: #fff;
|
||||
margin-bottom: 1.5rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.service-detail-content p {
|
||||
color: var(--text-dim);
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.6;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.service-detail-content ul {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
margin-top: 3rem;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.service-detail-content li {
|
||||
padding: 10px 24px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 50px;
|
||||
font-size: 0.9rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: #fff;
|
||||
background: transparent;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.service-detail-content li:hover {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
/* --- MARQUEE --- */
|
||||
.marquee {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
|
||||
/* CORRECTIF FILTRE : Plus clair (0.4) pour plus de légèreté */
|
||||
background: rgba(10, 10, 10, 0.4);
|
||||
backdrop-filter: blur(6px);
|
||||
|
||||
transform: translate3d(0, 101%, 0);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.marquee__inner-wrap {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.marquee__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: fit-content; /* Laisse le contenu s'étendre */
|
||||
will-change: transform;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.marquee__part {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0; /* Empêche l'écrasement */
|
||||
padding-right: 4vw;
|
||||
}
|
||||
|
||||
.marquee span {
|
||||
font-size: clamp(2rem, 4vw, 3.5rem);
|
||||
font-weight: 300;
|
||||
padding: 0 2vw;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.marquee__img {
|
||||
width: 350px;
|
||||
height: 100px;
|
||||
margin: 0 3vw;
|
||||
border-radius: 50px;
|
||||
filter: grayscale(100%) contrast(1.2);
|
||||
opacity: 0.8;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
@media (pointer: coarse) {
|
||||
.marquee {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.menu__item-link:hover {
|
||||
padding-left: 4vw;
|
||||
}
|
||||
}
|
||||
@@ -1,266 +0,0 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import React, { useRef, useEffect, useState } from "react";
|
||||
import { gsap } from "gsap";
|
||||
import { ScrollToPlugin } from "gsap/ScrollToPlugin";
|
||||
import "./FlowingMenu.css";
|
||||
import AnimatedContent from "./AnimatedContent";
|
||||
|
||||
gsap.registerPlugin(ScrollToPlugin);
|
||||
|
||||
// --- Définition des Types pour éviter l'erreur 'never[]' ---
|
||||
export interface FlowingMenuItem {
|
||||
text: string;
|
||||
image: string;
|
||||
Component?: React.ComponentType;
|
||||
}
|
||||
|
||||
interface FlowingMenuProps {
|
||||
items?: FlowingMenuItem[];
|
||||
speed?: number;
|
||||
textColor?: string;
|
||||
bgColor?: string;
|
||||
marqueeBgColor?: string;
|
||||
marqueeTextColor?: string;
|
||||
borderColor?: string;
|
||||
}
|
||||
|
||||
const FlowingMenu: React.FC<FlowingMenuProps> = ({
|
||||
items = [],
|
||||
speed = 15,
|
||||
textColor = "#fff",
|
||||
bgColor = "transparent",
|
||||
marqueeBgColor = "rgba(0,0,0,0.8)",
|
||||
marqueeTextColor = "#fff",
|
||||
borderColor = "rgba(255,255,255,0.1)",
|
||||
}) => {
|
||||
const [activeIdx, setActiveIdx] = useState<number | null>(null);
|
||||
const [isTransitioning, setIsTransitioning] = useState(false);
|
||||
|
||||
const toggleItem = (idx: number) => {
|
||||
if (isTransitioning) return;
|
||||
if (activeIdx === idx) {
|
||||
setActiveIdx(null);
|
||||
return;
|
||||
}
|
||||
if (activeIdx !== null) {
|
||||
setIsTransitioning(true);
|
||||
setActiveIdx(null);
|
||||
setTimeout(() => {
|
||||
setActiveIdx(idx);
|
||||
setIsTransitioning(false);
|
||||
}, 500);
|
||||
} else {
|
||||
setActiveIdx(idx);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="menu-wrap" style={{ backgroundColor: bgColor }}>
|
||||
<nav className="menu">
|
||||
{items.map((item, idx) => (
|
||||
<MenuItem
|
||||
key={idx}
|
||||
{...item}
|
||||
isOpen={activeIdx === idx}
|
||||
onClick={() => toggleItem(idx)}
|
||||
speed={speed}
|
||||
textColor={textColor}
|
||||
marqueeBgColor={marqueeBgColor}
|
||||
marqueeTextColor={marqueeTextColor}
|
||||
borderColor={borderColor}
|
||||
/>
|
||||
))}
|
||||
<div style={{ height: "0px", width: "100%", pointerEvents: "none" }} />
|
||||
</nav>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// --- Sous-composant MenuItem ---
|
||||
interface MenuItemProps extends FlowingMenuItem {
|
||||
speed: number;
|
||||
textColor: string;
|
||||
marqueeBgColor: string;
|
||||
marqueeTextColor: string;
|
||||
borderColor: string;
|
||||
isOpen: boolean;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
const MenuItem: React.FC<MenuItemProps> = ({
|
||||
text,
|
||||
image,
|
||||
speed,
|
||||
textColor,
|
||||
marqueeBgColor,
|
||||
marqueeTextColor,
|
||||
borderColor,
|
||||
isOpen,
|
||||
onClick,
|
||||
Component,
|
||||
}) => {
|
||||
const itemRef = useRef<HTMLDivElement>(null);
|
||||
const marqueeRef = useRef<HTMLDivElement>(null);
|
||||
const marqueeInnerRef = useRef<HTMLDivElement>(null);
|
||||
const contentRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const [repetitions, setRepetitions] = useState(2);
|
||||
// État local pour retarder le montage du composant Masonry le temps que l'animation commence
|
||||
const [shouldRenderContent, setShouldRenderContent] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
setShouldRenderContent(true);
|
||||
} else {
|
||||
// On attend la fin de l'animation de fermeture pour démonter
|
||||
const timer = setTimeout(() => setShouldRenderContent(false), 500);
|
||||
return () => clearTimeout(timer);
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
useEffect(() => {
|
||||
const calculateRepetitions = () => {
|
||||
if (!marqueeInnerRef.current) return;
|
||||
const singlePart = marqueeInnerRef.current.querySelector(
|
||||
".marquee__part",
|
||||
) as HTMLElement;
|
||||
if (!singlePart) return;
|
||||
const partWidth = singlePart.offsetWidth;
|
||||
const windowWidth = window.innerWidth;
|
||||
if (partWidth > 0) {
|
||||
setRepetitions(Math.ceil(windowWidth / partWidth) + 4);
|
||||
}
|
||||
};
|
||||
calculateRepetitions();
|
||||
window.addEventListener("resize", calculateRepetitions);
|
||||
return () => window.removeEventListener("resize", calculateRepetitions);
|
||||
}, [text]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!marqueeInnerRef.current) return;
|
||||
const marqueeContent = marqueeInnerRef.current.querySelector(
|
||||
".marquee__part",
|
||||
) as HTMLElement;
|
||||
if (!marqueeContent) return;
|
||||
const contentWidth = marqueeContent.offsetWidth;
|
||||
const tl = gsap.to(marqueeInnerRef.current, {
|
||||
x: -contentWidth,
|
||||
duration: speed,
|
||||
ease: "none",
|
||||
repeat: -1,
|
||||
});
|
||||
return () => {
|
||||
tl.kill();
|
||||
};
|
||||
}, [speed, repetitions]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen && itemRef.current) {
|
||||
const isMobile = window.innerWidth < 768;
|
||||
gsap.to(contentRef.current, {
|
||||
height: "auto",
|
||||
opacity: 1,
|
||||
duration: 0.6,
|
||||
ease: "power3.out",
|
||||
});
|
||||
gsap.to(window, {
|
||||
duration: isMobile ? 0.8 : 1,
|
||||
delay: 0.1,
|
||||
scrollTo: {
|
||||
y: itemRef.current,
|
||||
offsetY: isMobile ? 0 : 60,
|
||||
autoKill: false,
|
||||
},
|
||||
ease: "power3.inOut",
|
||||
});
|
||||
gsap.to(marqueeRef.current, {
|
||||
y: "101%",
|
||||
duration: 0.4,
|
||||
ease: "power2.out",
|
||||
});
|
||||
} else {
|
||||
gsap.to(contentRef.current, {
|
||||
height: 0,
|
||||
opacity: 0,
|
||||
duration: 0.4,
|
||||
ease: "power3.in",
|
||||
});
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`menu__item ${isOpen ? "is-open" : ""}`}
|
||||
ref={itemRef}
|
||||
style={{ borderColor }}
|
||||
>
|
||||
<AnimatedContent
|
||||
distance={160}
|
||||
direction="horizontal"
|
||||
reverse={true}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<div
|
||||
className="menu__item-link"
|
||||
onClick={onClick}
|
||||
onMouseEnter={() =>
|
||||
!isOpen &&
|
||||
gsap.to(marqueeRef.current, {
|
||||
y: "0%",
|
||||
duration: 0.6,
|
||||
ease: "expo",
|
||||
})
|
||||
}
|
||||
onMouseLeave={() =>
|
||||
gsap.to(marqueeRef.current, {
|
||||
y: "101%",
|
||||
duration: 0.6,
|
||||
ease: "expo",
|
||||
})
|
||||
}
|
||||
>
|
||||
{text}
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<div
|
||||
className="service-details-wrapper"
|
||||
ref={contentRef}
|
||||
style={{ height: 0, overflow: "hidden", opacity: 0 }}
|
||||
>
|
||||
<div className="details-inner px-4 py-8 md:px-12 md:py-12 w-full">
|
||||
{shouldRenderContent && Component && <Component />}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="marquee"
|
||||
ref={marqueeRef}
|
||||
style={{ transform: "translate3d(0, 101%, 0)" }}
|
||||
>
|
||||
<div className="marquee__inner-wrap">
|
||||
<div className="marquee__inner" ref={marqueeInnerRef}>
|
||||
{[...Array(repetitions)].map((_, idx) => (
|
||||
<div
|
||||
className="marquee__part"
|
||||
key={idx}
|
||||
style={{ color: marqueeTextColor }}
|
||||
>
|
||||
<span>{text}</span>
|
||||
<div
|
||||
className="marquee__img"
|
||||
style={{ backgroundImage: `url(${image})` }}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default FlowingMenu;
|
||||
@@ -1,11 +1,13 @@
|
||||
import { useEffect, useRef, FC } from "react";
|
||||
import { gsap } from "gsap";
|
||||
import SpotlightCard from "./SpotlightCard";
|
||||
import DiagonalImageStrip from "./DiagonalImageStrip";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
export interface ProjectItem {
|
||||
id: string;
|
||||
img: string;
|
||||
images?: string[];
|
||||
link: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
@@ -87,7 +89,10 @@ const HorizontalMotion: FC<HorizontalMotionProps> = ({
|
||||
background: `radial-gradient(circle, ${gradientColor} 0%, transparent 100%)`,
|
||||
}}
|
||||
>
|
||||
<section className="w-full flex flex-col justify-center">
|
||||
<section
|
||||
className="w-full flex flex-col justify-center"
|
||||
data-region-children
|
||||
>
|
||||
{items.map((item, index) => (
|
||||
<div
|
||||
key={item.id}
|
||||
@@ -104,10 +109,19 @@ const HorizontalMotion: FC<HorizontalMotionProps> = ({
|
||||
className="w-full h-full p-0! border border-white/5 rounded-xl md:rounded-3xl shadow-xl overflow-hidden"
|
||||
spotlightColor="rgba(255, 255, 255, 0.1)"
|
||||
>
|
||||
<div
|
||||
className="absolute inset-0 bg-cover bg-center transition-transform duration-1000 group-hover:scale-105"
|
||||
style={{ backgroundImage: `url(${item.img})` }}
|
||||
/>
|
||||
{item.images && item.images.length > 1 ? (
|
||||
<div className="absolute inset-0">
|
||||
<DiagonalImageStrip
|
||||
images={item.images}
|
||||
className="w-full h-full"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
className="absolute inset-0 bg-cover bg-center transition-transform duration-1000 group-hover:scale-105"
|
||||
style={{ backgroundImage: `url(${item.img})` }}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="cursor-target absolute inset-0 bg-linear-to-t md:bg-linear-to-r from-black/95 via-black/50 to-transparent opacity-90 group-hover:opacity-100 transition-opacity duration-500" />
|
||||
|
||||
|
||||
@@ -12,11 +12,19 @@
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.infinite-menu-canvas {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.infinite-menu-canvas:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.infinite-menu-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
z-index: 2;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.infinite-menu-overlay::before {
|
||||
@@ -42,7 +50,7 @@
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 8%;
|
||||
z-index: 10;
|
||||
z-index: 30;
|
||||
padding: 12px 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -97,6 +105,28 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.menu-drag-hint {
|
||||
position: absolute;
|
||||
top: 18%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 6px;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.4s ease;
|
||||
}
|
||||
|
||||
.menu-drag-hint.active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.menu-drag-hint.inactive {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* --- TITRE --- */
|
||||
.face-title {
|
||||
position: absolute;
|
||||
@@ -121,7 +151,7 @@
|
||||
|
||||
.face-title.active {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
pointer-events: none;
|
||||
transition: 0.5s ease;
|
||||
}
|
||||
|
||||
@@ -152,7 +182,7 @@
|
||||
|
||||
.face-description.active {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
pointer-events: none;
|
||||
transition: 0.5s ease;
|
||||
}
|
||||
|
||||
|
||||
@@ -389,17 +389,38 @@ class ArcballControl {
|
||||
this._combinedQuat = quat.create();
|
||||
this.EPSILON = 0.1;
|
||||
this.IDENTITY_QUAT = quat.create();
|
||||
this.pointerId = null;
|
||||
canvas.addEventListener("pointerdown", (e) => {
|
||||
this.pointerId = e.pointerId;
|
||||
if (canvas.setPointerCapture) {
|
||||
try {
|
||||
canvas.setPointerCapture(e.pointerId);
|
||||
} catch {
|
||||
// Pointer capture can fail if the pointer is already released.
|
||||
}
|
||||
}
|
||||
vec2.set(this.pointerPos, e.clientX, e.clientY);
|
||||
vec2.copy(this.previousPointerPos, this.pointerPos);
|
||||
this.isPointerDown = true;
|
||||
});
|
||||
canvas.addEventListener("pointerup", () => (this.isPointerDown = false));
|
||||
canvas.addEventListener("pointerleave", () => (this.isPointerDown = false));
|
||||
const endPointer = () => {
|
||||
this.isPointerDown = false;
|
||||
if (this.pointerId !== null && canvas.releasePointerCapture) {
|
||||
try {
|
||||
canvas.releasePointerCapture(this.pointerId);
|
||||
} catch {
|
||||
// Ignore release errors.
|
||||
}
|
||||
this.pointerId = null;
|
||||
}
|
||||
};
|
||||
canvas.addEventListener("pointerup", endPointer);
|
||||
canvas.addEventListener("pointercancel", endPointer);
|
||||
canvas.addEventListener("pointermove", (e) => {
|
||||
if (this.isPointerDown) vec2.set(this.pointerPos, e.clientX, e.clientY);
|
||||
});
|
||||
canvas.style.touchAction = "none";
|
||||
canvas.style.userSelect = "none";
|
||||
}
|
||||
update(deltaTime, targetFrameDuration = 16) {
|
||||
const timeScale = deltaTime / targetFrameDuration + 0.00001;
|
||||
@@ -958,7 +979,7 @@ const defaultItems = [
|
||||
},
|
||||
];
|
||||
|
||||
export default function InfiniteMenu({ items = [], scale = 1.0, onItemClick }) {
|
||||
export default function InfiniteMenu({ items = [], scale = 1.0, onItemClick, onClose } = {}) {
|
||||
const canvasRef = useRef(null);
|
||||
const containerRef = useRef(null);
|
||||
const [activeItem, setActiveItem] = useState(null);
|
||||
@@ -997,11 +1018,20 @@ export default function InfiniteMenu({ items = [], scale = 1.0, onItemClick }) {
|
||||
};
|
||||
}, [items, scale]);
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const handleButtonClick = (e) => {
|
||||
if (e) e.stopPropagation();
|
||||
if (!activeItem?.link) return;
|
||||
if (onItemClick) {
|
||||
if (typeof onItemClick === "function") {
|
||||
onItemClick(activeItem.link);
|
||||
} else {
|
||||
const link = activeItem.link;
|
||||
if (link.includes("_blank") || link.startsWith("http")) {
|
||||
window.open(link.replace("_blank","").trim(), "_blank", "noopener,noreferrer");
|
||||
} else {
|
||||
window.location.href = link;
|
||||
}
|
||||
}
|
||||
if (typeof onClose === "function") onClose();
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -1014,9 +1044,12 @@ export default function InfiniteMenu({ items = [], scale = 1.0, onItemClick }) {
|
||||
minHeight: "1px",
|
||||
}}
|
||||
>
|
||||
<canvas id="infinite-grid-menu-canvas" ref={canvasRef} />
|
||||
<canvas id="infinite-grid-menu-canvas" ref={canvasRef} className="cursor-target infinite-menu-canvas" />
|
||||
{activeItem && (
|
||||
<div className="infinite-menu-overlay">
|
||||
<div className={`menu-drag-hint ${isMoving ? "inactive" : "active"}`}>
|
||||
Drag to explore
|
||||
</div>
|
||||
<h2 className={`face-title ${isMoving ? "inactive" : "active"}`}>
|
||||
{activeItem.title}
|
||||
</h2>
|
||||
|
||||
@@ -1,311 +0,0 @@
|
||||
/* eslint-disable react/no-unknown-property */
|
||||
"use client";
|
||||
import React, {
|
||||
useRef,
|
||||
useState,
|
||||
useMemo,
|
||||
Suspense,
|
||||
useEffect,
|
||||
useSyncExternalStore,
|
||||
} from "react";
|
||||
import { ThreeElement } from "@react-three/fiber";
|
||||
import { createPortal } from "react-dom";
|
||||
import {
|
||||
Canvas,
|
||||
extend,
|
||||
useFrame,
|
||||
useThree,
|
||||
ThreeEvent,
|
||||
} from "@react-three/fiber";
|
||||
import {
|
||||
useGLTF,
|
||||
useTexture,
|
||||
Environment,
|
||||
Lightformer,
|
||||
} from "@react-three/drei";
|
||||
import {
|
||||
BallCollider,
|
||||
CuboidCollider,
|
||||
Physics,
|
||||
RigidBody,
|
||||
useRopeJoint,
|
||||
useSphericalJoint,
|
||||
RigidBodyProps,
|
||||
} from "@react-three/rapier";
|
||||
import { MeshLineGeometry, MeshLineMaterial } from "meshline";
|
||||
import * as THREE from "three";
|
||||
|
||||
extend({ MeshLineGeometry, MeshLineMaterial });
|
||||
|
||||
declare module "@react-three/fiber" {
|
||||
interface ThreeElements {
|
||||
meshLineGeometry: ThreeElement<typeof MeshLineGeometry>;
|
||||
meshLineMaterial: ThreeElement<typeof MeshLineMaterial>;
|
||||
}
|
||||
}
|
||||
|
||||
const subscribe = () => () => {};
|
||||
function useIsClient() {
|
||||
return useSyncExternalStore(
|
||||
subscribe,
|
||||
() => true,
|
||||
() => false,
|
||||
);
|
||||
}
|
||||
|
||||
interface LanyardProps {
|
||||
show: boolean;
|
||||
gravity?: [number, number, number];
|
||||
fov?: number;
|
||||
transparent?: boolean;
|
||||
}
|
||||
|
||||
export default function Lanyard({
|
||||
show,
|
||||
gravity = [0, -20, 0],
|
||||
fov = 20,
|
||||
transparent = true,
|
||||
}: LanyardProps) {
|
||||
const isClient = useIsClient();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined") {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
const handleResize = () => setIsMobile(window.innerWidth < 768);
|
||||
window.addEventListener("resize", handleResize);
|
||||
return () => window.removeEventListener("resize", handleResize);
|
||||
}
|
||||
}, []);
|
||||
|
||||
if (!show || !isClient) return null;
|
||||
|
||||
return createPortal(
|
||||
<div className="fixed inset-0 z-99999 pointer-events-none bg-transparent transition-opacity duration-1000 ease-out opacity-100">
|
||||
<Canvas
|
||||
camera={{ position: [0, 0, 20], fov }}
|
||||
gl={{ alpha: transparent, antialias: true }}
|
||||
dpr={[1, isMobile ? 1.5 : 2]}
|
||||
onCreated={({ gl }) => gl.setClearColor(new THREE.Color(0x000000), 0)}
|
||||
className="block w-full h-full pointer-events-auto"
|
||||
>
|
||||
<Suspense fallback={null}>
|
||||
<Physics
|
||||
gravity={gravity}
|
||||
interpolate={true}
|
||||
timeStep={isMobile ? 1 / 30 : 1 / 60}
|
||||
>
|
||||
<Band isMobile={isMobile} />
|
||||
</Physics>
|
||||
</Suspense>
|
||||
|
||||
<Environment blur={0.75}>
|
||||
<Lightformer
|
||||
intensity={10}
|
||||
color="white"
|
||||
position={[-10, 0, 14]}
|
||||
rotation={[0, Math.PI / 2, Math.PI / 3]}
|
||||
scale={[100, 10, 1]}
|
||||
/>
|
||||
</Environment>
|
||||
</Canvas>
|
||||
</div>,
|
||||
document.body,
|
||||
);
|
||||
}
|
||||
|
||||
interface BandProps {
|
||||
isMobile: boolean;
|
||||
}
|
||||
|
||||
function Band({ isMobile }: BandProps) {
|
||||
const { size } = useThree();
|
||||
const band = useRef<any>(null);
|
||||
const fixed = useRef<any>(null);
|
||||
const j1 = useRef<any>(null);
|
||||
const j2 = useRef<any>(null);
|
||||
const j3 = useRef<any>(null);
|
||||
const card = useRef<any>(null);
|
||||
|
||||
const vec = new THREE.Vector3();
|
||||
const dir = new THREE.Vector3();
|
||||
const ang = new THREE.Vector3();
|
||||
const rot = new THREE.Vector3();
|
||||
|
||||
const { nodes, materials } = useGLTF("/3d/card.glb") as any;
|
||||
const texture = useTexture("/3d/lanyard.webp");
|
||||
const badgeTexture = useTexture("/3d/badge_texture.webp");
|
||||
|
||||
const [curve] = useState(
|
||||
() =>
|
||||
new THREE.CatmullRomCurve3(
|
||||
new Array(4).fill(null).map(() => new THREE.Vector3()),
|
||||
),
|
||||
);
|
||||
const [dragged, drag] = useState<THREE.Vector3 | false>(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (texture) {
|
||||
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
|
||||
texture.repeat.set(-4, 1);
|
||||
texture.anisotropy = 16;
|
||||
}
|
||||
if (badgeTexture) {
|
||||
badgeTexture.flipY = false;
|
||||
badgeTexture.anisotropy = 16;
|
||||
}
|
||||
}, [texture, badgeTexture]);
|
||||
|
||||
useRopeJoint(fixed, j1, [[0, 0, 0], [0, 0, 0], 1.2]);
|
||||
useRopeJoint(j1, j2, [[0, 0, 0], [0, 0, 0], 1.2]);
|
||||
useRopeJoint(j2, j3, [[0, 0, 0], [0, 0, 0], 1.2]);
|
||||
useSphericalJoint(j3, card, [
|
||||
[0, 0, 0],
|
||||
[0, 1.1, 0],
|
||||
]);
|
||||
|
||||
useFrame((state, delta) => {
|
||||
if (dragged && card.current) {
|
||||
vec.set(state.pointer.x, state.pointer.y, 0.5).unproject(state.camera);
|
||||
dir.copy(vec).sub(state.camera.position).normalize();
|
||||
vec.add(dir.multiplyScalar(state.camera.position.length()));
|
||||
|
||||
[card, j1, j2, j3, fixed].forEach((ref) => ref.current?.wakeUp());
|
||||
|
||||
card.current.setNextKinematicTranslation({
|
||||
x: vec.x - dragged.x,
|
||||
y: vec.y - dragged.y,
|
||||
z: vec.z - dragged.z,
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
fixed.current &&
|
||||
card.current &&
|
||||
j1.current &&
|
||||
j2.current &&
|
||||
band.current
|
||||
) {
|
||||
[j1, j2].forEach((ref) => {
|
||||
if (!ref.current.lerped)
|
||||
ref.current.lerped = new THREE.Vector3().copy(
|
||||
ref.current.translation(),
|
||||
);
|
||||
ref.current.lerped.lerp(ref.current.translation(), delta * 20);
|
||||
});
|
||||
|
||||
const cardPos = card.current.translation();
|
||||
curve.points[0].set(cardPos.x, cardPos.y + 0.8, cardPos.z);
|
||||
curve.points[1].copy(j2.current.lerped);
|
||||
curve.points[2].copy(j1.current.lerped);
|
||||
curve.points[3].copy(fixed.current.translation());
|
||||
band.current.geometry.setPoints(curve.getPoints(isMobile ? 16 : 32));
|
||||
|
||||
ang.copy(card.current.angvel());
|
||||
rot.copy(card.current.rotation());
|
||||
card.current.setAngvel({ x: ang.x, y: ang.y - rot.y * 0.25, z: ang.z });
|
||||
}
|
||||
});
|
||||
|
||||
const physicsProps = {
|
||||
linearDamping: 6,
|
||||
angularDamping: 4,
|
||||
friction: 0.5,
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<group position={[1, 5, 0]}>
|
||||
<RigidBody ref={fixed} type="fixed" />
|
||||
<RigidBody
|
||||
position={[0, 2, 0]}
|
||||
ref={j1}
|
||||
type="dynamic"
|
||||
{...physicsProps}
|
||||
>
|
||||
<BallCollider args={[0.1]} />
|
||||
</RigidBody>
|
||||
<RigidBody
|
||||
position={[0, 2, 0]}
|
||||
ref={j2}
|
||||
type="dynamic"
|
||||
{...physicsProps}
|
||||
>
|
||||
<BallCollider args={[0.1]} />
|
||||
</RigidBody>
|
||||
<RigidBody
|
||||
position={[0, 2, 0]}
|
||||
ref={j3}
|
||||
type="dynamic"
|
||||
{...physicsProps}
|
||||
>
|
||||
<BallCollider args={[0.1]} />
|
||||
</RigidBody>
|
||||
|
||||
<RigidBody
|
||||
ref={card}
|
||||
type={dragged ? "kinematicPosition" : "dynamic"}
|
||||
position={[0, 2, 0]}
|
||||
{...physicsProps}
|
||||
>
|
||||
<CuboidCollider args={[0.8, 1.125, 0.01]} />
|
||||
<group
|
||||
scale={2.25}
|
||||
position={[0, -1.2, 0]}
|
||||
onPointerDown={(e: ThreeEvent<PointerEvent>) => {
|
||||
(e.target as HTMLElement).setPointerCapture(e.pointerId);
|
||||
drag(
|
||||
new THREE.Vector3()
|
||||
.copy(e.point)
|
||||
.sub(vec.copy(card.current.translation())),
|
||||
);
|
||||
}}
|
||||
onPointerUp={(e: ThreeEvent<PointerEvent>) => {
|
||||
(e.target as HTMLElement).releasePointerCapture(e.pointerId);
|
||||
drag(false);
|
||||
}}
|
||||
>
|
||||
<mesh
|
||||
geometry={nodes.card.geometry}
|
||||
rotation={[Math.PI / 2, 0, 0]}
|
||||
renderOrder={2}
|
||||
>
|
||||
<meshPhysicalMaterial
|
||||
map={badgeTexture}
|
||||
clearcoat={isMobile ? 0 : 1}
|
||||
clearcoatRoughness={0.15}
|
||||
roughness={0.3}
|
||||
metalness={0.2}
|
||||
/>
|
||||
</mesh>
|
||||
{nodes.clip && (
|
||||
<mesh
|
||||
geometry={nodes.clip.geometry}
|
||||
material={materials.metal}
|
||||
renderOrder={2}
|
||||
/>
|
||||
)}
|
||||
</group>
|
||||
</RigidBody>
|
||||
</group>
|
||||
|
||||
<mesh ref={band} renderOrder={1}>
|
||||
<meshLineGeometry />
|
||||
<meshLineMaterial
|
||||
args={[
|
||||
{
|
||||
resolution: new THREE.Vector2(size.width, size.height),
|
||||
} as any,
|
||||
]}
|
||||
transparent={true}
|
||||
depthTest={false}
|
||||
resolution={[size.width, size.height]}
|
||||
useMap={1}
|
||||
map={texture}
|
||||
repeat={[-4, 1]}
|
||||
lineWidth={1.2}
|
||||
/>
|
||||
</mesh>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,546 +0,0 @@
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
|
||||
export type LogoItem =
|
||||
| {
|
||||
node: React.ReactNode;
|
||||
href?: string;
|
||||
title?: string;
|
||||
ariaLabel?: string;
|
||||
}
|
||||
| {
|
||||
src: string;
|
||||
alt?: string;
|
||||
href?: string;
|
||||
title?: string;
|
||||
srcSet?: string;
|
||||
sizes?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
};
|
||||
|
||||
export interface LogoLoopProps {
|
||||
logos: LogoItem[];
|
||||
speed?: number;
|
||||
direction?: "left" | "right" | "up" | "down";
|
||||
width?: number | string;
|
||||
logoHeight?: number;
|
||||
gap?: number;
|
||||
pauseOnHover?: boolean;
|
||||
hoverSpeed?: number;
|
||||
fadeOut?: boolean;
|
||||
fadeOutColor?: string;
|
||||
scaleOnHover?: boolean;
|
||||
renderItem?: (item: LogoItem, key: React.Key) => React.ReactNode;
|
||||
ariaLabel?: string;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const ANIMATION_CONFIG = {
|
||||
SMOOTH_TAU: 0.25,
|
||||
MIN_COPIES: 2,
|
||||
COPY_HEADROOM: 2,
|
||||
} as const;
|
||||
|
||||
const toCssLength = (value?: number | string): string | undefined =>
|
||||
typeof value === "number" ? `${value}px` : (value ?? undefined);
|
||||
|
||||
const cx = (...parts: Array<string | false | null | undefined>) =>
|
||||
parts.filter(Boolean).join(" ");
|
||||
|
||||
const useResizeObserver = (
|
||||
callback: () => void,
|
||||
elements: Array<React.RefObject<Element | null>>,
|
||||
dependencies: React.DependencyList,
|
||||
) => {
|
||||
useEffect(() => {
|
||||
if (!window.ResizeObserver) {
|
||||
const handleResize = () => callback();
|
||||
window.addEventListener("resize", handleResize);
|
||||
callback();
|
||||
return () => window.removeEventListener("resize", handleResize);
|
||||
}
|
||||
|
||||
const observers = elements.map((ref) => {
|
||||
if (!ref.current) return null;
|
||||
const observer = new ResizeObserver(callback);
|
||||
observer.observe(ref.current);
|
||||
return observer;
|
||||
});
|
||||
|
||||
callback();
|
||||
|
||||
return () => {
|
||||
observers.forEach((observer) => observer?.disconnect());
|
||||
};
|
||||
}, dependencies);
|
||||
};
|
||||
|
||||
const useImageLoader = (
|
||||
seqRef: React.RefObject<HTMLUListElement | null>,
|
||||
onLoad: () => void,
|
||||
dependencies: React.DependencyList,
|
||||
) => {
|
||||
useEffect(() => {
|
||||
const images = seqRef.current?.querySelectorAll("img") ?? [];
|
||||
|
||||
if (images.length === 0) {
|
||||
onLoad();
|
||||
return;
|
||||
}
|
||||
|
||||
let remainingImages = images.length;
|
||||
const handleImageLoad = () => {
|
||||
remainingImages -= 1;
|
||||
if (remainingImages === 0) {
|
||||
onLoad();
|
||||
}
|
||||
};
|
||||
|
||||
images.forEach((img) => {
|
||||
const htmlImg = img as HTMLImageElement;
|
||||
if (htmlImg.complete) {
|
||||
handleImageLoad();
|
||||
} else {
|
||||
htmlImg.addEventListener("load", handleImageLoad, { once: true });
|
||||
htmlImg.addEventListener("error", handleImageLoad, { once: true });
|
||||
}
|
||||
});
|
||||
|
||||
return () => {
|
||||
images.forEach((img) => {
|
||||
img.removeEventListener("load", handleImageLoad);
|
||||
img.removeEventListener("error", handleImageLoad);
|
||||
});
|
||||
};
|
||||
}, dependencies);
|
||||
};
|
||||
|
||||
const useAnimationLoop = (
|
||||
trackRef: React.RefObject<HTMLDivElement | null>,
|
||||
targetVelocity: number,
|
||||
seqWidth: number,
|
||||
seqHeight: number,
|
||||
isHovered: boolean,
|
||||
hoverSpeed: number | undefined,
|
||||
isVertical: boolean,
|
||||
) => {
|
||||
const rafRef = useRef<number | null>(null);
|
||||
const lastTimestampRef = useRef<number | null>(null);
|
||||
const offsetRef = useRef(0);
|
||||
const velocityRef = useRef(0);
|
||||
|
||||
useEffect(() => {
|
||||
const track = trackRef.current;
|
||||
if (!track) return;
|
||||
|
||||
const prefersReduced =
|
||||
typeof window !== "undefined" &&
|
||||
window.matchMedia &&
|
||||
window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
|
||||
const seqSize = isVertical ? seqHeight : seqWidth;
|
||||
|
||||
if (seqSize > 0) {
|
||||
offsetRef.current = ((offsetRef.current % seqSize) + seqSize) % seqSize;
|
||||
const transformValue = isVertical
|
||||
? `translate3d(0, ${-offsetRef.current}px, 0)`
|
||||
: `translate3d(${-offsetRef.current}px, 0, 0)`;
|
||||
track.style.transform = transformValue;
|
||||
}
|
||||
|
||||
if (prefersReduced) {
|
||||
track.style.transform = isVertical
|
||||
? "translate3d(0, 0, 0)"
|
||||
: "translate3d(0, 0, 0)";
|
||||
return () => {
|
||||
lastTimestampRef.current = null;
|
||||
};
|
||||
}
|
||||
|
||||
const animate = (timestamp: number) => {
|
||||
if (lastTimestampRef.current === null) {
|
||||
lastTimestampRef.current = timestamp;
|
||||
}
|
||||
|
||||
const deltaTime =
|
||||
Math.max(0, timestamp - lastTimestampRef.current) / 1000;
|
||||
lastTimestampRef.current = timestamp;
|
||||
|
||||
const target =
|
||||
isHovered && hoverSpeed !== undefined ? hoverSpeed : targetVelocity;
|
||||
|
||||
const easingFactor =
|
||||
1 - Math.exp(-deltaTime / ANIMATION_CONFIG.SMOOTH_TAU);
|
||||
velocityRef.current += (target - velocityRef.current) * easingFactor;
|
||||
|
||||
if (seqSize > 0) {
|
||||
let nextOffset = offsetRef.current + velocityRef.current * deltaTime;
|
||||
nextOffset = ((nextOffset % seqSize) + seqSize) % seqSize;
|
||||
offsetRef.current = nextOffset;
|
||||
|
||||
const transformValue = isVertical
|
||||
? `translate3d(0, ${-offsetRef.current}px, 0)`
|
||||
: `translate3d(${-offsetRef.current}px, 0, 0)`;
|
||||
track.style.transform = transformValue;
|
||||
}
|
||||
|
||||
rafRef.current = requestAnimationFrame(animate);
|
||||
};
|
||||
|
||||
rafRef.current = requestAnimationFrame(animate);
|
||||
|
||||
return () => {
|
||||
if (rafRef.current !== null) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
rafRef.current = null;
|
||||
}
|
||||
lastTimestampRef.current = null;
|
||||
};
|
||||
}, [targetVelocity, seqWidth, seqHeight, isHovered, hoverSpeed, isVertical]);
|
||||
};
|
||||
|
||||
export const LogoLoop = React.memo<LogoLoopProps>(
|
||||
({
|
||||
logos,
|
||||
speed = 120,
|
||||
direction = "left",
|
||||
width = "100%",
|
||||
logoHeight = 28,
|
||||
gap = 32,
|
||||
pauseOnHover,
|
||||
hoverSpeed,
|
||||
fadeOut = false,
|
||||
fadeOutColor,
|
||||
scaleOnHover = false,
|
||||
renderItem,
|
||||
ariaLabel = "Partner logos",
|
||||
className,
|
||||
style,
|
||||
}) => {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const trackRef = useRef<HTMLDivElement>(null);
|
||||
const seqRef = useRef<HTMLUListElement>(null);
|
||||
|
||||
const [seqWidth, setSeqWidth] = useState<number>(0);
|
||||
const [seqHeight, setSeqHeight] = useState<number>(0);
|
||||
const [copyCount, setCopyCount] = useState<number>(
|
||||
ANIMATION_CONFIG.MIN_COPIES,
|
||||
);
|
||||
const [isHovered, setIsHovered] = useState<boolean>(false);
|
||||
|
||||
const effectiveHoverSpeed = useMemo(() => {
|
||||
if (hoverSpeed !== undefined) return hoverSpeed;
|
||||
if (pauseOnHover === true) return 0;
|
||||
if (pauseOnHover === false) return undefined;
|
||||
return 0;
|
||||
}, [hoverSpeed, pauseOnHover]);
|
||||
|
||||
const isVertical = direction === "up" || direction === "down";
|
||||
|
||||
const targetVelocity = useMemo(() => {
|
||||
const magnitude = Math.abs(speed);
|
||||
let directionMultiplier: number;
|
||||
if (isVertical) {
|
||||
directionMultiplier = direction === "up" ? 1 : -1;
|
||||
} else {
|
||||
directionMultiplier = direction === "left" ? 1 : -1;
|
||||
}
|
||||
const speedMultiplier = speed < 0 ? -1 : 1;
|
||||
return magnitude * directionMultiplier * speedMultiplier;
|
||||
}, [speed, direction, isVertical]);
|
||||
|
||||
const updateDimensions = useCallback(() => {
|
||||
const containerWidth = containerRef.current?.clientWidth ?? 0;
|
||||
const sequenceRect = seqRef.current?.getBoundingClientRect?.();
|
||||
const sequenceWidth = sequenceRect?.width ?? 0;
|
||||
const sequenceHeight = sequenceRect?.height ?? 0;
|
||||
if (isVertical) {
|
||||
const parentHeight =
|
||||
containerRef.current?.parentElement?.clientHeight ?? 0;
|
||||
if (containerRef.current && parentHeight > 0) {
|
||||
const targetHeight = Math.ceil(parentHeight);
|
||||
if (containerRef.current.style.height !== `${targetHeight}px`)
|
||||
containerRef.current.style.height = `${targetHeight}px`;
|
||||
}
|
||||
if (sequenceHeight > 0) {
|
||||
setSeqHeight(Math.ceil(sequenceHeight));
|
||||
const viewport =
|
||||
containerRef.current?.clientHeight ??
|
||||
parentHeight ??
|
||||
sequenceHeight;
|
||||
const copiesNeeded =
|
||||
Math.ceil(viewport / sequenceHeight) +
|
||||
ANIMATION_CONFIG.COPY_HEADROOM;
|
||||
setCopyCount(Math.max(ANIMATION_CONFIG.MIN_COPIES, copiesNeeded));
|
||||
}
|
||||
} else if (sequenceWidth > 0) {
|
||||
setSeqWidth(Math.ceil(sequenceWidth));
|
||||
const copiesNeeded =
|
||||
Math.ceil(containerWidth / sequenceWidth) +
|
||||
ANIMATION_CONFIG.COPY_HEADROOM;
|
||||
setCopyCount(Math.max(ANIMATION_CONFIG.MIN_COPIES, copiesNeeded));
|
||||
}
|
||||
}, [isVertical]);
|
||||
|
||||
useResizeObserver(
|
||||
updateDimensions,
|
||||
[containerRef, seqRef],
|
||||
[logos, gap, logoHeight, isVertical],
|
||||
);
|
||||
|
||||
useImageLoader(seqRef, updateDimensions, [
|
||||
logos,
|
||||
gap,
|
||||
logoHeight,
|
||||
isVertical,
|
||||
]);
|
||||
|
||||
useAnimationLoop(
|
||||
trackRef,
|
||||
targetVelocity,
|
||||
seqWidth,
|
||||
seqHeight,
|
||||
isHovered,
|
||||
effectiveHoverSpeed,
|
||||
isVertical,
|
||||
);
|
||||
|
||||
const cssVariables = useMemo(
|
||||
() =>
|
||||
({
|
||||
"--logoloop-gap": `${gap}px`,
|
||||
"--logoloop-logoHeight": `${logoHeight}px`,
|
||||
...(fadeOutColor && { "--logoloop-fadeColor": fadeOutColor }),
|
||||
}) as React.CSSProperties,
|
||||
[gap, logoHeight, fadeOutColor],
|
||||
);
|
||||
|
||||
const rootClasses = useMemo(
|
||||
() =>
|
||||
cx(
|
||||
"relative group",
|
||||
isVertical
|
||||
? "overflow-hidden h-full inline-block"
|
||||
: "overflow-x-hidden",
|
||||
"[--logoloop-gap:32px]",
|
||||
"[--logoloop-logoHeight:28px]",
|
||||
"[--logoloop-fadeColorAuto:#ffffff]",
|
||||
"dark:[--logoloop-fadeColorAuto:#0b0b0b]",
|
||||
scaleOnHover && "py-[calc(var(--logoloop-logoHeight)*0.1)]",
|
||||
className,
|
||||
),
|
||||
[isVertical, scaleOnHover, className],
|
||||
);
|
||||
|
||||
const handleMouseEnter = useCallback(() => {
|
||||
if (effectiveHoverSpeed !== undefined) setIsHovered(true);
|
||||
}, [effectiveHoverSpeed]);
|
||||
const handleMouseLeave = useCallback(() => {
|
||||
if (effectiveHoverSpeed !== undefined) setIsHovered(false);
|
||||
}, [effectiveHoverSpeed]);
|
||||
|
||||
const renderLogoItem = useCallback(
|
||||
(item: LogoItem, key: React.Key) => {
|
||||
if (renderItem) {
|
||||
return (
|
||||
<li
|
||||
className={cx(
|
||||
"flex-none text-(length:--logoloop-logoHeight) leading-none",
|
||||
isVertical ? "mb-(--logoloop-gap)" : "mr-(--logoloop-gap)",
|
||||
scaleOnHover && "overflow-visible group/item",
|
||||
)}
|
||||
key={key}
|
||||
role="listitem"
|
||||
>
|
||||
{renderItem(item, key)}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
const isNodeItem = "node" in item;
|
||||
|
||||
const content = isNodeItem ? (
|
||||
<span
|
||||
className={cx(
|
||||
"inline-flex items-center",
|
||||
"motion-reduce:transition-none",
|
||||
scaleOnHover &&
|
||||
"transition-transform duration-300 ease-in-out group-hover/item:scale-120",
|
||||
)}
|
||||
aria-hidden={!!(item as any).href && !(item as any).ariaLabel}
|
||||
>
|
||||
{(item as any).node}
|
||||
</span>
|
||||
) : (
|
||||
<img
|
||||
className={cx(
|
||||
"h-(--logoloop-logoHeight) w-auto block object-contain",
|
||||
"[-webkit-user-drag:none] pointer-events-none",
|
||||
"[image-rendering:-webkit-optimize-contrast]",
|
||||
"motion-reduce:transition-none",
|
||||
scaleOnHover &&
|
||||
"transition-transform duration-300 ease-in-out group-hover/item:scale-120",
|
||||
)}
|
||||
src={(item as any).src}
|
||||
srcSet={(item as any).srcSet}
|
||||
sizes={(item as any).sizes}
|
||||
width={(item as any).width}
|
||||
height={(item as any).height}
|
||||
alt={(item as any).alt ?? ""}
|
||||
title={(item as any).title}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
draggable={false}
|
||||
/>
|
||||
);
|
||||
|
||||
const itemAriaLabel = isNodeItem
|
||||
? ((item as any).ariaLabel ?? (item as any).title)
|
||||
: ((item as any).alt ?? (item as any).title);
|
||||
|
||||
const inner = (item as any).href ? (
|
||||
<a
|
||||
className={cx(
|
||||
"inline-flex items-center no-underline rounded",
|
||||
"transition-opacity duration-200 ease-linear",
|
||||
"hover:opacity-80",
|
||||
"focus-visible:outline focus-visible:outline-current focus-visible:outline-offset-2",
|
||||
)}
|
||||
href={(item as any).href}
|
||||
aria-label={itemAriaLabel || "logo link"}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
{content}
|
||||
</a>
|
||||
) : (
|
||||
content
|
||||
);
|
||||
|
||||
return (
|
||||
<li
|
||||
className={cx(
|
||||
"flex-none text-(length:--logoloop-logoHeight) leading-none",
|
||||
isVertical ? "mb-(--logoloop-gap)" : "mr-(--logoloop-gap)",
|
||||
scaleOnHover && "overflow-visible group/item",
|
||||
)}
|
||||
key={key}
|
||||
role="listitem"
|
||||
>
|
||||
{inner}
|
||||
</li>
|
||||
);
|
||||
},
|
||||
[isVertical, scaleOnHover, renderItem],
|
||||
);
|
||||
|
||||
const logoLists = useMemo(
|
||||
() =>
|
||||
Array.from({ length: copyCount }, (_, copyIndex) => (
|
||||
<ul
|
||||
className={cx("flex items-center", isVertical && "flex-col")}
|
||||
key={`copy-${copyIndex}`}
|
||||
role="list"
|
||||
aria-hidden={copyIndex > 0}
|
||||
ref={copyIndex === 0 ? seqRef : undefined}
|
||||
>
|
||||
{logos.map((item, itemIndex) =>
|
||||
renderLogoItem(item, `${copyIndex}-${itemIndex}`),
|
||||
)}
|
||||
</ul>
|
||||
)),
|
||||
[copyCount, logos, renderLogoItem, isVertical],
|
||||
);
|
||||
|
||||
const containerStyle = useMemo(
|
||||
(): React.CSSProperties => ({
|
||||
width: isVertical
|
||||
? toCssLength(width) === "100%"
|
||||
? undefined
|
||||
: toCssLength(width)
|
||||
: (toCssLength(width) ?? "100%"),
|
||||
...cssVariables,
|
||||
...style,
|
||||
}),
|
||||
[width, cssVariables, style, isVertical],
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={containerRef}
|
||||
className={rootClasses}
|
||||
style={containerStyle}
|
||||
role="region"
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
{fadeOut && (
|
||||
<>
|
||||
{isVertical ? (
|
||||
<>
|
||||
<div
|
||||
aria-hidden
|
||||
className={cx(
|
||||
"pointer-events-none absolute inset-x-0 top-0 z-10",
|
||||
"h-[clamp(24px,8%,120px)]",
|
||||
"bg-[linear-gradient(to_bottom,var(--logoloop-fadeColor,var(--logoloop-fadeColorAuto))_0%,rgba(0,0,0,0)_100%)]",
|
||||
)}
|
||||
/>
|
||||
<div
|
||||
aria-hidden
|
||||
className={cx(
|
||||
"pointer-events-none absolute inset-x-0 bottom-0 z-10",
|
||||
"h-[clamp(24px,8%,120px)]",
|
||||
"bg-[linear-gradient(to_top,var(--logoloop-fadeColor,var(--logoloop-fadeColorAuto))_0%,rgba(0,0,0,0)_100%)]",
|
||||
)}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div
|
||||
aria-hidden
|
||||
className={cx(
|
||||
"pointer-events-none absolute inset-y-0 left-0 z-10",
|
||||
"w-[clamp(24px,8%,120px)]",
|
||||
"bg-[linear-gradient(to_right,var(--logoloop-fadeColor,var(--logoloop-fadeColorAuto))_0%,rgba(0,0,0,0)_100%)]",
|
||||
)}
|
||||
/>
|
||||
<div
|
||||
aria-hidden
|
||||
className={cx(
|
||||
"pointer-events-none absolute inset-y-0 right-0 z-10",
|
||||
"w-[clamp(24px,8%,120px)]",
|
||||
"bg-[linear-gradient(to_left,var(--logoloop-fadeColor,var(--logoloop-fadeColorAuto))_0%,rgba(0,0,0,0)_100%)]",
|
||||
)}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
<div
|
||||
className={cx(
|
||||
"flex will-change-transform select-none relative z-0",
|
||||
"motion-reduce:transform-none",
|
||||
isVertical ? "flex-col h-max w-full" : "flex-row w-max",
|
||||
)}
|
||||
ref={trackRef}
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
>
|
||||
{logoLists}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
LogoLoop.displayName = "LogoLoop";
|
||||
|
||||
export default LogoLoop;
|
||||
@@ -3,11 +3,13 @@
|
||||
import React, { useRef, useEffect, useCallback } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { gsap } from "gsap";
|
||||
import DiagonalImageStrip from "./DiagonalImageStrip";
|
||||
|
||||
// --- Interfaces ---
|
||||
export interface CardDataItem {
|
||||
title: string;
|
||||
image: string;
|
||||
image?: string;
|
||||
images?: string[];
|
||||
description: string;
|
||||
label: string;
|
||||
link: string;
|
||||
@@ -30,48 +32,53 @@ export interface MagicBentoProps {
|
||||
const DEFAULT_GLOW_COLOR = "183, 28, 28";
|
||||
|
||||
const cardData: CardDataItem[] = [
|
||||
{
|
||||
title: "Metz Campus",
|
||||
image: "/images/projects/Metz-Campus.webp",
|
||||
description: "Web platform for students.",
|
||||
label: "WordPress Web site",
|
||||
link: "https://metzcampus.fr",
|
||||
},
|
||||
{
|
||||
title: "Coeur UA PAM",
|
||||
image: "/images/projects/Coeur-UA-PAM.webp",
|
||||
image: "/images/projects/static-sites/Coeur-UA-PAM.webp",
|
||||
description: "Web site of the Coeur UA PAM association.",
|
||||
label: "React Web site",
|
||||
label: "Static Website",
|
||||
link: "https://coeur-ua-pam.org/",
|
||||
},
|
||||
{
|
||||
title: "Ensemble Scolaire Jean XXIII",
|
||||
images: [
|
||||
"/images/projects/web-applications/j23/J23-Defi6e.webp",
|
||||
"/images/projects/web-applications/j23/J23-CRM.webp",
|
||||
"/images/projects/web-applications/j23/J23-Inventory.webp",
|
||||
],
|
||||
description: "Three applications developed during my internship.",
|
||||
label: "Web Application",
|
||||
link: "/projects/ensemble-scolaire-jean-xxiii",
|
||||
},
|
||||
{
|
||||
title: "About Co Hai Se",
|
||||
image: "/images/cohaise/cohaise.webp",
|
||||
image: "/images/projects/web-applications/cohaise.webp",
|
||||
description: "Crafting the Web of Your Ambitions.",
|
||||
label: "Identity",
|
||||
link: "/cohaise",
|
||||
link: "https://cohaise.dev",
|
||||
},
|
||||
{
|
||||
title: "Projects",
|
||||
image: "/images/projects/Projects.webp",
|
||||
image: "/images/projects/static-sites/Projects.webp",
|
||||
description: "Discover who am i by my creations.",
|
||||
label: "Identity",
|
||||
link: "/projects",
|
||||
},
|
||||
{
|
||||
title: "Затишок",
|
||||
image: "/images/projects/Zatyshok.webp",
|
||||
image: "/images/projects/web-applications/Zatyshok.webp",
|
||||
description:
|
||||
"Moodboard/Planner highly customisable application developed with love !",
|
||||
label: "Desktop App",
|
||||
label: "Web Application",
|
||||
link: "/projects/zatyshok",
|
||||
},
|
||||
{
|
||||
title: "Shadow Purge",
|
||||
image: "/images/projects/SPRotD.webp",
|
||||
description: "Hack n'slash RPG.",
|
||||
title: "Overclock//Uprising",
|
||||
image: "/images/projects/game-dev/ovup/OvUp-Menu.webp",
|
||||
description:
|
||||
"Die & retry 3D platformer game in a cyberpunk aesthetic made with Unity.",
|
||||
label: "Gamedev",
|
||||
link: "/projects/shadow-purge-rite-of-the-demon",
|
||||
link: "/projects/overclock-uprising",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -191,12 +198,21 @@ const ParticleCard: React.FC<{
|
||||
<div
|
||||
ref={cardRef}
|
||||
onClick={() => onClick(card.link)}
|
||||
className={`cursor-target group relative flex flex-col justify-between aspect-4/3 min-h-55 w-full p-6 rounded-[20px] border border-[#1a0505] bg-[#050000] bg-cover bg-center overflow-hidden transition-all duration-300 z-10 hover:-translate-y-1 hover:shadow-[0_0_30px_rgba(183,28,28,0.2)] ${className}`}
|
||||
style={{
|
||||
backgroundImage: `url(${card.image})`,
|
||||
transformStyle: "preserve-3d",
|
||||
}}
|
||||
className={`cursor-target group relative flex flex-col justify-between aspect-4/3 min-h-55 w-full p-6 rounded-[20px] border border-[#1a0505] bg-[#050000] overflow-hidden transition-all duration-300 z-10 hover:-translate-y-1 hover:shadow-[0_0_30px_rgba(183,28,28,0.2)] ${className}`}
|
||||
style={
|
||||
card.image && !card.images
|
||||
? {
|
||||
backgroundImage: `url(${card.image})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
transformStyle: "preserve-3d",
|
||||
}
|
||||
: { transformStyle: "preserve-3d" }
|
||||
}
|
||||
>
|
||||
{card.images ? (
|
||||
<DiagonalImageStrip images={card.images} className="absolute inset-0" />
|
||||
) : null}
|
||||
<div className="absolute inset-0 bg-linear-to-b from-black/40 to-black/80 z-0 pointer-events-none" />
|
||||
|
||||
{enableBorderGlow && (
|
||||
@@ -257,7 +273,7 @@ export default function MagicBento({
|
||||
|
||||
return (
|
||||
<div className="w-full max-w-300 mx-auto p-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3" data-region>
|
||||
{cardData.map((card, i) => (
|
||||
<ParticleCard
|
||||
key={i}
|
||||
|
||||
@@ -1,45 +1,27 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import PageShell from "@/components/layout/PageShell";
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div className="flex flex-col items-center py-[30vh] min-h-[120vh] pointer-events-none relative z-10">
|
||||
<SEO
|
||||
title="404 - Lost in Space"
|
||||
description="The coordinates you are looking for do not exist in Esiah's Universe."
|
||||
/>
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
duration={1.5}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
>
|
||||
<section className="text-center mb-16 min-h-[60vh] pointer-events-none px-4">
|
||||
<h1 className="text-[clamp(2rem,5vw,4rem)] font-bold mb-4 text-[#b71c1c] [text-shadow:0_0_20px_rgba(183,28,28,0.4)] leading-tight">
|
||||
404
|
||||
</h1>
|
||||
<h2 className="text-[clamp(0.9rem,2vw,1.2rem)] text-[#a6a6a9] tracking-[2px] mx-auto mb-8">
|
||||
Coordinates Not Found
|
||||
</h2>
|
||||
<PageShell
|
||||
title="404"
|
||||
subtitle="Coordinates Not Found"
|
||||
description="The coordinates you are looking for do not exist in Esiah's Universe."
|
||||
>
|
||||
<section className="main-section">
|
||||
<span className="block max-w-md mt-8 mb-12 text-white/50 text-lg mx-auto">
|
||||
You've reached the edge of the known universe. This page has drifted
|
||||
away or never existed in this galaxy.
|
||||
</span>
|
||||
|
||||
<span className="block max-w-md mb-12 text-white/50 text-lg mx-auto">
|
||||
You've reached the edge of the known universe. This page has drifted
|
||||
away or never existed in this galaxy.
|
||||
</span>
|
||||
|
||||
<Link
|
||||
to="/"
|
||||
className="cursor-target px-8 py-4 bg-[#b71c1c] text-white font-bold rounded-full hover:bg-[#d32f2f] hover:scale-105 transition-all shadow-lg"
|
||||
>
|
||||
Back to Home
|
||||
</Link>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
<Link
|
||||
to="/"
|
||||
className="cursor-target px-8 py-4 bg-[#b71c1c] text-white font-bold rounded-full hover:bg-[#d32f2f] hover:scale-105 transition-all shadow-lg"
|
||||
>
|
||||
Back to Home
|
||||
</Link>
|
||||
</section>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface SEOProps {
|
||||
const SEO: React.FC<SEOProps> = ({
|
||||
title,
|
||||
description,
|
||||
image = "/images/Esiah-s-Universe.webp",
|
||||
image = "/images/projects/static-sites/Esiah-s-Universe.webp",
|
||||
favicon = "/images/logo.webp",
|
||||
url = typeof window !== "undefined" ? window.location.href : "",
|
||||
type = "website",
|
||||
|
||||
@@ -1,12 +1,43 @@
|
||||
import { useEffect } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useEffect, useLayoutEffect } from "react";
|
||||
import { useLocation, useNavigationType } from "react-router-dom";
|
||||
|
||||
/* Saut instantané : un scroll animé est annulé par le refresh de ScrollTrigger
|
||||
triggered par le changement de page, ce qui laissait la page à mi-hauteur. */
|
||||
const jumpToTop = () => {
|
||||
const root = document.documentElement;
|
||||
const previous = root.style.scrollBehavior;
|
||||
|
||||
root.style.scrollBehavior = "auto";
|
||||
window.scrollTo(0, 0);
|
||||
root.style.scrollBehavior = previous;
|
||||
};
|
||||
|
||||
export default function ScrollToTop() {
|
||||
const { pathname } = useLocation();
|
||||
const navigationType = useNavigationType();
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, [pathname]);
|
||||
jumpToTop();
|
||||
}, []);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
// Les navigations POP (retour/avance) gardent la position restaurée
|
||||
// par le navigateur, les autres reviennent en haut de la page.
|
||||
if (navigationType === "POP") return;
|
||||
|
||||
jumpToTop();
|
||||
|
||||
const frame = requestAnimationFrame(() => {
|
||||
jumpToTop();
|
||||
requestAnimationFrame(jumpToTop);
|
||||
});
|
||||
const timer = window.setTimeout(jumpToTop, 120);
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(frame);
|
||||
window.clearTimeout(timer);
|
||||
};
|
||||
}, [pathname, navigationType]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,73 +1,45 @@
|
||||
import { useLocation } from "react-router-dom";
|
||||
import Galaxy from "./Galaxy";
|
||||
import LightPillar from "./LightPillar";
|
||||
import SplashCursor from "../cursors/SplashCursor";
|
||||
import TargetCursor from "../cursors/TargetCursor";
|
||||
|
||||
export default function BackgroundWrapper() {
|
||||
const location = useLocation();
|
||||
const isCohaise = location.pathname === "/cohaise";
|
||||
const isHome = location.pathname === "/";
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="fixed inset-0 pointer-events-none"
|
||||
style={{
|
||||
zIndex: isCohaise ? -5 : 99999,
|
||||
}}
|
||||
style={{ zIndex: 99999 }}
|
||||
>
|
||||
{isCohaise ? (
|
||||
<SplashCursor />
|
||||
) : (
|
||||
<TargetCursor
|
||||
spinDuration={4}
|
||||
hideDefaultCursor={true}
|
||||
parallaxOn={false}
|
||||
hoverDuration={1}
|
||||
/>
|
||||
)}
|
||||
<TargetCursor
|
||||
spinDuration={4}
|
||||
hideDefaultCursor={true}
|
||||
parallaxOn={false}
|
||||
hoverDuration={1}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="fixed inset-0 bg-[#0e0e11] pointer-events-none"
|
||||
style={{ zIndex: -10 }}
|
||||
>
|
||||
{isCohaise ? (
|
||||
<div className="w-full h-full relative">
|
||||
<LightPillar
|
||||
topColor="#8a1414"
|
||||
bottomColor="#060010"
|
||||
intensity={1.5}
|
||||
rotationSpeed={0.2}
|
||||
glowAmount={0.004}
|
||||
pillarWidth={8}
|
||||
pillarHeight={1}
|
||||
noiseIntensity={0.5}
|
||||
pillarRotation={20}
|
||||
interactive={false}
|
||||
mixBlendMode="screen"
|
||||
quality="high"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-full h-full relative">
|
||||
<Galaxy
|
||||
mouseRepulsion={isHome}
|
||||
mouseInteraction={isHome}
|
||||
density={1.5}
|
||||
glowIntensity={0.4}
|
||||
saturation={0}
|
||||
hueShift={360}
|
||||
twinkleIntensity={0.3}
|
||||
rotationSpeed={0.1}
|
||||
repulsionStrength={3.5}
|
||||
autoCenterRepulsion={0}
|
||||
starSpeed={0.8}
|
||||
speed={0.8}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className="w-full h-full relative">
|
||||
<Galaxy
|
||||
mouseRepulsion={isHome}
|
||||
mouseInteraction={isHome}
|
||||
density={1.5}
|
||||
glowIntensity={0.4}
|
||||
saturation={0}
|
||||
hueShift={360}
|
||||
twinkleIntensity={0.3}
|
||||
rotationSpeed={0.1}
|
||||
repulsionStrength={3.5}
|
||||
autoCenterRepulsion={0}
|
||||
starSpeed={0.8}
|
||||
speed={0.8}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
import React, { useRef, useEffect, useState, CSSProperties } from "react";
|
||||
import * as THREE from "three";
|
||||
|
||||
interface LightPillarProps {
|
||||
topColor?: string;
|
||||
bottomColor?: string;
|
||||
intensity?: number;
|
||||
rotationSpeed?: number;
|
||||
interactive?: boolean;
|
||||
className?: string;
|
||||
glowAmount?: number;
|
||||
pillarWidth?: number;
|
||||
pillarHeight?: number;
|
||||
noiseIntensity?: number;
|
||||
mixBlendMode?: CSSProperties["mixBlendMode"];
|
||||
pillarRotation?: number;
|
||||
quality?: "low" | "medium" | "high";
|
||||
}
|
||||
|
||||
const LightPillar: React.FC<LightPillarProps> = ({
|
||||
topColor = "#5227FF",
|
||||
bottomColor = "#FF9FFC",
|
||||
intensity = 1.0,
|
||||
rotationSpeed = 0.6,
|
||||
interactive = true,
|
||||
className = "",
|
||||
glowAmount = 0.005,
|
||||
pillarWidth = 3.0,
|
||||
pillarHeight = 0.4,
|
||||
noiseIntensity = 0.5,
|
||||
mixBlendMode = "screen",
|
||||
pillarRotation = 0,
|
||||
quality = "high",
|
||||
}) => {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const rendererRef = useRef<THREE.WebGLRenderer | null>(null);
|
||||
const materialRef = useRef<THREE.ShaderMaterial | null>(null);
|
||||
const sceneRef = useRef<THREE.Scene | null>(null);
|
||||
const cameraRef = useRef<THREE.OrthographicCamera | null>(null);
|
||||
const geometryRef = useRef<THREE.PlaneGeometry | null>(null);
|
||||
const mouseRef = useRef(new THREE.Vector2(0, 0));
|
||||
const timeRef = useRef(0);
|
||||
const rafRef = useRef<number | null>(null);
|
||||
const [opacity, setOpacity] = useState(0);
|
||||
|
||||
const [webGLSupported, setWebGLSupported] = useState(() => {
|
||||
try {
|
||||
const canvas = document.createElement("canvas");
|
||||
return !!(
|
||||
window.WebGLRenderingContext &&
|
||||
(canvas.getContext("webgl") || canvas.getContext("experimental-webgl"))
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!containerRef.current || !webGLSupported) return;
|
||||
|
||||
const isMobile =
|
||||
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
||||
navigator.userAgent,
|
||||
);
|
||||
const effectiveQuality =
|
||||
isMobile && quality === "high" ? "medium" : quality;
|
||||
const effectivelyInteractive = interactive && !isMobile;
|
||||
|
||||
const container = containerRef.current;
|
||||
const width = container.clientWidth;
|
||||
const height = container.clientHeight;
|
||||
|
||||
const scene = new THREE.Scene();
|
||||
sceneRef.current = scene;
|
||||
const camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||
cameraRef.current = camera;
|
||||
|
||||
type QualityConfig = {
|
||||
iterations: number;
|
||||
waveIterations: number;
|
||||
pixelRatio: number;
|
||||
precision: "mediump" | "highp";
|
||||
stepMultiplier: number;
|
||||
};
|
||||
|
||||
const qualitySettings: Record<"low" | "medium" | "high", QualityConfig> = {
|
||||
low: {
|
||||
iterations: 24,
|
||||
waveIterations: 1,
|
||||
pixelRatio: 0.5,
|
||||
precision: "mediump",
|
||||
stepMultiplier: 1.5,
|
||||
},
|
||||
medium: {
|
||||
iterations: 40,
|
||||
waveIterations: 3,
|
||||
pixelRatio: 0.65,
|
||||
precision: "highp",
|
||||
stepMultiplier: 1.2,
|
||||
},
|
||||
high: {
|
||||
iterations: 70,
|
||||
waveIterations: 4,
|
||||
pixelRatio: Math.min(window.devicePixelRatio, 1.5),
|
||||
precision: "highp",
|
||||
stepMultiplier: 1.0,
|
||||
},
|
||||
};
|
||||
|
||||
const settings =
|
||||
qualitySettings[effectiveQuality] || qualitySettings.medium;
|
||||
|
||||
let renderer: THREE.WebGLRenderer;
|
||||
try {
|
||||
renderer = new THREE.WebGLRenderer({
|
||||
antialias: false,
|
||||
alpha: true,
|
||||
powerPreference:
|
||||
effectiveQuality === "high" ? "high-performance" : "low-power",
|
||||
precision: settings.precision,
|
||||
stencil: false,
|
||||
depth: false,
|
||||
});
|
||||
} catch {
|
||||
setTimeout(() => setWebGLSupported(false), 0);
|
||||
return;
|
||||
}
|
||||
setTimeout(() => setOpacity(1), 100);
|
||||
|
||||
renderer.setSize(width, height);
|
||||
renderer.setPixelRatio(settings.pixelRatio);
|
||||
container.appendChild(renderer.domElement);
|
||||
rendererRef.current = renderer;
|
||||
|
||||
const parseColor = (hex: string) => {
|
||||
const color = new THREE.Color(hex);
|
||||
return new THREE.Vector3(color.r, color.g, color.b);
|
||||
};
|
||||
|
||||
const vertexShader = `
|
||||
varying vec2 vUv;
|
||||
void main() {
|
||||
vUv = uv;
|
||||
gl_Position = vec4(position, 1.0);
|
||||
}
|
||||
`;
|
||||
|
||||
const fragmentShader = `
|
||||
precision ${settings.precision} float;
|
||||
uniform float uTime;
|
||||
uniform vec2 uResolution;
|
||||
uniform vec2 uMouse;
|
||||
uniform vec3 uTopColor;
|
||||
uniform vec3 uBottomColor;
|
||||
uniform float uIntensity;
|
||||
uniform bool uInteractive;
|
||||
uniform float uGlowAmount;
|
||||
uniform float uPillarWidth;
|
||||
uniform float uPillarHeight;
|
||||
uniform float uNoiseIntensity;
|
||||
uniform float uRotCos;
|
||||
uniform float uRotSin;
|
||||
uniform float uPillarRotCos;
|
||||
uniform float uPillarRotSin;
|
||||
uniform float uWaveSin;
|
||||
uniform float uWaveCos;
|
||||
varying vec2 vUv;
|
||||
|
||||
const float STEP_MULT = ${settings.stepMultiplier.toFixed(1)};
|
||||
const int MAX_ITER = ${settings.iterations};
|
||||
const int WAVE_ITER = ${settings.waveIterations};
|
||||
|
||||
void main() {
|
||||
vec2 uv = vUv * 2.0 - 1.0;
|
||||
float aspect = uResolution.x / uResolution.y;
|
||||
if (aspect > 1.0) uv.x *= aspect; else uv.y /= aspect;
|
||||
|
||||
uv = vec2(uPillarRotCos * uv.x - uPillarRotSin * uv.y, uPillarRotSin * uv.x + uPillarRotCos * uv.y);
|
||||
vec3 ro = vec3(0.0, 0.0, -10.0);
|
||||
vec3 rd = normalize(vec3(uv, 1.0));
|
||||
|
||||
float rotC = uRotCos;
|
||||
float rotS = uRotSin;
|
||||
|
||||
if(uInteractive && (uMouse.x != 0.0 || uMouse.y != 0.0)) {
|
||||
float a = uMouse.x * 3.14159;
|
||||
rotC = cos(a);
|
||||
rotS = sin(a);
|
||||
}
|
||||
|
||||
vec3 col = vec3(0.0);
|
||||
float t = 0.1;
|
||||
for(int i = 0; i < MAX_ITER; i++) {
|
||||
vec3 p = ro + rd * t;
|
||||
p.xz = vec2(rotC * p.x - rotS * p.z, rotS * p.x + rotC * p.z);
|
||||
vec3 q = p;
|
||||
q.y = p.y * uPillarHeight + uTime;
|
||||
float freq = 1.0; float amp = 1.0;
|
||||
for(int j = 0; j < WAVE_ITER; j++) {
|
||||
q.xz = vec2(uWaveCos * q.x - uWaveSin * q.z, uWaveSin * q.x + uWaveCos * q.z);
|
||||
q += cos(q.zxy * freq - uTime * float(j) * 2.0) * amp;
|
||||
freq *= 2.0; amp *= 0.5;
|
||||
}
|
||||
float d = length(cos(q.xz)) - 0.2;
|
||||
float bound = length(p.xz) - uPillarWidth;
|
||||
float k = 4.0;
|
||||
float h = max(k - abs(d - bound), 0.0);
|
||||
d = max(d, bound) + h * h * 0.0625 / k;
|
||||
d = abs(d) * 0.15 + 0.01;
|
||||
float grad = clamp((15.0 - p.y) / 30.0, 0.0, 1.0);
|
||||
col += mix(uBottomColor, uTopColor, grad) / d;
|
||||
t += d * STEP_MULT;
|
||||
if(t > 50.0) break;
|
||||
}
|
||||
float widthNorm = uPillarWidth / 3.0;
|
||||
col = tanh(col * uGlowAmount / widthNorm);
|
||||
col -= fract(sin(dot(gl_FragCoord.xy, vec2(12.9898, 78.233))) * 43758.5453) / 15.0 * uNoiseIntensity;
|
||||
gl_FragColor = vec4(col * uIntensity, 1.0);
|
||||
}
|
||||
`;
|
||||
|
||||
const pillarRotRad = (pillarRotation * Math.PI) / 180;
|
||||
const material = new THREE.ShaderMaterial({
|
||||
vertexShader,
|
||||
fragmentShader,
|
||||
uniforms: {
|
||||
uTime: { value: 0 },
|
||||
uResolution: { value: new THREE.Vector2(width, height) },
|
||||
uMouse: { value: mouseRef.current },
|
||||
uTopColor: { value: parseColor(topColor) },
|
||||
uBottomColor: { value: parseColor(bottomColor) },
|
||||
uIntensity: { value: intensity },
|
||||
uInteractive: { value: effectivelyInteractive },
|
||||
uGlowAmount: { value: glowAmount },
|
||||
uPillarWidth: { value: pillarWidth },
|
||||
uPillarHeight: { value: pillarHeight },
|
||||
uNoiseIntensity: { value: noiseIntensity },
|
||||
uRotCos: { value: 1.0 },
|
||||
uRotSin: { value: 0.0 },
|
||||
uPillarRotCos: { value: Math.cos(pillarRotRad) },
|
||||
uPillarRotSin: { value: Math.sin(pillarRotRad) },
|
||||
uWaveSin: { value: Math.sin(0.4) },
|
||||
uWaveCos: { value: Math.cos(0.4) },
|
||||
},
|
||||
transparent: true,
|
||||
depthWrite: false,
|
||||
depthTest: false,
|
||||
});
|
||||
materialRef.current = material;
|
||||
|
||||
const geometry = new THREE.PlaneGeometry(2, 2);
|
||||
geometryRef.current = geometry;
|
||||
const mesh = new THREE.Mesh(geometry, material);
|
||||
scene.add(mesh);
|
||||
|
||||
const handleMouseMove = (event: MouseEvent) => {
|
||||
if (!effectivelyInteractive) return;
|
||||
const x = (event.clientX / window.innerWidth) * 2 - 1;
|
||||
const y = -(event.clientY / window.innerHeight) * 2 + 1;
|
||||
mouseRef.current.set(x, y);
|
||||
};
|
||||
|
||||
if (effectivelyInteractive) {
|
||||
window.addEventListener("mousemove", handleMouseMove, { passive: true });
|
||||
}
|
||||
|
||||
let lastTime = performance.now();
|
||||
const animate = (currentTime: number) => {
|
||||
if (
|
||||
!materialRef.current ||
|
||||
!rendererRef.current ||
|
||||
!sceneRef.current ||
|
||||
!cameraRef.current
|
||||
)
|
||||
return;
|
||||
|
||||
const deltaTime = currentTime - lastTime;
|
||||
if (deltaTime >= 16.6) {
|
||||
timeRef.current += 0.016 * rotationSpeed;
|
||||
const t = timeRef.current;
|
||||
materialRef.current.uniforms.uTime.value = t;
|
||||
if (!effectivelyInteractive) {
|
||||
materialRef.current.uniforms.uRotCos.value = Math.cos(t * 0.6);
|
||||
materialRef.current.uniforms.uRotSin.value = Math.sin(t * 0.6);
|
||||
}
|
||||
rendererRef.current.render(sceneRef.current, cameraRef.current);
|
||||
lastTime = currentTime - (deltaTime % 16.6);
|
||||
}
|
||||
rafRef.current = requestAnimationFrame(animate);
|
||||
};
|
||||
rafRef.current = requestAnimationFrame(animate);
|
||||
|
||||
const handleResize = () => {
|
||||
if (!rendererRef.current || !materialRef.current || !containerRef.current)
|
||||
return;
|
||||
const newWidth = containerRef.current.clientWidth;
|
||||
const newHeight = containerRef.current.clientHeight;
|
||||
rendererRef.current.setSize(newWidth, newHeight);
|
||||
materialRef.current.uniforms.uResolution.value.set(newWidth, newHeight);
|
||||
};
|
||||
|
||||
window.addEventListener("resize", handleResize, { passive: true });
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("resize", handleResize);
|
||||
if (effectivelyInteractive)
|
||||
window.removeEventListener("mousemove", handleMouseMove);
|
||||
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
||||
if (rendererRef.current) {
|
||||
rendererRef.current.dispose();
|
||||
if (container.contains(rendererRef.current.domElement))
|
||||
container.removeChild(rendererRef.current.domElement);
|
||||
}
|
||||
if (materialRef.current) materialRef.current.dispose();
|
||||
if (geometryRef.current) geometryRef.current.dispose();
|
||||
};
|
||||
}, [
|
||||
topColor,
|
||||
bottomColor,
|
||||
intensity,
|
||||
rotationSpeed,
|
||||
interactive,
|
||||
glowAmount,
|
||||
pillarWidth,
|
||||
pillarHeight,
|
||||
noiseIntensity,
|
||||
pillarRotation,
|
||||
webGLSupported,
|
||||
quality,
|
||||
]);
|
||||
|
||||
if (!webGLSupported)
|
||||
return (
|
||||
<div
|
||||
className={`w-full h-full absolute inset-0 flex items-center justify-center bg-black/10 text-[#888] text-[14px] ${className}`}
|
||||
style={{ mixBlendMode }}
|
||||
>
|
||||
WebGL not supported
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={containerRef}
|
||||
className={`w-full h-full absolute inset-0 transition-opacity duration-1000 ${className}`}
|
||||
style={{
|
||||
mixBlendMode,
|
||||
pointerEvents: "none",
|
||||
opacity: opacity,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default LightPillar;
|
||||
@@ -40,7 +40,7 @@ const TargetCursor: React.FC<TargetCursorProps> = ({
|
||||
return (hasTouchScreen && isSmallScreen) || isMobileUserAgent;
|
||||
}, []);
|
||||
|
||||
const constants = useMemo(() => ({ borderWidth: 3, cornerSize: 12 }), []);
|
||||
const constants = useMemo(() => ({ borderWidth: 3, cornerSize: 16 }), []);
|
||||
|
||||
const moveCursor = useCallback((x: number, y: number) => {
|
||||
if (!cursorRef.current) return;
|
||||
@@ -190,16 +190,28 @@ const TargetCursor: React.FC<TargetCursorProps> = ({
|
||||
const cursorX = gsap.getProperty(cursorRef.current, "x") as number;
|
||||
const cursorY = gsap.getProperty(cursorRef.current, "y") as number;
|
||||
|
||||
let r = rect;
|
||||
if (target.classList && target.classList.contains("infinite-menu-canvas")) {
|
||||
// Cadre agrandi : les angles restent hors du texte superposé au menu
|
||||
const size = Math.min(rect.width, rect.height) * 0.7;
|
||||
r = {
|
||||
left: rect.left + (rect.width - size) / 2,
|
||||
top: rect.top + (rect.height - size) / 2,
|
||||
right: rect.left + (rect.width - size) / 2 + size,
|
||||
bottom: rect.top + (rect.height - size) / 2 + size,
|
||||
} as DOMRect;
|
||||
}
|
||||
|
||||
targetCornerPositionsRef.current = [
|
||||
{ x: rect.left - borderWidth, y: rect.top - borderWidth },
|
||||
{ x: rect.right + borderWidth - cornerSize, y: rect.top - borderWidth },
|
||||
{ x: r.left - borderWidth, y: r.top - borderWidth },
|
||||
{ x: r.right + borderWidth - cornerSize, y: r.top - borderWidth },
|
||||
{
|
||||
x: rect.right + borderWidth - cornerSize,
|
||||
y: rect.bottom + borderWidth - cornerSize,
|
||||
x: r.right + borderWidth - cornerSize,
|
||||
y: r.bottom + borderWidth - cornerSize,
|
||||
},
|
||||
{
|
||||
x: rect.left - borderWidth,
|
||||
y: rect.bottom + borderWidth - cornerSize,
|
||||
x: r.left - borderWidth,
|
||||
y: r.bottom + borderWidth - cornerSize,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import {
|
||||
gameDevItems,
|
||||
reactWebItems,
|
||||
wordpressItems,
|
||||
desktopAppItems,
|
||||
angulartWebItems,
|
||||
staticWebsiteItems,
|
||||
webApplicationItems,
|
||||
} from "./ProjectDetails";
|
||||
|
||||
export interface MenuItem {
|
||||
@@ -14,16 +12,14 @@ export interface MenuItem {
|
||||
}
|
||||
|
||||
const allDetailItems = [
|
||||
...staticWebsiteItems,
|
||||
...webApplicationItems,
|
||||
...gameDevItems,
|
||||
...reactWebItems,
|
||||
...wordpressItems,
|
||||
...desktopAppItems,
|
||||
...angulartWebItems,
|
||||
];
|
||||
|
||||
export const projectMenuItems: MenuItem[] = [
|
||||
{
|
||||
image: "/images/projects/Projects.webp",
|
||||
image: "/images/projects/static-sites/Projects.webp",
|
||||
link: "/projects",
|
||||
title: "All my Projects",
|
||||
description: "To discover all my creations",
|
||||
@@ -38,7 +34,7 @@ export const projectMenuItems: MenuItem[] = [
|
||||
|
||||
export const mainMenuItems: MenuItem[] = [
|
||||
{
|
||||
image: "/images/projects/Projects.webp",
|
||||
image: "/images/projects/static-sites/Projects.webp",
|
||||
link: "/projects",
|
||||
title: "All my Projects",
|
||||
description: "To discover all my creations",
|
||||
@@ -50,8 +46,8 @@ export const mainMenuItems: MenuItem[] = [
|
||||
description: "Any requests? Feel free to reach out!",
|
||||
},
|
||||
{
|
||||
image: "/images/cohaise/cohaise.webp",
|
||||
link: "/cohaise",
|
||||
image: "/images/projects/web-applications/cohaise.webp",
|
||||
link: "https://cohaise.dev",
|
||||
title: "Co Hai Se",
|
||||
description: "About us",
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@ export const ProjectDownloads: Record<string, ProjectDownloadData> = {
|
||||
SPRotD: { id: "SPRotD", downloadUrl: "" },
|
||||
ZATYSHOK: {
|
||||
id: "ZATYSHOK",
|
||||
downloadUrl: "https://github.com/xEsiah/zatyshok-frontend/releases",
|
||||
downloadUrl: "https://github.com/xEsiah/Zatyshok/releases",
|
||||
},
|
||||
EotLS: { id: "EotLS", downloadUrl: "" },
|
||||
WYGTIWIF: {
|
||||
|
||||
@@ -1,81 +1,31 @@
|
||||
import React from "react";
|
||||
import HorizontalMotion from "../HorizontalMotion";
|
||||
|
||||
export const gameDevItems = [
|
||||
{
|
||||
id: "6",
|
||||
img: "/images/projects/Hinterraum-Cinematic.webp",
|
||||
link: "/projects/hinterraum",
|
||||
title: "Hinterraum",
|
||||
description:
|
||||
"Die & retry game where you have to escape backrooms. Project realized in 3 days for ESTIAM's 2026 GameJam.",
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
img: "/images/projects/OvUp-Menu.webp",
|
||||
link: "/projects/overclock-uprising",
|
||||
title: "Overclock//Uprising",
|
||||
description:
|
||||
"Die & retry 3D platformer game in a cyberpunk aesthetic made with Unity.",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
img: "/images/projects/SPRotD.webp",
|
||||
link: "/projects/shadow-purge-rite-of-the-demon",
|
||||
title: "Shadow Purge : Rite of the Demon",
|
||||
description: "Hack n'slash RPG made with Unity & Aseprite.",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
img: "/images/projects/EotLS.webp",
|
||||
link: "/projects/echoes-of-the-last-stop",
|
||||
title: "Echoes of the Last Stop",
|
||||
description:
|
||||
"Story-driven thriller game in collaboration with my partner made with Unity & Aseprite.",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
img: "/images/projects/NTR-Menu.webp",
|
||||
link: "/projects/neo-tokyo-rush",
|
||||
title: "Neo Tokyo Rush",
|
||||
description:
|
||||
"Cyberpunk-inspired beat 'em All game made with Unity & Aseprite.",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
img: "/images/projects/LesVoixDeLExil.webp",
|
||||
link: "/projects/les-voix-de-l-exil",
|
||||
title: "Les Voix de L'Exil",
|
||||
description:
|
||||
"An interactive visual novel where your choices shape the journey.",
|
||||
},
|
||||
];
|
||||
|
||||
export const reactWebItems = [
|
||||
{
|
||||
id: "101",
|
||||
img: "/images/cohaise/cohaise.webp",
|
||||
link: "/cohaise",
|
||||
title: "Co Hai Se",
|
||||
description: "Landing single page for my (fictionnal) compagny.",
|
||||
},
|
||||
{
|
||||
id: "102",
|
||||
img: "/images/projects/Esiah-s-Universe.webp",
|
||||
link: "/",
|
||||
title: "Esiah's Universe",
|
||||
description: "A journey through code, design, and imagination.",
|
||||
},
|
||||
export const staticWebsiteItems = [
|
||||
{
|
||||
id: "103",
|
||||
img: "/images/projects/Coeur-UA-PAM.webp",
|
||||
img: "/images/projects/static-sites/Coeur-UA-PAM.webp",
|
||||
link: "https://coeur-ua-pam.org/",
|
||||
title: "Coeur UA PAM",
|
||||
description: "Web site for Coeur UA PAM association.",
|
||||
},
|
||||
{
|
||||
id: "102",
|
||||
img: "/images/projects/static-sites/Esiah-s-Universe.webp",
|
||||
link: "/",
|
||||
title: "Esiah's Universe",
|
||||
description: "A journey through code, design, and imagination.",
|
||||
},
|
||||
{
|
||||
id: "201",
|
||||
img: "/images/projects/static-sites/Metz-Campus.webp",
|
||||
link: "https://metzcampus.fr/",
|
||||
title: "Metz Campus",
|
||||
description:
|
||||
"Website made during my 1st year internship for Metz Campus organisation.",
|
||||
},
|
||||
{
|
||||
id: "104",
|
||||
img: "/images/projects/WaterDroneIoTHackathon.webp",
|
||||
img: "/images/projects/static-sites/WaterDroneIoTHackathon.webp",
|
||||
link: "https://waterdrone.esiah.dev/",
|
||||
title: "WaterDrone",
|
||||
description:
|
||||
@@ -83,65 +33,118 @@ export const reactWebItems = [
|
||||
},
|
||||
];
|
||||
|
||||
export const wordpressItems = [
|
||||
export const webApplicationItems = [
|
||||
{
|
||||
id: "201",
|
||||
img: "/images/projects/Metz-Campus.webp",
|
||||
link: "https://metzcampus.fr/",
|
||||
title: "Metz Campus",
|
||||
id: "101",
|
||||
img: "/images/projects/web-applications/cohaise.webp",
|
||||
link: "https://cohaise.dev",
|
||||
title: "Co Hai Se",
|
||||
description:
|
||||
"Website made during my 1st year internship for Metz Campus organisation.",
|
||||
"Discover the Co Hai Se organization and with us craft the web of your ambitions.",
|
||||
},
|
||||
];
|
||||
|
||||
export const desktopAppItems = [
|
||||
{
|
||||
id: "301",
|
||||
img: "/images/projects/Zatyshok.webp",
|
||||
img: "/images/projects/web-applications/Zatyshok.webp",
|
||||
link: "/projects/zatyshok",
|
||||
title: "Затишок",
|
||||
description:
|
||||
"Moodboard/Planner highly customisable application with Spotify & meteo integrations !",
|
||||
},
|
||||
];
|
||||
|
||||
export const angulartWebItems = [
|
||||
{
|
||||
id: "501",
|
||||
img: "/images/projects/web-applications/Gitea-Self-Hosted.webp",
|
||||
link: "https://git.cohaise.dev/explore/repos",
|
||||
title: "Gitea Self-Hosted",
|
||||
description:
|
||||
"Self-hosted Git instance (Forgejo/Gitea) with runners for CI/CD.",
|
||||
},
|
||||
{
|
||||
id: "401",
|
||||
img: "/images/projects/WYG-TIWIF.webp",
|
||||
img: "/images/projects/web-applications/WYG-TIWIF.webp",
|
||||
link: "/projects/wyg-tiwif",
|
||||
title: "WYG-TIWIF",
|
||||
description:
|
||||
"Your social travel hub. A Full Stack (MEAN) application to build your travel wishlist and follow other users' journeys.",
|
||||
},
|
||||
{
|
||||
id: "601",
|
||||
img: "/images/projects/web-applications/j23/J23-Defi6e.webp",
|
||||
images: [
|
||||
"/images/projects/web-applications/j23/J23-Defi6e.webp",
|
||||
"/images/projects/web-applications/j23/J23-CRM.webp",
|
||||
"/images/projects/web-applications/j23/J23-Inventory.webp",
|
||||
],
|
||||
link: "/projects/ensemble-scolaire-jean-xxiii",
|
||||
title: "Ensemble Scolaire Jean XXIII",
|
||||
description:
|
||||
"Three applications developed during my internship: Défi 6e, CRM and Inventory IT.",
|
||||
},
|
||||
];
|
||||
|
||||
export const gameDevItems = [
|
||||
{
|
||||
id: "6",
|
||||
img: "/images/projects/game-dev/hinterraum/Hinterraum-Cinematic.webp",
|
||||
link: "/projects/hinterraum",
|
||||
title: "Hinterraum",
|
||||
description:
|
||||
"Die & retry game where you have to escape backrooms. Project realized in 3 days for ESTIAM's 2026 GameJam.",
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
img: "/images/projects/game-dev/ovup/OvUp-Menu.webp",
|
||||
link: "/projects/overclock-uprising",
|
||||
title: "Overclock//Uprising",
|
||||
description:
|
||||
"Die & retry 3D platformer game in a cyberpunk aesthetic made with Unity.",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
img: "/images/projects/game-dev/sprot/SPRotD.webp",
|
||||
link: "/projects/shadow-purge-rite-of-the-demon",
|
||||
title: "Shadow Purge : Rite of the Demon",
|
||||
description: "Hack n'slash RPG made with Unity & Aseprite.",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
img: "/images/projects/game-dev/eotls/EotLS.webp",
|
||||
link: "/projects/echoes-of-the-last-stop",
|
||||
title: "Echoes of the Last Stop",
|
||||
description:
|
||||
"Story-driven thriller game in collaboration with my partner made with Unity & Aseprite.",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
img: "/images/projects/game-dev/ntr/NTR-Menu.webp",
|
||||
link: "/projects/neo-tokyo-rush",
|
||||
title: "Neo Tokyo Rush",
|
||||
description:
|
||||
"Cyberpunk-inspired beat 'em All game made with Unity & Aseprite.",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
img: "/images/projects/game-dev/lvel/LesVoixDeLExil.webp",
|
||||
link: "/projects/les-voix-de-l-exil",
|
||||
title: "Les Voix de L'Exil",
|
||||
description:
|
||||
"An interactive visual novel where your choices shape the journey.",
|
||||
},
|
||||
];
|
||||
|
||||
export const StaticWebsiteGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={staticWebsiteItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const WebApplicationGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={webApplicationItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const GameDevGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={gameDevItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const ReactWebGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={reactWebItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const WordpressGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={wordpressItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const DesktopAppGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={desktopAppItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const AngulartWebGallery = () => (
|
||||
<div className="w-full mt-8">
|
||||
<HorizontalMotion items={angulartWebItems} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
const ServiceTag = ({ children }: { children: React.ReactNode }) => (
|
||||
<li className="px-6 py-2.5 border border-white/15 rounded-full text-[0.9rem] uppercase tracking-wider text-white bg-transparent transition-all duration-300 hover:bg-white hover:text-black hover:border-white cursor-default">
|
||||
{children}
|
||||
</li>
|
||||
);
|
||||
|
||||
export const WebService = () => (
|
||||
<div className="flex flex-col gap-6">
|
||||
<h3 className="text-2xl font-normal text-white uppercase tracking-[2px] opacity-80 mb-6">
|
||||
Modern & Fast Websites
|
||||
</h3>
|
||||
<p className="text-white/50 text-xl leading-relaxed max-w-200">
|
||||
Building clean, responsive websites using Next.js and React. I focus on
|
||||
speed, visibility, and converting visitors into clients.
|
||||
</p>
|
||||
<ul className="flex flex-wrap gap-4 mt-12 p-0 list-none">
|
||||
<ServiceTag>Showcase Websites (Landing Pages)</ServiceTag>
|
||||
<ServiceTag>SEO & Performance Optimization</ServiceTag>
|
||||
<ServiceTag>CMS Integration (Content Management)</ServiceTag>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const MobileService = () => (
|
||||
<div className="flex flex-col gap-6">
|
||||
<h3 className="text-2xl font-normal text-white uppercase tracking-[2px] opacity-80 mb-6">
|
||||
iOS & Android Apps
|
||||
</h3>
|
||||
<p className="text-white/50 text-xl leading-relaxed max-w-200">
|
||||
Turning your ideas into real mobile apps. Using React Native to create
|
||||
smooth experiences that work perfectly on all phones.
|
||||
</p>
|
||||
<ul className="flex flex-wrap gap-4 mt-12 p-0 list-none">
|
||||
<ServiceTag>Cross-Platform Apps</ServiceTag>
|
||||
<ServiceTag>App Store Submission Help</ServiceTag>
|
||||
<ServiceTag>User-Friendly Interfaces</ServiceTag>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const DesignService = () => (
|
||||
<div className="flex flex-col gap-6">
|
||||
<h3 className="text-2xl font-normal text-white uppercase tracking-[2px] opacity-80 mb-6">
|
||||
UI/UX Design
|
||||
</h3>
|
||||
<p className="text-white/50 text-xl leading-relaxed max-w-200">
|
||||
Simple and effective designs. I create interfaces that look good and help
|
||||
users find what they need effortlessly.
|
||||
</p>
|
||||
<ul className="flex flex-wrap gap-4 mt-12 p-0 list-none">
|
||||
<ServiceTag>Wireframing & Prototyping</ServiceTag>
|
||||
<ServiceTag>Mobile-First Design</ServiceTag>
|
||||
<ServiceTag>Visual Identity Basics</ServiceTag>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const SoftwareService = () => (
|
||||
<div className="flex flex-col gap-6">
|
||||
<h3 className="text-2xl font-normal text-white uppercase tracking-[2px] opacity-80 mb-6">
|
||||
Custom Solutions
|
||||
</h3>
|
||||
<p className="text-white/50 text-xl leading-relaxed max-w-200">
|
||||
Need something specific? I build custom tools and dashboards to help
|
||||
automate your daily tasks and save you time.
|
||||
</p>
|
||||
<ul className="flex flex-wrap gap-4 mt-12 p-0 list-none">
|
||||
<ServiceTag>Custom Web Tools</ServiceTag>
|
||||
<ServiceTag>Desktop Web App</ServiceTag>
|
||||
<ServiceTag>Dashboard Creation</ServiceTag>
|
||||
<ServiceTag>API Connections</ServiceTag>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
@@ -0,0 +1,77 @@
|
||||
import { ReactNode } from "react";
|
||||
import AnimatedContent from "../AnimatedContent";
|
||||
import SEO from "../SEO";
|
||||
|
||||
interface PageShellProps {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
description?: string;
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
headerDelay?: number;
|
||||
childrenDelay?: number;
|
||||
childrenScale?: number;
|
||||
animateChildren?: boolean;
|
||||
}
|
||||
|
||||
const PageShell = ({
|
||||
title,
|
||||
subtitle,
|
||||
description,
|
||||
children,
|
||||
className = "",
|
||||
headerDelay = 0.1,
|
||||
childrenDelay = 0.2,
|
||||
childrenScale = 1,
|
||||
animateChildren = true,
|
||||
}: PageShellProps) => {
|
||||
return (
|
||||
<div className={`layout-page w-full ${className}`}>
|
||||
<SEO title={title} description={description} />
|
||||
|
||||
<div
|
||||
className="page-snap-section w-full flex flex-col items-center"
|
||||
data-no-region
|
||||
>
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={headerDelay}
|
||||
>
|
||||
<section className="main-section">
|
||||
<h1 className="title">{title}</h1>
|
||||
{subtitle && <p className="subtitle">{subtitle}</p>}
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
|
||||
{animateChildren ? (
|
||||
<div className="page-snap-section w-full">
|
||||
<AnimatedContent
|
||||
distance={80}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={1.2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={childrenScale}
|
||||
delay={childrenDelay}
|
||||
>
|
||||
{children}
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-full">{children}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PageShell;
|
||||
@@ -0,0 +1,156 @@
|
||||
import { ReactNode } from "react";
|
||||
import AnimatedContent from "../AnimatedContent";
|
||||
import SEO from "../SEO";
|
||||
import DownloadButton from "../DownloadButton";
|
||||
|
||||
export interface ProjectMedia {
|
||||
src: string;
|
||||
alt: string;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
interface ProjectPageProps {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
description: string;
|
||||
media?: ProjectMedia[];
|
||||
downloadId?: string;
|
||||
children?: ReactNode;
|
||||
headerDelay?: number;
|
||||
}
|
||||
|
||||
const ProjectPage = ({
|
||||
title,
|
||||
subtitle,
|
||||
description,
|
||||
media = [],
|
||||
downloadId,
|
||||
children,
|
||||
headerDelay = 0.1,
|
||||
}: ProjectPageProps) => {
|
||||
return (
|
||||
<div className="layout-page w-full">
|
||||
<SEO title={title} description={description} />
|
||||
|
||||
<div
|
||||
className="page-snap-section w-full flex flex-col items-center"
|
||||
data-no-region
|
||||
>
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={headerDelay}
|
||||
>
|
||||
<section className="main-section">
|
||||
<h1 className="title">{title}</h1>
|
||||
<p className="subtitle">{subtitle}</p>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
|
||||
{children && (
|
||||
<div className="page-snap-section w-full">
|
||||
<AnimatedContent
|
||||
distance={80}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={1.2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.2}
|
||||
>
|
||||
{children}
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{media.length > 0 && (
|
||||
<div className="page-snap-section w-full">
|
||||
<AnimatedContent
|
||||
distance={80}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={1.2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.25}
|
||||
>
|
||||
<div
|
||||
data-region-children
|
||||
className={`flex flex-col md:flex-row w-[90%] mx-auto gap-6 md:gap-10 justify-center ${
|
||||
media.length > 1 ? "" : "items-center"
|
||||
}`}
|
||||
>
|
||||
{media.map((item, index) => {
|
||||
const image = (
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src={item.src}
|
||||
alt={item.alt}
|
||||
/>
|
||||
);
|
||||
|
||||
if (item.href) {
|
||||
return (
|
||||
<a
|
||||
key={index}
|
||||
href={item.href}
|
||||
target={item.href.startsWith("http") ? "_blank" : undefined}
|
||||
rel={
|
||||
item.href.startsWith("http")
|
||||
? "noopener noreferrer"
|
||||
: undefined
|
||||
}
|
||||
className="flex justify-center w-full md:w-1/2 mx-auto cursor-target"
|
||||
>
|
||||
{image}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className="flex justify-center w-full md:w-1/2 mx-auto"
|
||||
>
|
||||
{image}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{downloadId && (
|
||||
<div className="page-snap-section w-full" data-region>
|
||||
<AnimatedContent
|
||||
distance={60}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={1.2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.3}
|
||||
>
|
||||
<DownloadButton projectId={downloadId} />
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProjectPage;
|
||||
@@ -0,0 +1,553 @@
|
||||
import { useEffect } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
|
||||
/* Scroll par région : la page ne s'arrête JAMAIS entre deux régions.
|
||||
Chaque geste (molette, swipe, flèche, Espace) déplace la page vers la
|
||||
région suivante ou précédente, avec une animation pilotée par le temps.
|
||||
Les régions plus hautes que le viewport sont découpées en écrans afin que
|
||||
leur contenu reste lisible. */
|
||||
const IDLE_DELAY_MS = 180;
|
||||
const WHEEL_RATIO = 0.5;
|
||||
const WHEEL_MIN = 50;
|
||||
const WHEEL_MAX = 300;
|
||||
const TOUCH_SLOP = 12;
|
||||
const MIN_DURATION = 420;
|
||||
const MAX_DURATION = 900;
|
||||
const WARMUP_MS = 600;
|
||||
|
||||
const getSnapOffset = () => {
|
||||
const navOffset =
|
||||
parseFloat(
|
||||
getComputedStyle(document.documentElement).getPropertyValue(
|
||||
"--nav-offset",
|
||||
),
|
||||
) || 0;
|
||||
|
||||
return navOffset + 32;
|
||||
};
|
||||
|
||||
export default function useRegionScroll() {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
const root = document.documentElement;
|
||||
|
||||
let idleTimer: number | undefined;
|
||||
let animFrame = 0;
|
||||
let lastY = window.scrollY;
|
||||
let direction: 1 | -1 | 0 = 0;
|
||||
let disposed = false;
|
||||
let appliedTail = 0;
|
||||
let tailFrame = 0;
|
||||
let animFrom = 0;
|
||||
let animTo = 0;
|
||||
let animStart = 0;
|
||||
let animDuration = 0;
|
||||
let animExpected = 0;
|
||||
let anchor = 0;
|
||||
let wheelAcc = 0;
|
||||
let wheelDir: 1 | -1 = 1;
|
||||
let touchStartY = 0;
|
||||
let touchLastY = 0;
|
||||
let touchStartX = 0;
|
||||
let touchLastX = 0;
|
||||
let touchDir: 1 | -1 | 0 = 0;
|
||||
let spots: number[] = [];
|
||||
let spotsDirty = true;
|
||||
|
||||
const isEnabled = () => !root.classList.contains("no-snap");
|
||||
|
||||
/* Position d'un élément dans le document, hors transformations CSS :
|
||||
les animations d'entrée (translation/échelle) déplacent sinon les
|
||||
régions pendant leur lecture. */
|
||||
const getDocumentTop = (element: HTMLElement): number => {
|
||||
let top = 0;
|
||||
let node: HTMLElement | null = element;
|
||||
|
||||
while (node) {
|
||||
top += node.offsetTop;
|
||||
node = node.offsetParent as HTMLElement | null;
|
||||
}
|
||||
|
||||
return top;
|
||||
};
|
||||
|
||||
/* Résolution des régions, du plus fin au plus large :
|
||||
1. [data-region] : l'élément est une région
|
||||
2. [data-region-children] : chaque enfant direct du conteneur est une région
|
||||
3. .page-snap-section : repli, une section sans marqueur reste une région
|
||||
[data-no-region] exclut un élément (et sa descendance) des régions :
|
||||
c'est le cas des titres de page, qui ne sont pas des points d'arrêt. */
|
||||
const collectRegions = (): number[] => {
|
||||
const offset = getSnapOffset();
|
||||
const targets = new Set<number>([0]);
|
||||
|
||||
const add = (element: Element) => {
|
||||
const rect = element.getBoundingClientRect();
|
||||
|
||||
if (rect.width === 0 && rect.height === 0) return;
|
||||
|
||||
const y = Math.round(getDocumentTop(element as HTMLElement) - offset);
|
||||
|
||||
if (y > 0) {
|
||||
targets.add(y);
|
||||
}
|
||||
};
|
||||
|
||||
document.querySelectorAll("[data-region]").forEach((element) => {
|
||||
if (element.closest("[data-no-region]")) return;
|
||||
|
||||
add(element);
|
||||
});
|
||||
|
||||
document.querySelectorAll("[data-region-children]").forEach((group) => {
|
||||
if (group.closest("[data-no-region]")) return;
|
||||
|
||||
Array.from(group.children).forEach((child) => add(child));
|
||||
});
|
||||
|
||||
document.querySelectorAll<HTMLElement>(".page-snap-section").forEach(
|
||||
(section) => {
|
||||
if (section.closest("[data-no-region]")) return;
|
||||
if (
|
||||
section.querySelector("[data-region], [data-region-children]")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
add(section);
|
||||
},
|
||||
);
|
||||
|
||||
return [...targets].sort((a, b) => a - b);
|
||||
};
|
||||
|
||||
/* Positions d'atterrissement : une par région, plus des écrans
|
||||
supplémentaires pour les régions plus hautes que le viewport. */
|
||||
const computeSpots = (): number[] => {
|
||||
const viewport = window.innerHeight;
|
||||
const max = Math.max(0, root.scrollHeight - viewport);
|
||||
const regions = collectRegions();
|
||||
const result = new Set<number>([0]);
|
||||
|
||||
regions.forEach((top, index) => {
|
||||
result.add(top);
|
||||
|
||||
const next =
|
||||
index + 1 < regions.length ? regions[index + 1] : max + viewport;
|
||||
const height = next - top;
|
||||
|
||||
if (height > viewport * 1.1) {
|
||||
const screens = Math.ceil(height / (viewport * 0.92));
|
||||
|
||||
for (let screen = 1; screen < screens; screen += 1) {
|
||||
result.add(Math.round(top + (height * screen) / screens));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return [...result]
|
||||
.map((spot) => Math.min(Math.max(0, spot), max))
|
||||
.sort((a, b) => a - b);
|
||||
};
|
||||
|
||||
const getSpots = (): number[] => {
|
||||
if (spotsDirty) {
|
||||
spots = computeSpots();
|
||||
spotsDirty = false;
|
||||
}
|
||||
|
||||
return spots;
|
||||
};
|
||||
|
||||
const invalidateSpots = () => {
|
||||
spotsDirty = true;
|
||||
};
|
||||
|
||||
/* Index de la position d'atterrissement la plus proche du scroll courant. */
|
||||
const nearestIndex = (list: number[], y: number): number => {
|
||||
let best = 0;
|
||||
let bestDistance = Number.POSITIVE_INFINITY;
|
||||
|
||||
list.forEach((spot, index) => {
|
||||
const distance = Math.abs(spot - y);
|
||||
|
||||
if (distance < bestDistance) {
|
||||
bestDistance = distance;
|
||||
best = index;
|
||||
}
|
||||
});
|
||||
|
||||
return best;
|
||||
};
|
||||
|
||||
/* Réserve de scroll : sans elle, les dernières régions sont hors de
|
||||
portée (la page est trop courte pour les aligner en haut du viewport)
|
||||
et se retrouvent écrêtées sur la même position. */
|
||||
const updateTail = () => {
|
||||
if (disposed) return;
|
||||
|
||||
const regions = collectRegions();
|
||||
const last = regions.length > 0 ? regions[regions.length - 1] : 0;
|
||||
const contentHeight = root.scrollHeight - appliedTail;
|
||||
const need = Math.max(
|
||||
0,
|
||||
Math.round(last + window.innerHeight - contentHeight),
|
||||
);
|
||||
|
||||
if (need !== appliedTail) {
|
||||
appliedTail = need;
|
||||
root.style.setProperty("--region-tail", `${need}px`);
|
||||
}
|
||||
|
||||
invalidateSpots();
|
||||
};
|
||||
|
||||
const scheduleTail = () => {
|
||||
window.cancelAnimationFrame(tailFrame);
|
||||
tailFrame = window.requestAnimationFrame(updateTail);
|
||||
};
|
||||
|
||||
const killAnimation = () => {
|
||||
if (animFrame) {
|
||||
window.cancelAnimationFrame(animFrame);
|
||||
animFrame = 0;
|
||||
}
|
||||
|
||||
root.style.scrollBehavior = "";
|
||||
};
|
||||
|
||||
/* Déplacement animé vers une position d'atterrissement : boucle rAF
|
||||
pilotée par le temps, l'animation reste correcte même quand le rendu
|
||||
est lent et elle n'est pas interrompue par les refresh de ScrollTrigger
|
||||
(qui restaurent la position de scroll). */
|
||||
const animateTo = (target: number) => {
|
||||
const from = window.scrollY;
|
||||
|
||||
killAnimation();
|
||||
|
||||
if (Math.abs(target - from) < 2) {
|
||||
lastY = target;
|
||||
return;
|
||||
}
|
||||
|
||||
root.style.scrollBehavior = "auto";
|
||||
|
||||
const reduceMotion = window.matchMedia(
|
||||
"(prefers-reduced-motion: reduce)",
|
||||
).matches;
|
||||
const distance = Math.abs(target - from);
|
||||
|
||||
animDuration = reduceMotion
|
||||
? 0
|
||||
: Math.min(
|
||||
MAX_DURATION,
|
||||
Math.max(MIN_DURATION, (distance / 1600) * 620),
|
||||
);
|
||||
animFrom = from;
|
||||
animTo = target;
|
||||
animStart = performance.now();
|
||||
|
||||
const tick = () => {
|
||||
if (disposed) return;
|
||||
|
||||
const elapsed = performance.now() - animStart;
|
||||
const progress =
|
||||
animDuration === 0 ? 1 : Math.min(1, elapsed / animDuration);
|
||||
const eased = 1 - Math.pow(1 - progress, 3);
|
||||
|
||||
window.scrollTo(0, Math.round(animFrom + (animTo - animFrom) * eased));
|
||||
|
||||
/* Position réellement appliquée (le navigateur peut écrêter la
|
||||
valeur) : sert à distinguer notre scroll d'un scroll externe. */
|
||||
animExpected = window.scrollY;
|
||||
|
||||
if (progress < 1) {
|
||||
animFrame = window.requestAnimationFrame(tick);
|
||||
} else {
|
||||
animFrame = 0;
|
||||
root.style.scrollBehavior = "";
|
||||
lastY = animTo;
|
||||
}
|
||||
};
|
||||
|
||||
animFrame = window.requestAnimationFrame(tick);
|
||||
};
|
||||
|
||||
/* Une région = une position d'atterrissement : le geste avance d'une
|
||||
région à la fois, dans le sens du geste. */
|
||||
const step = (dir: 1 | -1) => {
|
||||
if (disposed || !isEnabled()) return;
|
||||
|
||||
const list = getSpots();
|
||||
|
||||
if (list.length === 0) return;
|
||||
|
||||
const base = animFrame
|
||||
? anchor
|
||||
: nearestIndex(list, window.scrollY);
|
||||
const next = Math.min(list.length - 1, Math.max(0, base + dir));
|
||||
|
||||
if (next === base) return;
|
||||
|
||||
anchor = next;
|
||||
animateTo(list[next]);
|
||||
};
|
||||
|
||||
const goToIndex = (index: number) => {
|
||||
const list = getSpots();
|
||||
|
||||
if (list.length === 0) return;
|
||||
|
||||
const clamped = Math.min(list.length - 1, Math.max(0, index));
|
||||
|
||||
anchor = clamped;
|
||||
animateTo(list[clamped]);
|
||||
};
|
||||
|
||||
/* Distance de molette nécessaire pour franchir la prochaine région :
|
||||
proportionnelle à la région traversée, pour que le défilement reste
|
||||
naturel quelle que soit la taille des blocs. */
|
||||
const wheelNeeded = (dir: 1 | -1): number => {
|
||||
const list = getSpots();
|
||||
|
||||
if (list.length === 0) return WHEEL_MAX;
|
||||
|
||||
const base = animFrame ? anchor : nearestIndex(list, window.scrollY);
|
||||
const next = Math.min(list.length - 1, Math.max(0, base + dir));
|
||||
|
||||
if (next === base) return WHEEL_MAX;
|
||||
|
||||
const distance = Math.abs(list[next] - window.scrollY);
|
||||
|
||||
return Math.min(WHEEL_MAX, Math.max(WHEEL_MIN, distance * WHEEL_RATIO));
|
||||
};
|
||||
|
||||
const isHorizontalScroller = (target: EventTarget | null) => {
|
||||
const element = target as HTMLElement | null;
|
||||
|
||||
if (!element || !element.closest) return false;
|
||||
|
||||
const scroller = element.closest(
|
||||
"[data-scroll-x], .overflow-x-auto, .overflow-x-scroll",
|
||||
) as HTMLElement | null;
|
||||
|
||||
if (!scroller) return false;
|
||||
|
||||
return scroller.scrollWidth > scroller.clientWidth + 1;
|
||||
};
|
||||
|
||||
const isTypingTarget = (target: EventTarget | null) => {
|
||||
const element = target as HTMLElement | null;
|
||||
|
||||
if (!element) return false;
|
||||
|
||||
const tag = element.tagName;
|
||||
|
||||
return (
|
||||
tag === "INPUT" ||
|
||||
tag === "TEXTAREA" ||
|
||||
tag === "SELECT" ||
|
||||
element.isContentEditable
|
||||
);
|
||||
};
|
||||
|
||||
const handleWheel = (event: WheelEvent) => {
|
||||
if (!isEnabled()) return;
|
||||
if (event.ctrlKey) return;
|
||||
if (isHorizontalScroller(event.target)) return;
|
||||
|
||||
const delta = event.deltaY;
|
||||
|
||||
if (delta === 0) return;
|
||||
|
||||
/* Le scroll natif est neutralisé : la page ne bouge que par région. */
|
||||
if (event.cancelable) event.preventDefault();
|
||||
|
||||
const dir: 1 | -1 = delta > 0 ? 1 : -1;
|
||||
|
||||
if (dir !== wheelDir) {
|
||||
wheelDir = dir;
|
||||
wheelAcc = 0;
|
||||
}
|
||||
|
||||
wheelAcc += Math.abs(delta);
|
||||
|
||||
if (wheelAcc >= wheelNeeded(dir)) {
|
||||
wheelAcc = 0;
|
||||
step(dir);
|
||||
}
|
||||
};
|
||||
|
||||
const handleTouchStart = (event: TouchEvent) => {
|
||||
touchStartY = event.touches[0]?.clientY ?? 0;
|
||||
touchLastY = touchStartY;
|
||||
touchStartX = event.touches[0]?.clientX ?? 0;
|
||||
touchLastX = touchStartX;
|
||||
touchDir = 0;
|
||||
wheelAcc = 0;
|
||||
};
|
||||
|
||||
const handleTouchMove = (event: TouchEvent) => {
|
||||
if (!isEnabled()) return;
|
||||
|
||||
const touch = event.touches[0];
|
||||
|
||||
if (!touch) return;
|
||||
|
||||
/* Déplacement incrémental : un swipe compte pour un seul geste. */
|
||||
const delta = touchLastY - touch.clientY;
|
||||
const deltaX = touchLastX - touch.clientX;
|
||||
|
||||
touchLastY = touch.clientY;
|
||||
touchLastX = touch.clientX;
|
||||
|
||||
/* Un geste horizontal reste au navigateur, un geste vertical est
|
||||
entièrement piloté par les régions (dès le premier pixel, sinon le
|
||||
scroll natif démarre et garde son élan). */
|
||||
if (Math.abs(delta) < 2) return;
|
||||
if (Math.abs(deltaX) > Math.abs(delta)) return;
|
||||
|
||||
if (event.cancelable) event.preventDefault();
|
||||
|
||||
if (Math.abs(delta) < TOUCH_SLOP) return;
|
||||
|
||||
const dir: 1 | -1 = delta > 0 ? 1 : -1;
|
||||
|
||||
if (dir !== touchDir) {
|
||||
touchDir = dir;
|
||||
wheelAcc = 0;
|
||||
}
|
||||
|
||||
wheelAcc += Math.abs(delta);
|
||||
|
||||
if (wheelAcc >= wheelNeeded(dir)) {
|
||||
wheelAcc = 0;
|
||||
step(dir);
|
||||
}
|
||||
};
|
||||
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if (!isEnabled()) return;
|
||||
if (event.metaKey || event.ctrlKey || event.altKey) return;
|
||||
if (isTypingTarget(event.target)) return;
|
||||
|
||||
switch (event.key) {
|
||||
case "ArrowDown":
|
||||
case "PageDown":
|
||||
event.preventDefault();
|
||||
step(1);
|
||||
break;
|
||||
case "ArrowUp":
|
||||
case "PageUp":
|
||||
event.preventDefault();
|
||||
step(-1);
|
||||
break;
|
||||
case "Home": {
|
||||
const list = getSpots();
|
||||
|
||||
event.preventDefault();
|
||||
goToIndex(0);
|
||||
break;
|
||||
}
|
||||
case "End": {
|
||||
const list = getSpots();
|
||||
|
||||
event.preventDefault();
|
||||
goToIndex(list.length - 1);
|
||||
break;
|
||||
}
|
||||
case " ": {
|
||||
const tag = (event.target as HTMLElement | null)?.tagName;
|
||||
|
||||
if (tag === "BUTTON" || tag === "A") return;
|
||||
|
||||
event.preventDefault();
|
||||
step(1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
/* Scroll externe (barre de défilement, restauration du navigateur) :
|
||||
on réaligne sur la position d'atterrissement la plus proche. */
|
||||
const alignToSpot = () => {
|
||||
if (disposed || !isEnabled()) return;
|
||||
|
||||
const list = getSpots();
|
||||
|
||||
if (list.length === 0) return;
|
||||
|
||||
const index = nearestIndex(list, window.scrollY);
|
||||
const target = list[index];
|
||||
|
||||
anchor = index;
|
||||
|
||||
if (Math.abs(target - window.scrollY) < 2) return;
|
||||
|
||||
animateTo(target);
|
||||
};
|
||||
|
||||
const handleScroll = () => {
|
||||
const y = window.scrollY;
|
||||
|
||||
if (animFrame) {
|
||||
/* Un scroll externe (glisser la barre, refresh de ScrollTrigger...)
|
||||
interrompt l'animation. On compare à la dernière position
|
||||
réellement appliquée : l'interpolation temporelle, elle, est trop
|
||||
permissive quand le rendu est lent (un seul frame peut couvrir la
|
||||
moitié du trajet). */
|
||||
if (Math.abs(y - animExpected) <= 8) {
|
||||
return;
|
||||
}
|
||||
|
||||
killAnimation();
|
||||
}
|
||||
|
||||
if (y !== lastY) {
|
||||
direction = y > lastY ? 1 : -1;
|
||||
lastY = y;
|
||||
}
|
||||
|
||||
window.clearTimeout(idleTimer);
|
||||
idleTimer = window.setTimeout(alignToSpot, IDLE_DELAY_MS);
|
||||
};
|
||||
|
||||
const warmupTimer = window.setTimeout(() => {
|
||||
lastY = window.scrollY;
|
||||
direction = 0;
|
||||
}, WARMUP_MS);
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
window.addEventListener("wheel", handleWheel, { passive: false });
|
||||
window.addEventListener("touchstart", handleTouchStart, { passive: true });
|
||||
window.addEventListener("touchmove", handleTouchMove, { passive: false });
|
||||
window.addEventListener("keydown", handleKeyDown);
|
||||
window.addEventListener("resize", scheduleTail);
|
||||
|
||||
const observer = new ResizeObserver(scheduleTail);
|
||||
observer.observe(document.body);
|
||||
|
||||
updateTail();
|
||||
const settleTimer = window.setTimeout(updateTail, 400);
|
||||
|
||||
return () => {
|
||||
disposed = true;
|
||||
window.clearTimeout(idleTimer);
|
||||
window.clearTimeout(warmupTimer);
|
||||
window.clearTimeout(settleTimer);
|
||||
window.cancelAnimationFrame(tailFrame);
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
window.removeEventListener("wheel", handleWheel);
|
||||
window.removeEventListener("touchstart", handleTouchStart);
|
||||
window.removeEventListener("touchmove", handleTouchMove);
|
||||
window.removeEventListener("keydown", handleKeyDown);
|
||||
window.removeEventListener("resize", scheduleTail);
|
||||
observer.disconnect();
|
||||
killAnimation();
|
||||
root.style.removeProperty("--region-tail");
|
||||
};
|
||||
}, [pathname]);
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
@import "tailwindcss";
|
||||
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap");
|
||||
@import "tw-animate-css";
|
||||
@import "shadcn/tailwind.css";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
@@ -15,6 +14,9 @@
|
||||
--clr-accent-600: #8a1414;
|
||||
--clr-accent-300: #d32f2f;
|
||||
--clr-surface: #1a1a1a;
|
||||
--nav-offset: 100px;
|
||||
--page-gap: clamp(4rem, 8vw, 8rem);
|
||||
--content-max: 1400px;
|
||||
|
||||
--white: hsl(0, 0%, 100%);
|
||||
--purple-primary: rgba(183, 28, 28, 1);
|
||||
@@ -53,6 +55,16 @@
|
||||
RESET & BASE
|
||||
========================================================================== */
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
scroll-padding-top: calc(var(--nav-offset) + 2rem);
|
||||
}
|
||||
|
||||
/* Pages immersives (plein écran) : pas de scroll smooth */
|
||||
html.no-snap {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--clr-bg);
|
||||
color: var(--clr-text);
|
||||
@@ -127,14 +139,32 @@ textarea {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 30vh 0px;
|
||||
min-height: 120vh;
|
||||
width: 100%;
|
||||
padding-top: calc(var(--nav-offset) + 1rem);
|
||||
/* --region-tail : réserve plafonnée (15vh) calculée par useRegionScroll,
|
||||
pour aligner la dernière région sans laisser une grande zone vide. */
|
||||
padding-bottom: calc(12vh + var(--region-tail, 0px));
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Les sections de page sont les conteneurs des régions : elles épousent
|
||||
leur contenu, sans hauteur minimale, pour ne pas laisser de zones vides
|
||||
entre deux régions (le scroll par région ne doit jamais traverser du vide). */
|
||||
.page-snap-section {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main-section {
|
||||
text-align: center;
|
||||
margin-bottom: 4rem;
|
||||
width: 100%;
|
||||
max-width: var(--content-max);
|
||||
margin: 0 auto;
|
||||
padding: 8vh 1rem;
|
||||
min-height: 60vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.main-section .title {
|
||||
@@ -145,15 +175,11 @@ textarea {
|
||||
text-shadow: 0 0 20px rgba(183, 28, 28, 0.4);
|
||||
}
|
||||
|
||||
.main-section .cohaise-title {
|
||||
font-size: clamp(2.5rem, 6vw, 5rem);
|
||||
color: var(--clr-text);
|
||||
}
|
||||
|
||||
.main-section .subtitle {
|
||||
font-size: clamp(0.9rem, 2vw, 1.2rem);
|
||||
color: #a6a6a9;
|
||||
letter-spacing: 2px;
|
||||
max-width: 70ch;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
import LightPillar from "../components/backgrounds/LightPillar";
|
||||
import SplashCursor from "../components/cursors/SplashCursor";
|
||||
import LogoLoop from "../components/LogoLoop";
|
||||
import FlowingMenu from "../components/FlowingMenu";
|
||||
import AnimatedContent from "../components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
|
||||
import {
|
||||
WebService,
|
||||
MobileService,
|
||||
DesignService,
|
||||
SoftwareService,
|
||||
} from "../components/data/ServiceDetails";
|
||||
|
||||
import {
|
||||
SiReact,
|
||||
SiAngular,
|
||||
SiElectron,
|
||||
SiNodedotjs,
|
||||
SiTailwindcss,
|
||||
SiDotnet,
|
||||
SiExpress,
|
||||
SiMariadb,
|
||||
SiFigma,
|
||||
SiVercel,
|
||||
SiGithub,
|
||||
SiPostgresql,
|
||||
SiDocker,
|
||||
} from "react-icons/si";
|
||||
|
||||
const techLogos = [
|
||||
{ node: <SiReact />, title: "React", href: "https://react.dev" },
|
||||
{ node: <SiAngular />, title: "Angular", href: "https://angular.io" },
|
||||
{
|
||||
node: <SiTailwindcss />,
|
||||
title: "Tailwind CSS",
|
||||
href: "https://tailwindcss.com/",
|
||||
},
|
||||
{ node: <SiFigma />, title: "Figma", href: "https://figma.com" },
|
||||
{ node: <SiElectron />, title: "Electron", href: "https://electronjs.org/" },
|
||||
{
|
||||
node: <SiDotnet />,
|
||||
title: "C/ / .NET",
|
||||
href: "https://dotnet.microsoft.com/fr-fr/",
|
||||
},
|
||||
{ node: <SiNodedotjs />, title: "Node.js", href: "https://nodejs.org/en" },
|
||||
{ node: <SiExpress />, title: "Express", href: "https://expressjs.com/" },
|
||||
{ node: <SiMariadb />, title: "MariaDB", href: "https://mariadb.com/" },
|
||||
{ node: <SiDocker />, title: "Docker", href: "https://www.docker.com/" },
|
||||
{
|
||||
node: <SiPostgresql />,
|
||||
title: "PostgreSQL",
|
||||
href: "https://www.postgresql.org/",
|
||||
},
|
||||
{ node: <SiVercel />, title: "Vercel", href: "https://vercel.com" },
|
||||
{ node: <SiGithub />, title: "GitHub", href: "https://github.com/" },
|
||||
];
|
||||
|
||||
const serviceItems = [
|
||||
{
|
||||
text: "Web Development",
|
||||
image: "images/cohaise/webDevelopment.webp",
|
||||
Component: WebService,
|
||||
},
|
||||
{
|
||||
text: "Mobile Apps",
|
||||
image: "images/cohaise/mobileApps.webp",
|
||||
Component: MobileService,
|
||||
},
|
||||
{
|
||||
text: "UI/UX Design",
|
||||
image: "images/cohaise/uxUI.webp",
|
||||
Component: DesignService,
|
||||
},
|
||||
{
|
||||
text: "Custom Software",
|
||||
image: "images/cohaise/customSoftware.webp",
|
||||
Component: SoftwareService,
|
||||
},
|
||||
];
|
||||
|
||||
const Cohaise = () => {
|
||||
return (
|
||||
<div className="layout-page" style={{ overflowX: "hidden" }}>
|
||||
<SEO
|
||||
title="Co Hai Se"
|
||||
description="Co Hai Se - Crafting the Web of Your Ambitions. Professional web development, mobile apps, and UI/UX design services."
|
||||
/>
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.5}
|
||||
>
|
||||
<section className="main-section">
|
||||
<h1 className="cohaise-title">Co Hai Se</h1>
|
||||
<p className="subtitle">
|
||||
Your project starts with an idea. It comes to life with Cohaise.
|
||||
</p>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
<FlowingMenu
|
||||
items={serviceItems}
|
||||
speed={50}
|
||||
textColor="#ffffff"
|
||||
borderColor="rgba(255,255,255,0.15)"
|
||||
/>
|
||||
<LogoLoop
|
||||
logos={techLogos}
|
||||
speed={80}
|
||||
direction="left"
|
||||
logoHeight={60}
|
||||
gap={100}
|
||||
hoverSpeed={15}
|
||||
fadeOut={false}
|
||||
scaleOnHover
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Cohaise;
|
||||
@@ -1,5 +1,4 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import PageShell from "../components/layout/PageShell";
|
||||
import ScrollVelocity from "../components/ScrollVelocity";
|
||||
import InfiniteCarousel from "../components/InfiniteCarousel";
|
||||
|
||||
@@ -38,54 +37,31 @@ export default function Contact() {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="layout-page">
|
||||
<SEO
|
||||
title="Contact"
|
||||
description="Looking for a creative developer? Contact me via LinkedIn, GitHub, or email."
|
||||
/>
|
||||
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.2}
|
||||
<PageShell
|
||||
title="Contact"
|
||||
subtitle="You can reach me there:"
|
||||
description="Looking for a creative developer? Contact me via LinkedIn, GitHub, or email."
|
||||
headerDelay={0.2}
|
||||
childrenDelay={0.1}
|
||||
>
|
||||
<div
|
||||
data-region-children
|
||||
className="flex flex-col gap-8 md:gap-16 w-full max-w-[100vw] overflow-x-clip"
|
||||
>
|
||||
<section className="main-section">
|
||||
<h1 className="title">Contact</h1>
|
||||
<p className="subtitle">You can reach me there:</p>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
<ScrollVelocity
|
||||
texts={["Get in touch • Let's collaborate •"]}
|
||||
velocity={50}
|
||||
className="text-4xl md:text-7xl font-bold uppercase text-white/20 whitespace-nowrap"
|
||||
/>
|
||||
|
||||
<AnimatedContent
|
||||
distance={100}
|
||||
direction="vertical"
|
||||
duration={1.5}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<div className="flex flex-col gap-8 md:gap-16 w-full max-w-[100vw] overflow-x-hidden">
|
||||
<ScrollVelocity
|
||||
texts={["Get in touch • Let's collaborate •"]}
|
||||
velocity={50}
|
||||
className="text-4xl md:text-7xl font-bold uppercase text-white/20 whitespace-nowrap"
|
||||
/>
|
||||
<InfiniteCarousel items={contacts} />
|
||||
|
||||
<InfiniteCarousel items={contacts} />
|
||||
|
||||
<ScrollVelocity
|
||||
texts={["Email Me • Follow Me • Visit My Github •"]}
|
||||
velocity={50}
|
||||
className="text-4xl md:text-7xl font-bold uppercase text-white/20 whitespace-nowrap"
|
||||
/>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
<ScrollVelocity
|
||||
texts={["Email Me • Follow Me • Visit My Github •"]}
|
||||
velocity={50}
|
||||
className="text-4xl md:text-7xl font-bold uppercase text-white/20 whitespace-nowrap"
|
||||
/>
|
||||
</div>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,60 +1,30 @@
|
||||
import MagicBento from "../components/MagicBento";
|
||||
import AnimatedContent from "../components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import PageShell from "../components/layout/PageShell";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="layout-page">
|
||||
<SEO
|
||||
title="Home"
|
||||
description="Welcome to Esiah's Universe. Explore my projects in Game Design, Web Development, and UI/UX."
|
||||
/>
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.5}
|
||||
>
|
||||
<section className="main-section">
|
||||
<h1 className="title">Esiah’s Universe</h1>
|
||||
<p className="subtitle">
|
||||
A journey through code, design, and imagination.
|
||||
</p>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
|
||||
<AnimatedContent
|
||||
distance={80}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={1}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={0.95}
|
||||
delay={0.3}
|
||||
>
|
||||
<section className="bento-container">
|
||||
<h2>Overview</h2>
|
||||
<MagicBento
|
||||
enableStars={true}
|
||||
enableSpotlight={true}
|
||||
enableBorderGlow={true}
|
||||
enableTilt={true}
|
||||
enableMagnetism={true}
|
||||
clickEffect={true}
|
||||
spotlightRadius={150}
|
||||
particleCount={200}
|
||||
glowColor="183, 28, 28"
|
||||
disableAnimations={false}
|
||||
/>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
</div>
|
||||
<PageShell
|
||||
title="Esiah’s Universe"
|
||||
subtitle="A journey through code, design, and imagination."
|
||||
description="Welcome to Esiah's Universe. Explore my projects in Game Design, Web Development, and UI/UX."
|
||||
headerDelay={0.5}
|
||||
childrenDelay={0.3}
|
||||
childrenScale={0.95}
|
||||
>
|
||||
<section className="bento-container">
|
||||
<MagicBento
|
||||
enableStars={true}
|
||||
enableSpotlight={true}
|
||||
enableBorderGlow={true}
|
||||
enableTilt={true}
|
||||
enableMagnetism={true}
|
||||
clickEffect={true}
|
||||
spotlightRadius={150}
|
||||
particleCount={200}
|
||||
glowColor="183, 28, 28"
|
||||
disableAnimations={false}
|
||||
/>
|
||||
</section>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,101 +1,58 @@
|
||||
import AnimatedContent from "../components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import PageShell from "../components/layout/PageShell";
|
||||
import ScrollVelocity from "../components/ScrollVelocity";
|
||||
import {
|
||||
GameDevGallery,
|
||||
ReactWebGallery,
|
||||
WordpressGallery,
|
||||
DesktopAppGallery,
|
||||
AngulartWebGallery,
|
||||
StaticWebsiteGallery,
|
||||
WebApplicationGallery,
|
||||
} from "../components/data/ProjectDetails";
|
||||
|
||||
const ProjectCategories = [
|
||||
{
|
||||
text: "Game Development",
|
||||
text: "Static Website",
|
||||
Component: StaticWebsiteGallery,
|
||||
},
|
||||
{
|
||||
text: "Web Application",
|
||||
Component: WebApplicationGallery,
|
||||
},
|
||||
{
|
||||
text: "Game Dev",
|
||||
Component: GameDevGallery,
|
||||
},
|
||||
{
|
||||
text: "React Websites",
|
||||
Component: ReactWebGallery,
|
||||
},
|
||||
{
|
||||
text: "WordPress & Elementor",
|
||||
Component: WordpressGallery,
|
||||
},
|
||||
{
|
||||
text: "Desktop Apps",
|
||||
Component: DesktopAppGallery,
|
||||
},
|
||||
{
|
||||
text: "Angular Apps",
|
||||
Component: AngulartWebGallery,
|
||||
},
|
||||
];
|
||||
|
||||
export default function Projects() {
|
||||
return (
|
||||
<div className="layout-page w-full overflow-x-hidden">
|
||||
<SEO
|
||||
title="My Projects"
|
||||
description="Discover my project gallery: Unity video games, React/Angular websites, and desktop applications."
|
||||
/>
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<section className="main-section">
|
||||
<h1 className="title">Projects</h1>
|
||||
<p className="subtitle">Here you can find all my creations</p>
|
||||
</section>
|
||||
</AnimatedContent>
|
||||
|
||||
<div className="flex flex-col gap-32 pb-32 w-full max-w-[100vw] overflow-x-hidden">
|
||||
<PageShell
|
||||
title="Projects"
|
||||
subtitle="Discover my project gallery: static websites, web applications and video games"
|
||||
description="Discover my project gallery: static websites, web applications, and video games."
|
||||
headerDelay={0.1}
|
||||
childrenDelay={0}
|
||||
animateChildren={false}
|
||||
>
|
||||
{/* overflow-x-clip : coupe visuellement sans créer de conteneur de défilement
|
||||
(overflow:hidden le ferait et casserait le scroll-snap natif) */}
|
||||
<div className="flex flex-col gap-24 md:gap-32 pb-24 w-full max-w-[100vw] overflow-x-clip">
|
||||
{ProjectCategories.map((category, index) => (
|
||||
<div key={index} className="w-full max-w-full overflow-hidden">
|
||||
<AnimatedContent
|
||||
distance={100}
|
||||
direction="horizontal"
|
||||
reverse={index % 2 !== 0}
|
||||
duration={1.5}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
delay={0}
|
||||
className="w-full max-w-full overflow-hidden"
|
||||
>
|
||||
<div className="mb-8 pointer-events-none w-full">
|
||||
<ScrollVelocity
|
||||
texts={[category.text]}
|
||||
velocity={index % 2 === 0 ? 110 : -110}
|
||||
className="custom-scroll-text text-4xl md:text-8xl font-bold uppercase tracking-tighter text-white/90 whitespace-nowrap"
|
||||
/>
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<div
|
||||
key={index}
|
||||
className="page-snap-section w-full max-w-full overflow-x-clip"
|
||||
>
|
||||
<div className="mb-8 pointer-events-none w-full" data-region>
|
||||
<ScrollVelocity
|
||||
texts={[category.text]}
|
||||
velocity={index % 2 === 0 ? 110 : -110}
|
||||
className="custom-scroll-text text-4xl md:text-8xl font-bold uppercase tracking-tighter text-white/90 whitespace-nowrap"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<AnimatedContent
|
||||
distance={0}
|
||||
direction="none"
|
||||
duration={1.5}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
delay={0}
|
||||
className="w-full"
|
||||
>
|
||||
<div className="w-full px-2 md:px-6">
|
||||
<category.Component />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<div className="w-full px-2 md:px-6">
|
||||
<category.Component />
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,43 +1,18 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function EchoesOfTheLastStop() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="Echoes of the Last Stop"
|
||||
description="Story-driven thriller game in collaboration with my partner made with Unity & Aseprite"
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">Echoes of the Last Stop</h1>
|
||||
<p className="subtitle">
|
||||
Story-driven thriller game in collaboration with my partner made
|
||||
with Unity & Aseprite
|
||||
</p>
|
||||
<div className="flex w-[90%] mx-auto gap-10 justify-center">
|
||||
<div className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/EotLS.webp"
|
||||
alt="Preview of Echoes of the Last Stop game made with Unity & Aseprite"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<DownloadButton projectId="EotLS" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="Echoes of the Last Stop"
|
||||
subtitle="Story-driven thriller game in collaboration with my partner made with Unity & Aseprite"
|
||||
description="Story-driven thriller game in collaboration with my partner made with Unity & Aseprite"
|
||||
downloadId="EotLS"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/game-dev/eotls/EotLS.webp",
|
||||
alt: "Preview of Echoes of the Last Stop game made with Unity & Aseprite",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
const applications = [
|
||||
{
|
||||
title: "Défi 6e - Class Life",
|
||||
description: "Web application built to manage day-to-day class life",
|
||||
image: "/images/projects/web-applications/j23/J23-Defi6e.webp",
|
||||
link: "https://defi6e.jean23.com/",
|
||||
linkLabel: "Open the application",
|
||||
},
|
||||
{
|
||||
title: "Jean XXIII CRM",
|
||||
description: "CRM to manage applications and enrollments",
|
||||
image: "/images/projects/web-applications/j23/J23-CRM.webp",
|
||||
link: "https://github.com/Ensemble-Scolaire-Jean-XXIII/jeanxxiii-crm",
|
||||
linkLabel: "View on GitHub",
|
||||
},
|
||||
{
|
||||
title: "Inventory IT",
|
||||
description: "IT asset and inventory management",
|
||||
image: "/images/projects/web-applications/j23/J23-Inventory.webp",
|
||||
link: "https://github.com/Ensemble-Scolaire-Jean-XXIII/Inventory-IT",
|
||||
linkLabel: "View on GitHub",
|
||||
},
|
||||
];
|
||||
|
||||
export default function EnsembleScolaireJeanXXIII() {
|
||||
return (
|
||||
<ProjectPage
|
||||
title="Ensemble Scolaire Jean XXIII"
|
||||
subtitle="Three applications developed during my internship: Défi 6e - Class Life, CRM Jean XXIII, Inventory IT"
|
||||
description="Three applications developed during my internship at Ensemble Scolaire Jean XXIII: Défi 6e, CRM and Inventory IT."
|
||||
headerDelay={0.5}
|
||||
>
|
||||
<div className="flex flex-col gap-12 px-4 md:px-12 pb-8 max-w-6xl mx-auto">
|
||||
{applications.map((app, index) => (
|
||||
<div
|
||||
key={app.title}
|
||||
data-region
|
||||
className="rounded-2xl overflow-hidden border border-white/10 bg-black/40"
|
||||
>
|
||||
<img
|
||||
src={app.image}
|
||||
alt={app.title}
|
||||
className="w-full h-auto object-cover"
|
||||
/>
|
||||
<div className="flex flex-col md:flex-row md:items-center md:justify-between gap-4 p-6">
|
||||
<div>
|
||||
<h2 className="text-2xl md:text-3xl font-bold">{app.title}</h2>
|
||||
<p className="text-white/70 mt-2">{app.description}</p>
|
||||
</div>
|
||||
<a
|
||||
href={app.link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="cursor-target inline-flex items-center gap-3 px-8 py-4 bg-[#b71c1c] text-white font-bold rounded-full hover:bg-[#d32f2f] hover:scale-105 transition-all shadow-lg"
|
||||
>
|
||||
{app.linkLabel}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</ProjectPage>
|
||||
);
|
||||
}
|
||||
@@ -1,50 +1,22 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function Hinterraum() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="Hinterraum"
|
||||
description="Die & retry game where you have to escape backrooms. Project realized in 3 days for ESTIAM's 2026 GameJam."
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">Hinterraum</h1>
|
||||
<p className="subtitle">
|
||||
Die & retry 3D game where you have to escape backrooms. Project
|
||||
realized in 3 days for ESTIAM's 2026 GameJam.
|
||||
</p>
|
||||
<div className="flex w-[90%] mx-auto gap-10 justify-center">
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/Hinterraum-Menu.webp"
|
||||
alt="Menu principal du jeu Neo Tokyo Rush, un beat 'em all cyberpunk développé avec Unity"
|
||||
/>
|
||||
</a>
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/Hinterraum-Lvl.webp"
|
||||
alt="Screenshot Hinterraum"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<DownloadButton projectId="HINTERRRAUM" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="Hinterraum"
|
||||
subtitle="Die & retry 3D game where you have to escape backrooms. Project realized in 3 days for ESTIAM's 2026 GameJam."
|
||||
description="Die & retry game where you have to escape backrooms. Project realized in 3 days for ESTIAM's 2026 GameJam."
|
||||
downloadId="HINTERRRAUM"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/game-dev/hinterraum/Hinterraum-Menu.webp",
|
||||
alt: "Main menu of Hinterraum, a backrooms escape game developed with Unity",
|
||||
},
|
||||
{
|
||||
src: "/images/projects/game-dev/hinterraum/Hinterraum-Lvl.webp",
|
||||
alt: "Screenshot Hinterraum",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export default function LesVoixDeLExil() {
|
||||
<>
|
||||
<SEO
|
||||
title="Les Voix de L'Exil"
|
||||
description="Plongez dans l'univers de Zaun et Piltover. Une aventure interactive où vos choix détermineront votre destin."
|
||||
description="Dive into the world of Zaun and Piltover. An interactive adventure where your choices shape your fate."
|
||||
favicon="/images/icon.ico"
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,47 +1,22 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function NeoTokyoRush() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="Neo Tokyo Rush"
|
||||
description="A cyberpunk beat 'em up game developed with Unity. Dive into a retro-futuristic neon aesthetic."
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">Neo Tokyo Rush</h1>
|
||||
<p className="subtitle">Cyberpunk-inspired beat 'em All game</p>
|
||||
<div className="flex w-[90%] mx-auto gap-10 justify-center">
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/NTR-Menu.webp"
|
||||
alt="Main menu of Neo Tokyo Rush, a beat 'em all cyberpunk 2D platformer developped with Unity"
|
||||
/>
|
||||
</a>
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/NTR-Lvl.webp"
|
||||
alt="Preview of Neo Tokyo Rush gameplay to showcase neon aesthetic & fighting mecanisms"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<DownloadButton projectId="NTR" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="Neo Tokyo Rush"
|
||||
subtitle="Cyberpunk-inspired beat 'em All game"
|
||||
description="A cyberpunk beat 'em up game developed with Unity. Dive into a retro-futuristic neon aesthetic."
|
||||
downloadId="NTR"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/game-dev/ntr/NTR-Menu.webp",
|
||||
alt: "Main menu of Neo Tokyo Rush, a beat 'em all cyberpunk 2D platformer developped with Unity",
|
||||
},
|
||||
{
|
||||
src: "/images/projects/game-dev/ntr/NTR-Lvl.webp",
|
||||
alt: "Preview of Neo Tokyo Rush gameplay to showcase neon aesthetic & fighting mecanisms",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,54 +1,22 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function OverclockUprising() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="Hinterraum"
|
||||
description="Die & retry 3D platformer game in a cyberpunk aesthetic made with Unity."
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">Overclock // Uprising</h1>
|
||||
<p className="subtitle">
|
||||
Embody Eixo & navigate through the Net in order to reach the
|
||||
Blackwall and destroy it.
|
||||
</p>
|
||||
<span className="subtitle">
|
||||
Die & retry 3D platformer game in a cyberpunk aesthetic made with
|
||||
Unity.
|
||||
</span>
|
||||
<div className="flex w-[90%] mx-auto gap-10 justify-center">
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/OvUp-Menu.webp"
|
||||
alt="Main menu of Overclock //Uprising, a cyberpunk 3D platformer developped with Unity (& love)"
|
||||
/>
|
||||
</a>
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/OvUp-Lvl.webp"
|
||||
alt="Overclock//Uprising preview of init level"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<DownloadButton projectId="OvUp" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="Overclock // Uprising"
|
||||
subtitle="Embody Eixo & navigate through the Net in order to reach the Blackwall and destroy it."
|
||||
description="Die & retry 3D platformer game in a cyberpunk aesthetic made with Unity."
|
||||
downloadId="OvUp"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/game-dev/ovup/OvUp-Menu.webp",
|
||||
alt: "Main menu of Overclock //Uprising, a cyberpunk 3D platformer developped with Unity (& love)",
|
||||
},
|
||||
{
|
||||
src: "/images/projects/game-dev/ovup/OvUp-Lvl.webp",
|
||||
alt: "Overclock//Uprising preview of init level",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,40 +1,18 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import SEO from "@/components/SEO";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function ShadowPurgeRiteOfTheDemon() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="Shadow Purge: Rite of the Demon"
|
||||
description="A hack n'slash RPG game developed with Unity and Aseprite."
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">Shadow Purge : Rite of the Demon</h1>
|
||||
<p className="subtitle">Hack n'slash RPG</p>
|
||||
<div className="flex w-[90%] mx-auto gap-10 justify-center">
|
||||
<a className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target">
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/SPRotD.webp"
|
||||
alt="Preview of Shadow Purge : Rite of the Demon game made with Unity & Aseprite"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<DownloadButton projectId="SPRotD" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="Shadow Purge : Rite of the Demon"
|
||||
subtitle="Hack n'slash RPG"
|
||||
description="A hack n'slash RPG game developed with Unity and Aseprite."
|
||||
downloadId="SPRotD"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/game-dev/sprot/SPRotD.webp",
|
||||
alt: "Preview of Shadow Purge : Rite of the Demon game made with Unity & Aseprite",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,48 +1,19 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function WYGTIWIF() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="WYG TIWIF"
|
||||
description="A social travel hub application built with the MEAN stack to manage your travel wishlist and follow others."
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">WYG TIWIF</h1>
|
||||
<p className="subtitle">
|
||||
Your social travel hub. A Full Stack (MEAN) application to build
|
||||
your travel wishlist and follow other users' journeys.
|
||||
</p>
|
||||
<div className="flex w-[90%] mx-auto gap-10 justify-center">
|
||||
<a
|
||||
href="https://github.com/xEsiah/WYG-TIWIF"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target"
|
||||
>
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/WYG-TIWIF.webp"
|
||||
alt="Preview of WYG-TIWIF app made with Angular"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<DownloadButton projectId="WYGTIWIF" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="WYG TIWIF"
|
||||
subtitle="Your social travel hub. A Full Stack (MEAN) application to build your travel wishlist and follow other users' journeys."
|
||||
description="A social travel hub application built with the MEAN stack to manage your travel wishlist and follow others."
|
||||
downloadId="WYGTIWIF"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/web-applications/WYG-TIWIF.webp",
|
||||
alt: "Preview of WYG-TIWIF app made with Angular",
|
||||
href: "https://github.com/xEsiah/WYG-TIWIF",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,49 +1,19 @@
|
||||
import AnimatedContent from "@/components/AnimatedContent";
|
||||
import SEO from "@/components/SEO";
|
||||
import DownloadButton from "@/components/DownloadButton";
|
||||
import ProjectPage from "@/components/layout/ProjectPage";
|
||||
|
||||
export default function Zatyshok() {
|
||||
return (
|
||||
<AnimatedContent
|
||||
distance={50}
|
||||
direction="vertical"
|
||||
reverse={false}
|
||||
duration={2}
|
||||
ease="power3.out"
|
||||
initialOpacity={0}
|
||||
animateOpacity
|
||||
scale={1}
|
||||
delay={0.1}
|
||||
>
|
||||
<SEO
|
||||
title="Zatyshok"
|
||||
description=" A desktop moodboard/planner application with Spotify and weather
|
||||
integrations, built with Electron, deployed and hosted on my private
|
||||
local server using Docker."
|
||||
/>
|
||||
<div className="layout-page">
|
||||
<section className="main-section">
|
||||
<h1 className="title">Затишок</h1>
|
||||
<p className="subtitle">
|
||||
A desktop moodboard/planner application with Spotify and weather
|
||||
integrations, built with Electron, deployed and hosted on my private
|
||||
local server using Docker.
|
||||
</p>
|
||||
<a
|
||||
href="https://github.com/xEsiah/zatyshok-frontend"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="mt-40 flex justify-center w-[90%] md:w-2/3 mx-auto cursor-target"
|
||||
>
|
||||
<img
|
||||
className="w-full rounded-[20px] hover:opacity-80 transition-opacity"
|
||||
src="/images/projects/Zatyshok.webp"
|
||||
alt="Preview of Zatyshok desktop app made with Electron"
|
||||
/>
|
||||
</a>
|
||||
</section>
|
||||
<DownloadButton projectId="ZATYSHOK" />
|
||||
</div>
|
||||
</AnimatedContent>
|
||||
<ProjectPage
|
||||
title="Затишок"
|
||||
subtitle="A desktop moodboard/planner application with Spotify and weather integrations, built with Electron, deployed and hosted on my private local server using Docker."
|
||||
description="A desktop moodboard/planner application with Spotify and weather integrations, built with Electron, deployed and hosted on my private local server using Docker."
|
||||
downloadId="ZATYSHOK"
|
||||
media={[
|
||||
{
|
||||
src: "/images/projects/web-applications/Zatyshok.webp",
|
||||
alt: "Preview of Zatyshok desktop app made with Electron",
|
||||
href: "https://github.com/xEsiah/Zatyshok",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
|
||||
"ignoreDeprecations": "6.0",
|
||||
"ignoreDeprecations": "5.0",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
|
||||