From ac9d112c13ecdc0ac975c05efe5559ca5321bd27 Mon Sep 17 00:00:00 2001 From: Oleg Belyaev Date: Sun, 30 Mar 2025 16:39:50 +0300 Subject: [PATCH] hash synchronization when changing lang --- xq/site/restx_main.xq | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xq/site/restx_main.xq b/xq/site/restx_main.xq index 8053f68..39c13e5 100644 --- a/xq/site/restx_main.xq +++ b/xq/site/restx_main.xq @@ -46,11 +46,15 @@ declare function site:header($lang as xs:string, $href-other as xs:string) { } β
  • { (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'