transition to htmx, made truly infinite scroll

This commit is contained in:
Oleg Belyaev 2025-03-29 23:57:33 +03:00
parent a65037f8ea
commit cd513bd796
26 changed files with 849 additions and 1253 deletions

View file

@ -3,6 +3,24 @@ module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod';
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
(: HELPER FUNCTIONS :)
declare function abv-m:lookups($include-subentries as xs:boolean := false()) {
if (not($include-subentries)) then
doc('abaevdict_index/lookup.xml')/tei:table/tei:entry
else
doc('abaevdict_index/lookup.xml')/tei:table/*
};
declare function abv-m:collection($lang as xs:string,
$method as xs:string) {
collection(`abaevdict_{$lang}/{$method}`)
};
declare function abv-m:invert-lang($lang as xs:string) as xs:string {
if($lang = 'en') then 'ru' else 'en'
};
declare function abv-m:normalize-str($str as xs:string?)
as xs:string? {
$str => translate('
','') => normalize-space()