fix: preserve ?cv= param on infra link and back-to-CV button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c755355e36
commit
ace0a1e299
2 changed files with 9 additions and 2 deletions
|
|
@ -3072,7 +3072,7 @@
|
||||||
${esc(id.nom)}<span class="hero-name-line2">${esc(id.prenom)}</span>
|
${esc(id.nom)}<span class="hero-name-line2">${esc(id.prenom)}</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="hero-subtitle">${esc(id.accroche)}</p>
|
<p class="hero-subtitle">${esc(id.accroche)}</p>
|
||||||
<div style="margin-top:20px;display:inline-block"><a href="infrastructure.html" class="infra-btn">⚡ Voir mon infrastructure</a></div>
|
<div style="margin-top:20px;display:inline-block"><a id="infraBtn" href="infrastructure.html" class="infra-btn">⚡ Voir mon infrastructure</a></div>
|
||||||
<div class="hero-stats">
|
<div class="hero-stats">
|
||||||
${d.stats.map(s => `
|
${d.stats.map(s => `
|
||||||
<div class="stat-box">
|
<div class="stat-box">
|
||||||
|
|
@ -3239,6 +3239,9 @@
|
||||||
const cvAllowed = ['ux', 'dsi'];
|
const cvAllowed = ['ux', 'dsi'];
|
||||||
const cvFile = cvAllowed.includes(cvParam) ? `cv-data-${cvParam}.json` : 'cv-data.json';
|
const cvFile = cvAllowed.includes(cvParam) ? `cv-data-${cvParam}.json` : 'cv-data.json';
|
||||||
|
|
||||||
|
const infraBtn = document.getElementById('infraBtn');
|
||||||
|
if (infraBtn && cvParam) infraBtn.href = `infrastructure.html?cv=${cvParam}`;
|
||||||
|
|
||||||
fetch(cvFile)
|
fetch(cvFile)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
if (!r.ok) throw new Error('Impossible de charger ' + cvFile + ' (code ' + r.status + ')');
|
if (!r.ok) throw new Error('Impossible de charger ' + cvFile + ' (code ' + r.status + ')');
|
||||||
|
|
|
||||||
|
|
@ -716,7 +716,7 @@
|
||||||
<body>
|
<body>
|
||||||
<main class="page">
|
<main class="page">
|
||||||
<section class="tagline" style="margin: 0 auto 18px;">
|
<section class="tagline" style="margin: 0 auto 18px;">
|
||||||
<div style="text-align:left;margin-bottom:10px"><a href="index.html" style="color:var(--muted);font-size:12px;text-decoration:none;letter-spacing:.08em;text-transform:uppercase;">← Retour au CV</a></div>
|
<div style="text-align:left;margin-bottom:10px"><a id="backBtn" href="index.html" style="color:var(--muted);font-size:12px;text-decoration:none;letter-spacing:.08em;text-transform:uppercase;">← Retour au CV</a></div>
|
||||||
<h1><span class="blue-text">MON CODE.</span> <span class="green-text">MON INFRASTRUCTURE.</span> <span
|
<h1><span class="blue-text">MON CODE.</span> <span class="green-text">MON INFRASTRUCTURE.</span> <span
|
||||||
class="orange-text">MA MAÎTRISE.</span></h1>
|
class="orange-text">MA MAÎTRISE.</span></h1>
|
||||||
<p>Liberté, performance et sécurité au service de mon identité professionnelle.</p>
|
<p>Liberté, performance et sécurité au service de mon identité professionnelle.</p>
|
||||||
|
|
@ -978,6 +978,10 @@
|
||||||
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
<script>
|
||||||
|
const cv = new URLSearchParams(window.location.search).get('cv');
|
||||||
|
if (cv) document.getElementById('backBtn').href = `index.html?cv=${cv}`;
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in a new issue