reowrked the static/standalone version and migrated to cloudflare pages

This commit is contained in:
Quinta committed 2026-09-28 21:31:48 +02:00
1 parent 49c79b31a9
commit 9442868a8b
7 files changed
+131 -39

No files matched your search

+10 -25
View File
@@ -1,8 +1,10 @@
name: Deploy Vite site to Pages
name: Redirect GitHub Pages to Cloudflare
# The site lives on Cloudflare now; GitHub Pages only forwards old links.
on:
push:
branches: ["main"]
paths: ["gh-pages/**", ".github/workflows/deploy.yml"]
workflow_dispatch:
permissions:
@@ -15,34 +17,17 @@ concurrency:
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/checkout@v4
- run: cp gh-pages/index.html gh-pages/404.html
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: ./gh-pages
- id: deployment
uses: actions/deploy-pages@v4
+17
View File
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pietro Quintavalle — moved</title>
<meta name="robots" content="noindex" />
<link rel="canonical" href="__NEW_URL__/" />
<!-- Old GitHub Pages link: keep path + #section when forwarding to the new domain. Also served as 404.html. -->
<script>location.replace('__NEW_URL__' + location.pathname.replace(/^\/whoami/, '') + location.search + location.hash)</script>
<meta http-equiv="refresh" content="0; url=__NEW_URL__/" />
<style>body{background:#eef0f3;color:#141821;font:17px/1.55 system-ui,sans-serif;display:grid;place-items:center;min-height:100vh;margin:0}a{color:#c86a00}</style>
</head>
<body>
<p>This portfolio has moved to <a href="__NEW_URL__/">__NEW_URL__</a>.</p>
</body>
</html>
+74
View File
@@ -0,0 +1,74 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>404 — Pietro Quintavalle</title>
<meta name="robots" content="noindex" />
<meta name="theme-color" content="#eef0f3" />
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%23141821'/%3E%3Ctext x='32' y='43' text-anchor='middle' font-family='Arial Black,Arial' font-weight='900' font-size='30' fill='%23eef0f3'%3EPQ%3C/text%3E%3C/svg%3E" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap" rel="stylesheet" />
<style>
:root{
--bg:#eef0f3; --fg:#141821; --muted:#5b6472; --amber:#c86a00; --line:rgba(20,24,33,.14);
--display:'Syne',"Helvetica Neue",Arial,sans-serif;
--body:'IBM Plex Sans',"Segoe UI",system-ui,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--fg);font-family:var(--body);font-size:17px;line-height:1.55;overflow-x:hidden;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
::selection{background:var(--amber);color:#fff}
:focus-visible{outline:2px solid var(--amber);outline-offset:4px}
.grain{position:fixed;inset:-100%;z-index:1;pointer-events:none;opacity:.05;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
animation:grain 1.2s steps(6) infinite}
@keyframes grain{0%{transform:translate(0,0)}20%{transform:translate(-3%,2%)}40%{transform:translate(2%,-4%)}60%{transform:translate(-4%,-1%)}80%{transform:translate(3%,3%)}100%{transform:translate(0,0)}}
nav{position:fixed;top:0;left:0;right:0;z-index:20;padding:22px clamp(20px,4vw,56px);font-size:14px;font-weight:500}
nav a{font-family:var(--display);font-weight:800;letter-spacing:-.02em;font-size:17px}
main{position:relative;z-index:2;min-height:100vh;padding:20vh clamp(20px,6vw,120px) 12vh;display:flex;flex-direction:column;justify-content:center}
.wrap{max-width:1180px;width:100%;margin:0 auto}
.intro{font-size:15px;color:var(--muted);margin-bottom:2.2em;max-width:44ch}
h1{font-family:var(--display);font-size:clamp(96px,22vw,320px);font-weight:800;line-height:.86;letter-spacing:-.05em;overflow:hidden;padding-bottom:.06em}
h1 span{display:inline-block;transform-origin:0 100%;animation:rise 1.1s cubic-bezier(.16,1,.3,1) both}
h1 span:nth-child(2){animation-delay:.08s;color:var(--amber)}
h1 span:nth-child(3){animation-delay:.16s}
@keyframes rise{from{transform:translateY(115%) rotate(6deg);opacity:0}}
.lead{font-family:var(--display);font-weight:700;font-size:clamp(24px,3vw,40px);letter-spacing:-.02em;line-height:1.1;margin-top:5vh;max-width:22ch}
.dim{color:var(--muted);max-width:52ch;margin-top:18px}
.links{display:flex;flex-wrap:wrap;gap:14px;margin-top:48px}
.links a{padding:14px 22px;border:1px solid var(--line);border-radius:999px;font-size:15px;font-weight:500;transition:border-color .3s,background .3s}
.links a:hover,.links a:focus-visible{border-color:var(--fg);background:rgba(20,24,33,.05)}
.links a:first-child{border-color:var(--fg)}
.status{position:fixed;left:clamp(20px,4vw,56px);bottom:26px;z-index:20;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:12px}
.status i{width:6px;height:6px;border-radius:50%;background:var(--amber);box-shadow:0 0 10px rgba(200,106,0,.6);animation:blink 2.4s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){ .grain,.status i,h1 span{animation:none} }
</style>
</head>
<body>
<div class="grain" aria-hidden="true"></div>
<nav><a href="/" aria-label="Home">PQ</a></nav>
<main>
<div class="wrap">
<p class="intro">Error 404. Nothing is mounted at this path.</p>
<h1 aria-label="404"><span aria-hidden="true">4</span><span aria-hidden="true">0</span><span aria-hidden="true">4</span></h1>
<p class="lead">Empty slot in the rack.</p>
<p class="dim">The page you asked for doesn't exist, or it moved when the site did. Everything that matters is one click away.</p>
<div class="links">
<a href="/">Back to the portfolio</a>
<a href="/#contact">Get in touch</a>
</div>
</div>
</main>
<div class="status" aria-hidden="true"><i></i>No link on this port</div>
</body>
</html>
+1 -1
View File
@@ -2,7 +2,7 @@
export const EMAIL = '0pietroquintavalle0@gmail.com'
export const GITHUB = 'https://github.com/Quinta0'
export const LINKEDIN = 'https://linkedin.com/in/pietro-quintavalle'
export const WHOAMI = 'https://quinta0.github.io/whoami'
export const WHOAMI = '__NEW_URL__'
export const GITLAB = 'https://gitlab.com/Quinta0'
export const CODEBERG = 'https://codeberg.org/Quinta'
+21 -12
View File
@@ -184,6 +184,8 @@ footer{padding:40px clamp(20px,6vw,120px);font-size:13px;color:var(--muted);disp
</head>
<body>
<noscript><style>body{cursor:auto}.rv{opacity:1!important}</style></noscript>
<canvas id="scene" aria-hidden="true"></canvas>
<div class="grain" aria-hidden="true"></div>
<div class="vignette" aria-hidden="true"></div>
@@ -369,7 +371,7 @@ footer{padding:40px clamp(20px,6vw,120px);font-size:13px;color:var(--muted);disp
<a data-mag href="tel:+41799068253">+41 79 906 82 53</a>
<a data-mag href="https://github.com/Quinta0" target="_blank" rel="noopener">GitHub</a>
<a data-mag href="https://linkedin.com/in/pietro-quintavalle" target="_blank" rel="noopener">LinkedIn</a>
<a data-mag href="https://quinta0.github.io/whoami" target="_blank" rel="noopener">whoami</a>
<a data-mag href="__NEW_URL__" target="_blank" rel="noopener">whoami</a>
</div>
</div>
</section>
@@ -387,16 +389,20 @@ const isMobile = coarse || innerWidth < 760;
/* ---------- Three.js particle sculpture ---------- */
const canvas = document.getElementById('scene');
const hasThree = typeof THREE !== 'undefined';
let renderer;
try { renderer = new THREE.WebGLRenderer({canvas, antialias:false, alpha:true, powerPreference:'high-performance'}); }
catch(e){ canvas.style.display='none'; }
if (hasThree) {
try { renderer = new THREE.WebGLRenderer({canvas, antialias:false, alpha:true, powerPreference:'high-performance'}); }
catch(e){}
}
if (!renderer) canvas.style.display = 'none';
const COUNT = isMobile ? 6000 : 15000;
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(42, innerWidth/innerHeight, 0.1, 100);
camera.position.set(0, 0, 18);
const group = new THREE.Group();
scene.add(group);
const scene = hasThree ? new THREE.Scene() : null;
const camera = hasThree ? new THREE.PerspectiveCamera(42, innerWidth/innerHeight, 0.1, 100) : null;
const group = hasThree ? new THREE.Group() : null;
if (camera) camera.position.set(0, 0, 18);
if (scene && group) scene.add(group);
const rnd = (a=1,b=0)=>Math.random()*(a-b)+b;
@@ -635,6 +641,7 @@ let hoverT=0, hoverCur=0, swapCur=1, hoverKey=null, hoverLabel=null;
let progT=0, progCur=0, keyEls=null;
let scrollT=0, scrollCur=0, mx=0,my=0, mxCur=0,myCur=0, mouseOn=0, mouseOnCur=0;
function updateScroll(){
if(!hasThree)return;
const max=document.documentElement.scrollHeight-innerHeight; scrollT=max>0?scrollY/max:0;
if(!keyEls) keyEls=['.hero','#work','#skills','#contact'].map(q=>document.querySelector(q));
const c=keyEls.map(el=>el.offsetTop+el.offsetHeight/2-innerHeight/2), y=scrollY;
@@ -647,8 +654,11 @@ addEventListener('pointermove',e=>{ mx=(e.clientX/innerWidth)*2-1; my=-(e.client
addEventListener('pointerleave',()=>{mouseOn=0});
document.addEventListener('mouseleave',()=>{mouseOn=0});
const plane=new THREE.Plane(new THREE.Vector3(0,0,1),0), ray=new THREE.Raycaster(), hit=new THREE.Vector3(), ndc=new THREE.Vector2();
const clock=new THREE.Clock();
const plane = hasThree ? new THREE.Plane(new THREE.Vector3(0,0,1),0) : null;
const ray = hasThree ? new THREE.Raycaster() : null;
const hit = hasThree ? new THREE.Vector3() : null;
const ndc = hasThree ? new THREE.Vector2() : null;
const clock = hasThree ? new THREE.Clock() : null;
let introT=0;
function frame(){
@@ -788,8 +798,7 @@ document.querySelectorAll('nav a[href^="#"]').forEach(a=>a.addEventListener('cli
/* boot: wait for the display font so the PQ sampling is right, then go */
function boot(){
if(!renderer)return;
buildParticles(); resize(); updateScroll(); frame();
if(renderer){ buildParticles(); resize(); updateScroll(); frame(); }
setTimeout(()=>name.classList.add('on'),150);
}
if(document.fonts&&document.fonts.load){ Promise.race([document.fonts.load('800 300px Syne'),new Promise(r=>setTimeout(r,1500))]).then(boot,boot); } else boot();
-1
View File
@@ -2,6 +2,5 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
base: '/whoami/',
plugins: [react()],
})
+8
View File
@@ -0,0 +1,8 @@
{
"name": "whoami",
"compatibility_date": "2026-09-28",
"assets": {
"directory": "./dist",
"not_found_handling": "404-page"
}
}