'https://wp.dejvino.com/', 'Projects' => 'https://projects.dejvino.com/', 'Code' => 'https://git.dejvino.cz/', ]; $highlights = $cvData['highlights'] ?? []; $site_url = "https://www.dejvino.cz/"; $site_title = $name; $site_desc = "$name - $headline"; $mailto_link = $cvData['contact_links']['Email'] ?? ''; if (preg_match('/mailto:([^@]+)/', $mailto_link, $m)) { $email_user = $m[1]; } else { $email_user = $cvData['email'] ?? ''; } $extra_contact_links = $cvData['contact_links'] ?? []; /** * Icon SVGs for link pills */ $pill_icons = [ 'Website' => '', 'Email' => '', 'GitLab' => '', 'GitHub' => '', 'CV' => '', 'PDF' => '', 'Blog' => '', 'Projects' => '', 'Code' => '', ]; /** * Extract a readable URL from a href (strip protocol, trailing slash) */ function pillUrl(string $href): string { $url = $href; if (preg_match('/^[a-z]+:\/\//i', $url)) { $url = preg_replace('/^[a-z]+:\/\//i', '', $url); } $url = rtrim($url, '/'); return strlen($url) > 30 ? mb_substr($url, 0, 27) . '…' : $url; } /** * CV Data */ // Map experience to expected structure $cv_experience = array_map(function ($e) { return [ 'title' => $e['title'] ?? '', 'org' => $e['company'] ?? '', 'date' => $e['date'] ?? '', 'desc' => $e['description'] ?? '', ]; }, $cvData['experience'] ?? []); // Helper to calculate years between start and end dates function calculateYears($dateStr) { // Extract start and end years, support 'present' or 'current' $dateStr = str_replace(['–', '—', '−', '-'], '-', $dateStr); $parts = array_map('trim', explode('-', $dateStr, 2)); if (count($parts) < 2) { return 0; } $start = (int)$parts[0]; $endRaw = strtolower($parts[1]); $end = ($endRaw === 'present' || $endRaw === 'current') ? (int)date('Y') : (int)$endRaw; $years = $end - $start; if ($years <= 1) { return "1 year"; } return "$years years"; } // Map education to expected structure $cv_education = array_map(function ($e) { return [ 'title' => $e['degree'] ?? '', 'org' => $e['institution'] ?? '', 'date' => $e['date'] ?? '', 'desc' => $e['thesis'] ?? '', ]; }, $cvData['education'] ?? []); // Keep skills categories as provided $cv_skills = $cvData['skills'] ?? []; /** * Page design: * - clean and simple, human-maintainable * - no dependencies * - single-file website */ ?> <?= $site_title ?>
'; } else { echo '
'; } ?>

$href): ?>
$href): ?>

Selected Work

Outside Work