From 9151b9eb32565872200dc689aa171ceb44b80ce9 Mon Sep 17 00:00:00 2001 From: Oleg Belyaev Date: Sun, 30 Mar 2025 20:01:15 +0300 Subject: [PATCH] handle footnotes correctly, hide internal notes --- static/abaev-html.css | 34 ++++++++++++++++++++++++++++------ xq/site/components/entries.xqm | 4 ++-- xq/test.xq | 5 ++++- xsl/abaev2html.xsl | 28 +++++++++++++++++++++++++--- 4 files changed, 59 insertions(+), 12 deletions(-) diff --git a/static/abaev-html.css b/static/abaev-html.css index cf94188..66915f0 100644 --- a/static/abaev-html.css +++ b/static/abaev-html.css @@ -68,6 +68,10 @@ body > header { body>main { max-width:950px } + article.abv-entry { + display: grid; + grid-template-columns: minmax(10%,15%) minmax(0,5%) minmax(75%,90%); + } } @media (min-width:1280px) { body>footer>nav, @@ -131,11 +135,6 @@ main { padding-top: 0 !important; } -article.abv-entry { - display: grid; - grid-template-columns: minmax(0px,15%) 5% minmax(50%,80%); -} - section {} aside#leftbar { @@ -404,6 +403,10 @@ div.index-submit { float: right; } +div.notes { + font-size: smaller; +} + optgroup {} option {} option:checked {} @@ -422,7 +425,6 @@ button#open-leftbar{ left: 0; /*height: 1ex;*/ /*line-height: 1ex;*/ - /*width: 1em;*/ } button#close-leftbar{ @@ -432,6 +434,23 @@ button#close-leftbar{ display: none; } +@media (max-width: 1024px) { + button#open-leftbar { + width: 1em; + height: 10ex; + margin: 0 auto; + padding-left: 0; + padding-right: 0; + } + button#close-leftbar { + width: 1em; + height: 10ex; + margin: 0 auto; + padding-left: 0; + padding-right: 0; + } +} + /* This matches forms or form elements that are invalid *and* have been interacted with. Note that: 1) You may need to add the `interacted` class to forms yourself @@ -521,6 +540,9 @@ span.abv-text-ul { span.abv-text-sc { font-variant-caps: small-caps; } +span.abv-name { + font-variant-caps: small-caps; +} /* This file evolved from Natural Selection: diff --git a/xq/site/components/entries.xqm b/xq/site/components/entries.xqm index 548a8b1..4bb1c0f 100644 --- a/xq/site/components/entries.xqm +++ b/xq/site/components/entries.xqm @@ -16,8 +16,8 @@ declare %rest:path("{$lang}/entries/{$id}") %output:html-version('5') function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) { if (count($query) = 0) then - (: doc(`abaevdict_{$lang}/html/{$id}.html`) :) - abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang) + doc(`abaevdict_{$lang}/html/{$id}.html`) + (: abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang) :) else let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1] let $marked := ft:mark( diff --git a/xq/test.xq b/xq/test.xq index b693648..d3ae13b 100644 --- a/xq/test.xq +++ b/xq/test.xq @@ -3,7 +3,10 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict"; import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm'; -abv-m:make-html(doc('abaevdict_en/xml/entry_a.xml'),'en') +abv-m:make-html(doc('abaevdict_en/xml/entry_abūzyn.xml'),'en') + +(: for $node in collection('abaevdict')//tei:ref/@target[.='#ref_Walde—Pok.'] +return replace value of node $node with '#ref_Walde-Pok.' :) (: collection(`abaevdict_en/html`)/article[@id='entry_az'] :) (: html:doc('abaevdict_en/html/entry_az.html') :) diff --git a/xsl/abaev2html.xsl b/xsl/abaev2html.xsl index 7600140..37d244a 100644 --- a/xsl/abaev2html.xsl +++ b/xsl/abaev2html.xsl @@ -102,6 +102,9 @@

+
+ +
@@ -131,7 +134,7 @@ - i + i b @@ -335,8 +338,27 @@ - + + + + + + + + +

+ + +

+
+ + + + + + + + \ No newline at end of file