hash synchronization when changing lang

This commit is contained in:
Oleg Belyaev 2025-03-30 16:39:50 +03:00
parent 377c9d5b8b
commit ac9d112c13

View file

@ -46,11 +46,15 @@ declare function site:header($lang as xs:string, $href-other as xs:string) {
}</strong><i> β</i></li>
<li>{
(element {if ($lang = 'ru') then 'mark' else 'a'}{
attribute hx-on-click {"this.href = this.href + window.location.hash;"},
attribute class {'abv-lang-link'},
if ($lang != 'ru') then
(attribute href {`{$href-other}`}) else (),
'ru'
}, ' / ',
element {if ($lang = 'ru') then 'a' else 'mark'}{
attribute hx-on-click {"this.href = this.href + window.location.hash;"},
attribute class {'abv-lang-link'},
if ($lang = 'ru') then
(attribute href {`{$href-other}`}) else (),
'en'