diff --git a/index.php b/index.php index 17514da..229ee8d 100644 --- a/index.php +++ b/index.php @@ -34,18 +34,19 @@ if (preg_match('/mailto:([^@]+)/', $mailto_link, $m)) { $extra_contact_links = $cvData['contact_links'] ?? []; /** - * Icon SVGs for link pills + * Emoji icons for link pills */ $pill_icons = [ - 'Website' => '', - 'Email' => '', - 'GitLab' => '', - 'GitHub' => '', - 'CV' => '', - 'PDF' => '', - 'Blog' => '', - 'Projects' => '', - 'Code' => '', + 'Website' => '🌐', + 'Email' => '✉️', + 'Resume' => '📄', + 'CV' => '📄', + 'PDF' => '📑', + 'Blog' => '✍️', + 'Projects' => '📁', + 'Code' => '💻', + 'GitLab' => '🔶', + 'GitHub' => '🐙', ]; /** @@ -60,6 +61,26 @@ function pillUrl(string $href): string { 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' . + '%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 @@ -170,21 +191,13 @@ $cv_skills = $cvData['cv']['skills'] ?? [];
$href): ?> - - - - - +
$href): ?> - - - - - +
diff --git a/style.css b/style.css index 2b18c9c..a76be62 100644 --- a/style.css +++ b/style.css @@ -254,9 +254,15 @@ body { .pill-icon { - width: 16px; - height: 16px; + font-size: 1.1em; + line-height: 1; flex-shrink: 0; + display: inline-flex; + align-items: center; + justify-content: center; + width: 1.2em; + text-align: center; + filter: grayscale(100%) brightness(1.2); }