add search landmark and disclosure pattern to menu

This commit is contained in:
krvpb024 2024-01-25 12:44:37 +08:00 committed by Frédéric Guillot
parent f23e6a3352
commit 6a9a590c7f
22 changed files with 119 additions and 64 deletions

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Tastenkürzel: %s", "tooltip.keyboard_shortcuts": "Tastenkürzel: %s",
"tooltip.logged_user": "Angemeldet als %s", "tooltip.logged_user": "Angemeldet als %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Ungelesen", "menu.unread": "Ungelesen",
"menu.starred": "Lesezeichen", "menu.starred": "Lesezeichen",
"menu.history": "Verlauf", "menu.history": "Verlauf",
@ -51,6 +52,7 @@
"menu.shared_entries": "Geteilte Artikel", "menu.shared_entries": "Geteilte Artikel",
"search.label": "Suche", "search.label": "Suche",
"search.placeholder": "Suche...", "search.placeholder": "Suche...",
"search.submit": "Submit",
"pagination.next": "Nächste", "pagination.next": "Nächste",
"pagination.previous": "Vorherige", "pagination.previous": "Vorherige",
"entry.status.unread": "Ungelesen", "entry.status.unread": "Ungelesen",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Συντόμευση πληκτρολογίου: % s", "tooltip.keyboard_shortcuts": "Συντόμευση πληκτρολογίου: % s",
"tooltip.logged_user": "Συνδεδεμένος/η ως %s", "tooltip.logged_user": "Συνδεδεμένος/η ως %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Μη αναγνωσμένα", "menu.unread": "Μη αναγνωσμένα",
"menu.starred": "Αγαπημένα", "menu.starred": "Αγαπημένα",
"menu.history": "Ιστορικό", "menu.history": "Ιστορικό",
@ -51,6 +52,7 @@
"menu.shared_entries": "Κοινόχρηστες καταχωρήσεις", "menu.shared_entries": "Κοινόχρηστες καταχωρήσεις",
"search.label": "Αναζήτηση", "search.label": "Αναζήτηση",
"search.placeholder": "Αναζήτηση...", "search.placeholder": "Αναζήτηση...",
"search.submit": "Submit",
"pagination.next": "Επόμενη", "pagination.next": "Επόμενη",
"pagination.previous": "Προηγούμενη", "pagination.previous": "Προηγούμενη",
"entry.status.unread": "Μη αναγνωσμένο", "entry.status.unread": "Μη αναγνωσμένο",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Keyboard Shortcut: %s", "tooltip.keyboard_shortcuts": "Keyboard Shortcut: %s",
"tooltip.logged_user": "Logged in as %s", "tooltip.logged_user": "Logged in as %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Unread", "menu.unread": "Unread",
"menu.starred": "Starred", "menu.starred": "Starred",
"menu.history": "History", "menu.history": "History",
@ -51,6 +52,7 @@
"menu.shared_entries": "Shared entries", "menu.shared_entries": "Shared entries",
"search.label": "Search", "search.label": "Search",
"search.placeholder": "Search…", "search.placeholder": "Search…",
"search.submit": "Submit",
"pagination.next": "Next", "pagination.next": "Next",
"pagination.previous": "Previous", "pagination.previous": "Previous",
"entry.status.unread": "Unread", "entry.status.unread": "Unread",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Atajo de teclado: %s", "tooltip.keyboard_shortcuts": "Atajo de teclado: %s",
"tooltip.logged_user": "Registrado como %s", "tooltip.logged_user": "Registrado como %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "No leídos", "menu.unread": "No leídos",
"menu.starred": "Marcadores", "menu.starred": "Marcadores",
"menu.history": "Historial", "menu.history": "Historial",
@ -51,6 +52,7 @@
"menu.shared_entries": "Artículos compartidos", "menu.shared_entries": "Artículos compartidos",
"search.label": "Buscar", "search.label": "Buscar",
"search.placeholder": "Búsqueda...", "search.placeholder": "Búsqueda...",
"search.submit": "Submit",
"pagination.next": "Siguiente", "pagination.next": "Siguiente",
"pagination.previous": "Anterior", "pagination.previous": "Anterior",
"entry.status.unread": "No leído", "entry.status.unread": "No leído",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Pikanäppäin: %s", "tooltip.keyboard_shortcuts": "Pikanäppäin: %s",
"tooltip.logged_user": "Kirjautunut %s-käyttäjänä", "tooltip.logged_user": "Kirjautunut %s-käyttäjänä",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Lukemattomat", "menu.unread": "Lukemattomat",
"menu.starred": "Suosikit", "menu.starred": "Suosikit",
"menu.history": "Historia", "menu.history": "Historia",
@ -51,6 +52,7 @@
"menu.shared_entries": "Jaetut artikkelit", "menu.shared_entries": "Jaetut artikkelit",
"search.label": "Haku", "search.label": "Haku",
"search.placeholder": "Hae...", "search.placeholder": "Hae...",
"search.submit": "Submit",
"pagination.next": "Seuraava", "pagination.next": "Seuraava",
"pagination.previous": "Edellinen", "pagination.previous": "Edellinen",
"entry.status.unread": "Lukematon", "entry.status.unread": "Lukematon",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Raccourci clavier : %s", "tooltip.keyboard_shortcuts": "Raccourci clavier : %s",
"tooltip.logged_user": "Connecté en tant que %s", "tooltip.logged_user": "Connecté en tant que %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Non lus", "menu.unread": "Non lus",
"menu.starred": "Favoris", "menu.starred": "Favoris",
"menu.history": "Historique", "menu.history": "Historique",
@ -51,6 +52,7 @@
"menu.shared_entries": "Articles partagés", "menu.shared_entries": "Articles partagés",
"search.label": "Recherche", "search.label": "Recherche",
"search.placeholder": "Recherche...", "search.placeholder": "Recherche...",
"search.submit": "Submit",
"pagination.next": "Suivant", "pagination.next": "Suivant",
"pagination.previous": "Précédent", "pagination.previous": "Précédent",
"entry.status.unread": "Non lu", "entry.status.unread": "Non lu",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "कुंजीपटल संक्षिप्त रीति: %s", "tooltip.keyboard_shortcuts": "कुंजीपटल संक्षिप्त रीति: %s",
"tooltip.logged_user": "%s के रूप में लॉग इन किया", "tooltip.logged_user": "%s के रूप में लॉग इन किया",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "अपठित", "menu.unread": "अपठित",
"menu.starred": "तारांकित", "menu.starred": "तारांकित",
"menu.history": "इतिहास", "menu.history": "इतिहास",
@ -51,6 +52,7 @@
"menu.shared_entries": "साझा प्रविष्टियां", "menu.shared_entries": "साझा प्रविष्टियां",
"search.label": "खोजे", "search.label": "खोजे",
"search.placeholder": "खोजे...", "search.placeholder": "खोजे...",
"search.submit": "Submit",
"pagination.next": "अगला", "pagination.next": "अगला",
"pagination.previous": "पिछला", "pagination.previous": "पिछला",
"entry.status.unread": "अपठित", "entry.status.unread": "अपठित",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Pintasan Papan Tik: %s", "tooltip.keyboard_shortcuts": "Pintasan Papan Tik: %s",
"tooltip.logged_user": "Masuk sebagai %s", "tooltip.logged_user": "Masuk sebagai %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Belum Dibaca", "menu.unread": "Belum Dibaca",
"menu.starred": "Markah", "menu.starred": "Markah",
"menu.history": "Riwayat", "menu.history": "Riwayat",
@ -51,6 +52,7 @@
"menu.shared_entries": "Entri yang Dibagikan", "menu.shared_entries": "Entri yang Dibagikan",
"search.label": "Cari", "search.label": "Cari",
"search.placeholder": "Cari...", "search.placeholder": "Cari...",
"search.submit": "Submit",
"pagination.next": "Berikutnya", "pagination.next": "Berikutnya",
"pagination.previous": "Sebelumnya", "pagination.previous": "Sebelumnya",
"entry.status.unread": "Belum dibaca", "entry.status.unread": "Belum dibaca",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Scorciatoia da tastiera: %s", "tooltip.keyboard_shortcuts": "Scorciatoia da tastiera: %s",
"tooltip.logged_user": "Autenticato come %s", "tooltip.logged_user": "Autenticato come %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Da leggere", "menu.unread": "Da leggere",
"menu.starred": "Preferiti", "menu.starred": "Preferiti",
"menu.history": "Cronologia", "menu.history": "Cronologia",
@ -51,6 +52,7 @@
"menu.shared_entries": "Voci condivise", "menu.shared_entries": "Voci condivise",
"search.label": "Cerca", "search.label": "Cerca",
"search.placeholder": "Cerca...", "search.placeholder": "Cerca...",
"search.submit": "Submit",
"pagination.next": "Successivo", "pagination.next": "Successivo",
"pagination.previous": "Precedente", "pagination.previous": "Precedente",
"entry.status.unread": "Da leggere", "entry.status.unread": "Da leggere",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "キーボードショートカット: %s", "tooltip.keyboard_shortcuts": "キーボードショートカット: %s",
"tooltip.logged_user": "%s としてログイン中", "tooltip.logged_user": "%s としてログイン中",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "未読", "menu.unread": "未読",
"menu.starred": "星付き", "menu.starred": "星付き",
"menu.history": "履歴", "menu.history": "履歴",
@ -51,6 +52,7 @@
"menu.shared_entries": "共有エントリ", "menu.shared_entries": "共有エントリ",
"search.label": "検索", "search.label": "検索",
"search.placeholder": "…を検索", "search.placeholder": "…を検索",
"search.submit": "Submit",
"pagination.next": "次", "pagination.next": "次",
"pagination.previous": "前", "pagination.previous": "前",
"entry.status.unread": "未読にする", "entry.status.unread": "未読にする",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Sneltoets: %s", "tooltip.keyboard_shortcuts": "Sneltoets: %s",
"tooltip.logged_user": "Ingelogd als %s", "tooltip.logged_user": "Ingelogd als %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Ongelezen", "menu.unread": "Ongelezen",
"menu.starred": "Favorieten", "menu.starred": "Favorieten",
"menu.history": "Geschiedenis", "menu.history": "Geschiedenis",
@ -51,6 +52,7 @@
"menu.shared_entries": "Gedeelde vermeldingen", "menu.shared_entries": "Gedeelde vermeldingen",
"search.label": "Zoeken", "search.label": "Zoeken",
"search.placeholder": "Zoeken...", "search.placeholder": "Zoeken...",
"search.submit": "Submit",
"pagination.next": "Volgende", "pagination.next": "Volgende",
"pagination.previous": "Vorige", "pagination.previous": "Vorige",
"entry.status.unread": "Ongelezen", "entry.status.unread": "Ongelezen",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Skróty klawiszowe: %s", "tooltip.keyboard_shortcuts": "Skróty klawiszowe: %s",
"tooltip.logged_user": "Zalogowany jako %s", "tooltip.logged_user": "Zalogowany jako %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Nieprzeczytane", "menu.unread": "Nieprzeczytane",
"menu.starred": "Ulubione", "menu.starred": "Ulubione",
"menu.history": "Historia", "menu.history": "Historia",
@ -51,6 +52,7 @@
"menu.shared_entries": "Udostępnione wpisy", "menu.shared_entries": "Udostępnione wpisy",
"search.label": "Szukaj", "search.label": "Szukaj",
"search.placeholder": "Szukaj...", "search.placeholder": "Szukaj...",
"search.submit": "Submit",
"pagination.next": "Następny", "pagination.next": "Następny",
"pagination.previous": "Poprzedni", "pagination.previous": "Poprzedni",
"entry.status.unread": "Nieprzeczytane", "entry.status.unread": "Nieprzeczytane",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Atalho do teclado: %s", "tooltip.keyboard_shortcuts": "Atalho do teclado: %s",
"tooltip.logged_user": "Autenticado como %s", "tooltip.logged_user": "Autenticado como %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Não lido", "menu.unread": "Não lido",
"menu.starred": "Favoritos", "menu.starred": "Favoritos",
"menu.history": "Histórico", "menu.history": "Histórico",
@ -51,6 +52,7 @@
"menu.shared_entries": "Itens compartilhados", "menu.shared_entries": "Itens compartilhados",
"search.label": "Buscar", "search.label": "Buscar",
"search.placeholder": "Buscar por...", "search.placeholder": "Buscar por...",
"search.submit": "Submit",
"pagination.next": "Próximo", "pagination.next": "Próximo",
"pagination.previous": "Anterior", "pagination.previous": "Anterior",
"entry.status.unread": "Não lido", "entry.status.unread": "Não lido",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Сочетания клавиш: %s", "tooltip.keyboard_shortcuts": "Сочетания клавиш: %s",
"tooltip.logged_user": "Авторизован как %s", "tooltip.logged_user": "Авторизован как %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Непрочитанное", "menu.unread": "Непрочитанное",
"menu.starred": "Избранное", "menu.starred": "Избранное",
"menu.history": "История", "menu.history": "История",
@ -51,6 +52,7 @@
"menu.shared_entries": "Общие записи", "menu.shared_entries": "Общие записи",
"search.label": "Поиск", "search.label": "Поиск",
"search.placeholder": "Поиск…", "search.placeholder": "Поиск…",
"search.submit": "Submit",
"pagination.next": "Следующая", "pagination.next": "Следующая",
"pagination.previous": "Предыдущая", "pagination.previous": "Предыдущая",
"entry.status.unread": "Не прочитано", "entry.status.unread": "Не прочитано",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Klavye Kısayolu: %s", "tooltip.keyboard_shortcuts": "Klavye Kısayolu: %s",
"tooltip.logged_user": "%s olarak giriş yapıldı", "tooltip.logged_user": "%s olarak giriş yapıldı",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Okunmadı", "menu.unread": "Okunmadı",
"menu.starred": "Yıldız", "menu.starred": "Yıldız",
"menu.history": "Geçmiş", "menu.history": "Geçmiş",
@ -51,6 +52,7 @@
"menu.shared_entries": "Paylaşılan iletiler", "menu.shared_entries": "Paylaşılan iletiler",
"search.label": "Ara", "search.label": "Ara",
"search.placeholder": "Ara...", "search.placeholder": "Ara...",
"search.submit": "Submit",
"pagination.next": "Sonraki", "pagination.next": "Sonraki",
"pagination.previous": "Önceki", "pagination.previous": "Önceki",
"entry.status.unread": "Okunmadı", "entry.status.unread": "Okunmadı",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "Комбінація клавіш: %s", "tooltip.keyboard_shortcuts": "Комбінація клавіш: %s",
"tooltip.logged_user": "Здійснено вхід як %s", "tooltip.logged_user": "Здійснено вхід як %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "Непрочитане", "menu.unread": "Непрочитане",
"menu.starred": "З зірочкою", "menu.starred": "З зірочкою",
"menu.history": "Історія", "menu.history": "Історія",
@ -51,6 +52,7 @@
"menu.shared_entries": "Спільні записи", "menu.shared_entries": "Спільні записи",
"search.label": "Пошук", "search.label": "Пошук",
"search.placeholder": "Шукати...", "search.placeholder": "Шукати...",
"search.submit": "Submit",
"pagination.next": "Вперед", "pagination.next": "Вперед",
"pagination.previous": "Назад", "pagination.previous": "Назад",
"entry.status.unread": "Непрочитане", "entry.status.unread": "Непрочитане",

