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
/**
* 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'] ?? '';
$site_title = $cvData['subtitle'] ?? '';
@ -34,7 +35,7 @@ $extra_contact_links = $cvData['contact_links'] ?? [];
* CV Data
*/
// Map experience to expected structure
$cv_experience = array_map(function($e){
$cv_experience = array_map(function ($e) {
return [
'title' => $e['title'] ?? '',
'org' => $e['organization'] ?? '',
@ -44,7 +45,7 @@ $cv_experience = array_map(function($e){
}, $cvData['experience'] ?? []);
// Map education to expected structure
$cv_education = array_map(function($e){
$cv_education = array_map(function ($e) {
return [
'title' => $e['degree'] ?? '',
'org' => $e['institution'] ?? '',
@ -65,7 +66,8 @@ $cv_skills = $cvData['skills'] ?? [];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<title><?= $site_title ?></title>
<link rel="canonical" href="<?= $site_url ?>">
@ -85,8 +87,9 @@ $cv_skills = $cvData['skills'] ?? [];
?>
</style>
<link rel="shortcut icon" href="favicon.ico">
</head>
<body class="preload">
</head>
<body class="preload">
<main class="bento-grid">
<section class="card profile">
@ -152,11 +155,11 @@ $cv_skills = $cvData['skills'] ?? [];
<div class="cv-content">
<?php $file_mod_time = filemtime(__FILE__); ?>
<p class="cv-modified hidden hidden-toggle">Modified: <?= date("Y-m-d", $file_mod_time) ?></p>
<?php
$firstJob = $cv_experience[0] ?? null;
if ($firstJob):
?>
<section class="cv-section first-experience hidden hidden-toggle">
<?php
$firstJob = $cv_experience[0] ?? null;
if ($firstJob):
?>
<section class="cv-section first-experience hidden hidden-toggle">
<h2>Latest Experience</h2>
<article class="cv-item">
<header class="cv-item-header">
@ -166,8 +169,8 @@ if ($firstJob):
<p class="cv-org"><?= $firstJob['org'] ?></p>
<p class="cv-desc"><?= $firstJob['desc'] ?></p>
</article>
</section>
<?php endif; ?>
</section>
<?php endif; ?>
<section class="cv-section skills hidden hidden-toggle">
<h2>Skills</h2>
<div class="skill-categories">
@ -182,17 +185,14 @@ if ($firstJob):
$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>
<?php $global_i++; endforeach; ?>
<?php $global_i++;
endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</section>
<section class="cv-section experience hidden hidden-toggle">
<h2>Past Experience</h2>
<?php foreach (array_slice($cv_experience, 1) as $job): ?>
@ -233,7 +233,8 @@ if ($firstJob):
$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>
<?php $global_i++; endforeach; ?>
<?php $global_i++;
endforeach; ?>
</div>
</div>
<?php endforeach; ?>
@ -263,7 +264,7 @@ if ($firstJob):
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) {
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
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>
<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "90827cb740cd4b1db611be059f64daa9"}'></script><!-- End Cloudflare Web Analytics -->
</body>
<!-- Cloudflare Web Analytics -->
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "90827cb740cd4b1db611be059f64daa9"}'></script><!-- End Cloudflare Web Analytics -->
</body>
</html>