forked from abaevdict/abaev-basex
hash synchronization when changing lang
This commit is contained in:
parent
377c9d5b8b
commit
ac9d112c13
1 changed files with 4 additions and 0 deletions
|
@ -46,11 +46,15 @@ declare function site:header($lang as xs:string, $href-other as xs:string) {
|
||||||
}</strong><i> β</i></li>
|
}</strong><i> β</i></li>
|
||||||
<li>{
|
<li>{
|
||||||
(element {if ($lang = 'ru') then 'mark' else 'a'}{
|
(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
|
if ($lang != 'ru') then
|
||||||
(attribute href {`{$href-other}`}) else (),
|
(attribute href {`{$href-other}`}) else (),
|
||||||
'ru'
|
'ru'
|
||||||
}, ' / ',
|
}, ' / ',
|
||||||
element {if ($lang = 'ru') then 'a' else 'mark'}{
|
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
|
if ($lang = 'ru') then
|
||||||
(attribute href {`{$href-other}`}) else (),
|
(attribute href {`{$href-other}`}) else (),
|
||||||
'en'
|
'en'
|
||||||
|
|
Loading…
Add table
Reference in a new issue