diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-20 13:56:23 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-20 13:56:23 +0200 |
| commit | 47db5c6878aa872b5b791ec6a26494e28ebf31a0 (patch) | |
| tree | b27b238981a83c197b4aff68b71fce4d48b300b8 | |
| parent | 25cf50085ad1ce1e0820ec5ccb728ddeef5fb6fb (diff) | |
| download | danixxyz-47db5c6878aa872b5b791ec6a26494e28ebf31a0.tar.gz danixxyz-47db5c6878aa872b5b791ec6a26494e28ebf31a0.zip | |
feat: add search icon button to desktop header
Adds magnifying glass icon in header right controls area (desktop only, hidden md:flex). Dispatches 'open-search' event to trigger search modal. Includes proper focus ring styling and accessibility labels.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/partials/header.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/themes/danix-xyz-hacker/layouts/partials/header.html b/themes/danix-xyz-hacker/layouts/partials/header.html index e365777..63151ba 100644 --- a/themes/danix-xyz-hacker/layouts/partials/header.html +++ b/themes/danix-xyz-hacker/layouts/partials/header.html @@ -19,8 +19,17 @@ {{ end }} </div> - <!-- Right side controls: Language, Theme, Menu --> + <!-- Right side controls: Search, Language, Theme, Menu --> <div class="flex items-center gap-4 md:gap-6"> + <!-- Search button (desktop only) --> + <button + @click="$dispatch('open-search')" + aria-label="{{ i18n "searchArticles" }}" + class="hidden md:flex p-2 rounded hover:bg-surface transition-colors focus:outline-none focus:ring-2 focus:ring-accent" + > + <i data-feather="search" class="w-5 h-5" aria-hidden="true"></i> + </button> + <!-- Language switcher (desktop) --> <div class="hidden md:flex gap-2"> {{ $currentLang := .Page.Language }} |
