Add search i18n, fix light mode search icon, reduce placeholder font

- Translate search placeholder to German and Dutch, fallback to English
- Fix magnifying glass icon invisible in light mode (now uses dark color)
- Reduce placeholder font size from 1.6rem to 1rem
- Add form-label dark mode override for diagram generation labels
- Add sync.sh deploy script
This commit is contained in:
2026-03-14 20:10:13 +01:00
parent b325d3c0ff
commit ea29dba748
4 changed files with 51 additions and 13 deletions
+8 -1
View File
@@ -224,11 +224,18 @@ class BockenTheme extends AbstractModule implements ModuleCustomInterface, Modul
var path = window.location.pathname;
var searchAction = path.replace(/\/?$/, '/search-quick');
var lang = document.documentElement.getAttribute('lang') || 'en';
var placeholders = {
'de': 'Namen, Orte, Quellen durchsuchen…',
'nl': 'Zoek namen, plaatsen, bronnen…'
};
var placeholder = placeholders[lang] || 'Search names, places, sources…';
var searchDiv = document.createElement('div');
searchDiv.className = 'bocken-page-search';
searchDiv.innerHTML =
'<form method="post" action="' + searchAction + '" class="bocken-search-form" role="search">' +
'<input type="search" class="bocken-search-input" name="query" placeholder="Search names, places, sources..." autocomplete="off">' +
'<input type="search" class="bocken-search-input" name="query" placeholder="' + placeholder + '" autocomplete="off">' +
'<span class="bocken-search-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="m338.29 338.29 105.25 105.25"/></svg></span>' +
'<input type="hidden" name="_csrf" value="' + csrfValue + '">' +
'</form>';