This commit is contained in:
Dejvino 2026-05-20 09:29:08 +02:00
parent e7cb2ec37a
commit 319c01c59c

View File

@ -1,8 +1,9 @@
<?php <?php
/** /**
* Content config: * Content config:
*/ */
$cvData = json_decode(file_get_contents(__DIR__.'/cv.json'), true); $cvData = json_decode(file_get_contents(__DIR__ . '/cv.json'), true);
$name = $cvData['name'] ?? ''; $name = $cvData['name'] ?? '';
$site_title = $cvData['subtitle'] ?? ''; $site_title = $cvData['subtitle'] ?? '';
@ -34,7 +35,7 @@ $extra_contact_links = $cvData['contact_links'] ?? [];
* CV Data * CV Data
*/ */
// Map experience to expected structure // Map experience to expected structure
$cv_experience = array_map(function($e){ $cv_experience = array_map(function ($e) {
return [ return [
'title' => $e['title'] ?? '', 'title' => $e['title'] ?? '',
'org' => $e['organization'] ?? '', 'org' => $e['organization'] ?? '',
@ -44,7 +45,7 @@ $cv_experience = array_map(function($e){
}, $cvData['experience'] ?? []); }, $cvData['experience'] ?? []);
// Map education to expected structure // Map education to expected structure
$cv_education = array_map(function($e){ $cv_education = array_map(function ($e) {
return [ return [
'title' => $e['degree'] ?? '', 'title' => $e['degree'] ?? '',
'org' => $e['institution'] ?? '', 'org' => $e['institution'] ?? '',
@ -65,7 +66,8 @@ $cv_skills = $cvData['skills'] ?? [];
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><?= $site_title ?></title> <title><?= $site_title ?></title>
<link rel="canonical" href="<?= $site_url ?>"> <link rel="canonical" href="<?= $site_url ?>">
@ -85,8 +87,9 @@ $cv_skills = $cvData['skills'] ?? [];
?> ?>
</style> </style>
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
</head> </head>
<body class="preload">
<body class="preload">
<main class="bento-grid"> <main class="bento-grid">
<section class="card profile"> <section class="card profile">
@ -152,11 +155,11 @@ $cv_skills = $cvData['skills'] ?? [];
<div class="cv-content"> <div class="cv-content">
<?php $file_mod_time = filemtime(__FILE__); ?> <?php $file_mod_time = filemtime(__FILE__); ?>
<p class="cv-modified hidden hidden-toggle">Modified: <?= date("Y-m-d", $file_mod_time) ?></p> <p class="cv-modified hidden hidden-toggle">Modified: <?= date("Y-m-d", $file_mod_time) ?></p>
<?php <?php
$firstJob = $cv_experience[0] ?? null; $firstJob = $cv_experience[0] ?? null;
if ($firstJob): if ($firstJob):
?> ?>
<section class="cv-section first-experience hidden hidden-toggle"> <section class="cv-section first-experience hidden hidden-toggle">
<h2>Latest Experience</h2> <h2>Latest Experience</h2>
<article class="cv-item"> <article class="cv-item">
<header class="cv-item-header"> <header class="cv-item-header">
@ -166,8 +169,8 @@ if ($firstJob):
<p class="cv-org"><?= $firstJob['org'] ?></p> <p class="cv-org"><?= $firstJob['org'] ?></p>
<p class="cv-desc"><?= $firstJob['desc'] ?></p> <p class="cv-desc"><?= $firstJob['desc'] ?></p>
</article> </article>
</section> </section>
<?php endif; ?> <?php endif; ?>
<section class="cv-section skills hidden hidden-toggle"> <section class="cv-section skills hidden hidden-toggle">
<h2>Skills</h2> <h2>Skills</h2>
<div class="skill-categories"> <div class="skill-categories">
@ -182,17 +185,14 @@ if ($firstJob):
$opacity = 0.6 + (($global_i * 2) % 4) * 0.1; $opacity = 0.6 + (($global_i * 2) % 4) * 0.1;
?> ?>
<span class="tag" style="transition-delay: <?= 0.6 + ($global_i * 0.05) ?>s; font-size: <?= $fontSize ?>rem; opacity: <?= $opacity ?>;"><?= $skill ?></span> <span class="tag" style="transition-delay: <?= 0.6 + ($global_i * 0.05) ?>s; font-size: <?= $fontSize ?>rem; opacity: <?= $opacity ?>;"><?= $skill ?></span>
<?php $global_i++; endforeach; ?> <?php $global_i++;
endforeach; ?>
</div> </div>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
</section> </section>
<section class="cv-section experience hidden hidden-toggle"> <section class="cv-section experience hidden hidden-toggle">
<h2>Past Experience</h2> <h2>Past Experience</h2>
<?php foreach (array_slice($cv_experience, 1) as $job): ?> <?php foreach (array_slice($cv_experience, 1) as $job): ?>
@ -233,7 +233,8 @@ if ($firstJob):
$opacity = 0.6 + (($global_i * 2) % 4) * 0.1; $opacity = 0.6 + (($global_i * 2) % 4) * 0.1;
?> ?>
<span class="tag" style="transition-delay: <?= 0.6 + ($global_i * 0.05) ?>s; font-size: <?= $fontSize ?>rem; opacity: <?= $opacity ?>;"><?= $skill ?></span> <span class="tag" style="transition-delay: <?= 0.6 + ($global_i * 0.05) ?>s; font-size: <?= $fontSize ?>rem; opacity: <?= $opacity ?>;"><?= $skill ?></span>
<?php $global_i++; endforeach; ?> <?php $global_i++;
endforeach; ?>
</div> </div>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
@ -263,7 +264,7 @@ if ($firstJob):
if (labelText) labelText.innerText = show ? 'SYSTEM ACCESS: CV_DATA' : 'Looking to hire?'; if (labelText) labelText.innerText = show ? 'SYSTEM ACCESS: CV_DATA' : 'Looking to hire?';
const cvPanels = Array.from(document.querySelectorAll('.hidden-toggle')).filter(el => el); const cvPanels = Array.from(document.querySelectorAll('.hidden-toggle')).filter(el => el);
if (show) { if (show) {
grid.classList.add('cv-mode'); grid.classList.add('cv-mode');
@ -330,10 +331,15 @@ const cvPanels = Array.from(document.querySelectorAll('.hidden-toggle')).filter(
// Only scroll to top if we are collapsing the CV and the user is scrolled down // Only scroll to top if we are collapsing the CV and the user is scrolled down
if (!e.target.checked && window.scrollY > 200) { if (!e.target.checked && window.scrollY > 200) {
window.scrollTo({ top: document.querySelector('.cv-container').offsetTop - 20, behavior: 'smooth' }); window.scrollTo({
top: document.querySelector('.cv-container').offsetTop - 20,
behavior: 'smooth'
});
} }
}); });
</script> </script>
<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "90827cb740cd4b1db611be059f64daa9"}'></script><!-- End Cloudflare Web Analytics --> <!-- Cloudflare Web Analytics -->
</body> <script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "90827cb740cd4b1db611be059f64daa9"}'></script><!-- End Cloudflare Web Analytics -->
</body>
</html> </html>