= $h['title'] ?? '' ?>
= $desc ?>
= $h['description'] ?>
'https://wp.dejvino.com/', 'Projects' => 'https://projects.dejvino.com/', 'Code' => 'https://git.dejvino.cz/', ]; $highlights = $cvData['highlights'] ?? []; /** * Sourced Interests Showcase (from data.json) */ $interests_showcase = []; if (!empty($cvData['interests'])) { foreach ($cvData['interests'] as $item) { $img = $item['image'] ?? null; $has_image = $img && file_exists(__DIR__ . '/' . $img); $interests_showcase[] = [ 'name' => $item['name'] ?? '', 'image' => $has_image ? $img : null, 'caption' => $item['caption'] ?? '' ]; } } $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'] ?? []; /** * Emoji icons for link pills */ $pill_icons = [ 'Website' => '🌐', 'Email' => '✉️', 'Resume' => '📄', 'CV' => '📄', 'PDF' => '📑', 'Blog' => '✍️', 'Projects' => '📁', 'Code' => '💻', 'GitLab' => '🔶', 'GitHub' => '🐙', ]; /** * 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; } /** * Render a standardized pill link */ function render_pill(string $href, string $label, string $icon_emoji, string $class_suffix = ''): string { $url_display = pillUrl($href); $classes = $class_suffix ? "pill {$class_suffix}" : 'pill'; return sprintf( '' . '' . '%s' . '%s' . '', htmlspecialchars($href, ENT_QUOTES, 'UTF-8'), $classes, $icon_emoji, htmlspecialchars($label, ENT_QUOTES, 'UTF-8'), htmlspecialchars($url_display, ENT_QUOTES, 'UTF-8') ); } /** * 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['cv']['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['cv']['education'] ?? []); // Keep skills categories as provided $cv_skills = $cvData['cv']['skills'] ?? []; /** * Page design: * - clean and simple, human-maintainable * - no dependencies * - single-file website */ ?>
= $headline ?>
= $location ?>
= $summary ?>
= $desc ?>
= $h['description'] ?>
= $cvData['cv']['philosophy'] ?>
= $firstJob['org'] ?>
= $firstJob['desc'] ?>
= $job['org'] ?>
= $job['desc'] ?>
= $edu['org'] ?>
= $edu['desc'] ?>