View File

@ -19,6 +19,7 @@
"tooltip.keyboard_shortcuts": "快捷键: %s", "tooltip.keyboard_shortcuts": "快捷键: %s",
"tooltip.logged_user": "当前登录 %s", "tooltip.logged_user": "当前登录 %s",
"menu.title": "Menu", "menu.title": "Menu",
"menu.home_page": "Home page",
"menu.unread": "未读", "menu.unread": "未读",
"menu.starred": "收藏", "menu.starred": "收藏",
"menu.history": "历史", "menu.history": "历史",
@ -51,6 +52,7 @@
"menu.shared_entries": "已分享的文章", "menu.shared_entries": "已分享的文章",
"search.label": "搜索", "search.label": "搜索",
"search.placeholder": "搜索…", "search.placeholder": "搜索…",
"search.submit": "Submit",
"pagination.next": "下一页", "pagination.next": "下一页",
"pagination.previous": "上一页", "pagination.previous": "上一页",
"entry.status.unread": "标为未读", "entry.status.unread": "标为未读",

View File

@ -51,6 +51,7 @@
"menu.shared_entries": "已分享的文章", "menu.shared_entries": "已分享的文章",
"search.label": "搜尋", "search.label": "搜尋",
"search.placeholder": "搜尋…", "search.placeholder": "搜尋…",
"search.submit": "送出",
"pagination.next": "下一頁", "pagination.next": "下一頁",
"pagination.previous": "上一頁", "pagination.previous": "上一頁",
"entry.status.unread": "標為未讀", "entry.status.unread": "標為未讀",
@ -289,7 +290,7 @@
"error.invalid_entry_direction": "無效的輸入方向。", "error.invalid_entry_direction": "無效的輸入方向。",
"error.invalid_display_mode": "無效的網頁應用顯示模式。", "error.invalid_display_mode": "無效的網頁應用顯示模式。",
"error.invalid_gesture_nav": "手勢導航無效.", "error.invalid_gesture_nav": "手勢導航無效.",
"error.invalid_default_home_page": "默認主頁無效!", "error.invalid_default_home_page": "預設主頁無效!",
"form.feed.label.title": "標題", "form.feed.label.title": "標題",
"form.feed.label.site_url": "網站 URL", "form.feed.label.site_url": "網站 URL",
"form.feed.label.feed_url": "訂閱 Feed URL", "form.feed.label.feed_url": "訂閱 Feed URL",
@ -348,7 +349,7 @@
"form.prefs.label.show_reading_time": "顯示文章的預計閱讀時間", "form.prefs.label.show_reading_time": "顯示文章的預計閱讀時間",
"form.prefs.label.custom_css": "自定義 CSS", "form.prefs.label.custom_css": "自定義 CSS",
"form.prefs.label.entry_order": "文章排序依據", "form.prefs.label.entry_order": "文章排序依據",
"form.prefs.label.default_home_page": "默認主頁", "form.prefs.label.default_home_page": "預設主頁",
"form.prefs.label.categories_sorting_order": "分類排序", "form.prefs.label.categories_sorting_order": "分類排序",
"form.prefs.label.mark_read_on_view": "查看時自動將條目標記為已讀", "form.prefs.label.mark_read_on_view": "查看時自動將條目標記為已讀",
"form.prefs.fieldset.application_settings": "應用程式設定", "form.prefs.fieldset.application_settings": "應用程式設定",

