feat: email obfuscation (#2711)

This commit is contained in:
ZhenShuo Leo committed 2026-02-25 23:13:16 +08:00
1 parent f18c6a0564
commit 55f2f22849
8 files changed
+67 -34

No files matched your search

+7 -2
View File
@@ -79,9 +79,14 @@
<div class="flex flex-wrap">
{{ range $links := . }}
{{ range $name, $url := $links }}
{{ $isEmail := eq $name "email" }}
<a
class="hover:text-primary-400 text-primary-800 dark:text-primary-200 px-1"
href="{{ $url }}"
class="{{ cond $isEmail "email-link" "" }} hover:text-primary-400 text-primary-800 dark:text-primary-200 px-1"
href="{{ cond $isEmail "#" ($url | safeURL) }}"
{{ if $isEmail }}
data-email="{{ $url | base64Encode }}"
data-subject="Contact"
{{ end }}
target="_blank"
aria-label="{{ $name | title }}"
title="{{ $name | title }}"