View File

@ -66,10 +66,14 @@
</a> </a>
<header class="header"> <header class="header">
<nav> <nav>
<div class="logo"> <details>
<a href="{{ route .user.DefaultHomePage }}">Mini<span>flux</span></a> <summary aria-label="{{ t "menu.title" }}">
</div> <div class="logo"><a aria-label="{{ t "menu.home_page" }}" href="{{ route .user.DefaultHomePage }}">Mini<span>flux</span></a></div>
<ul> <svg aria-label="{{ t "menu.title" }}" xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>
</svg>
</summary>
<ul id="header-menu">
<li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}"> <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
<a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }} <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }}
{{ if gt .countUnread 0 }} {{ if gt .countUnread 0 }}
@ -105,15 +109,21 @@
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
<div class="search"> </details>
<div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
<a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a>
</div>
<form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
<input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
</form>
</div>
</nav> </nav>
<search role="search" class="search">
<details {{ if $.searchQuery }}open{{ end }}>
<summary>{{ t "search.label" }}</summary>
<form action="{{ route "searchEntries" }}" aria-labelledby="search-input-label">
<label class="sr-only" for="search-input" id="search-input-label">{{ t "search.label" }}</label>
<input type="search" name="q" id="search-input" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
<button type="submit">{{ t "search.submit" }}</button>
</form>
</details>
<!-- <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}"> -->
<!-- <a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a> -->
<!-- </div> -->
</search>
</header> </header>
{{ end }} {{ end }}
{{ if .flashMessage }} {{ if .flashMessage }}

View File

@ -89,7 +89,27 @@ a:hover {
margin-bottom: 20px; margin-bottom: 20px;
} }
.header nav ul { .header nav {
display: flex;
align-items: center;
}
.header nav details {
flex: 1;
}
.header nav details[open] svg {
rotate: 180deg;
}
.header nav summary {
list-style: none;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
}
.header nav summary::-webkit-details-marker {
display: none; display: none;
} }
@ -188,7 +208,8 @@ a:hover {
/* Search form */ /* Search form */
.search { .search {
text-align: center; text-align: center;
display: none; margin-top: 10px;
margin-right: 5px;
} }
.search-toggle-switch { .search-toggle-switch {
@ -266,10 +287,6 @@ a:hover {
margin-left: 5px; margin-left: 5px;
} }
.header nav ul {
display: block;
}
.header li { .header li {
display: inline; display: inline;
padding: 0; padding: 0;
@ -289,8 +306,6 @@ a:hover {
.search { .search {
text-align: right; text-align: right;
display: block; display: block;
margin-top: 10px;
margin-right: 5px;
} }
.search-toggle-switch { .search-toggle-switch {

View File

@ -28,17 +28,13 @@ function onAuxClick(selector, callback, noPreventDefault) {
// Show and hide the main menu on mobile devices. // Show and hide the main menu on mobile devices.
function toggleMainMenu() { function toggleMainMenu() {
let menu = document.querySelector(".header nav ul"); let menu = document.querySelector(".header nav ul");
let menuToggleButton = document.querySelector(".header .logo a");
if (DomHelper.isVisible(menu)) { if (DomHelper.isVisible(menu)) {
menu.style.display = "none"; menu.style.display = "none";
menuToggleButton.setAttribute("aria-expanded", false)
} else { } else {
menu.style.display = "block"; menu.style.display = "block";
} menuToggleButton.setAttribute("aria-expanded", true)
let searchElement = document.querySelector(".header .search");
if (DomHelper.isVisible(searchElement)) {
searchElement.style.display = "none";
} else {
searchElement.style.display = "block";
} }
} }

View File

@ -113,7 +113,6 @@ document.addEventListener("DOMContentLoaded", () => {
}, true); }, true);
if (document.documentElement.clientWidth < 600) { if (document.documentElement.clientWidth < 600) {
onClick(".logo", () => toggleMainMenu());
onClick(".header nav li", (event) => onClickMainMenuListItem(event)); onClick(".header nav li", (event) => onClickMainMenuListItem(event));
} }