From 6cd592784e2538b989de8baf089cec9578767453 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Mon, 9 Feb 2026 11:52:20 +0100 Subject: [PATCH 01/28] make app:print-context-relatedItem-type()#3 robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to prevent an error if not `@type` is set for `notesStmt/relatedItem`. This only prevents an error – for the view of sources we should still either add types or overhaul the whole context section --- modules/app.xqm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/app.xqm b/modules/app.xqm index 313d97b61..9bba2b59f 100644 --- a/modules/app.xqm +++ b/modules/app.xqm @@ -1726,7 +1726,8 @@ declare %templates:default("lang", "en") %templates:wrap function app:print-context-relatedItem-type($node as node(), $model as map(*), $lang as xs:string) as xs:string? { - lang:get-language-string($model?context-relatedItem?context-relatedItem-type, $lang) + let $type := $model?context-relatedItem?context-relatedItem-type + return if(exists($type)) then lang:get-language-string($model?context-relatedItem?context-relatedItem-type, $lang) else () }; (:~ From a71b9338c7c39a91eb7f6d835d8e715cb6949f18 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Mon, 9 Feb 2026 14:55:58 +0100 Subject: [PATCH 02/28] include mei sources in query:context-relatedItems()#1 accept the key from `mei:manifestation/mei:identifier[@type='WeGA']` to derive the related wega work. There isn't any equivalent for the related item type though, so that remains is a placeholder for now. --- modules/query.xqm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/query.xqm b/modules/query.xqm index b1a948699..1725a857b 100644 --- a/modules/query.xqm +++ b/modules/query.xqm @@ -606,7 +606,7 @@ declare function query:witness-facsimile($source as element()) as element(tei:fa : The value of this key is a sequence of maps, each containing the keys 'context-relatedItem-type', 'context-relatedItem-doc' and 'context-relatedItem-n' ~:) declare function query:context-relatedItems($doc as document-node()?) as map(*)? { - let $relatedItems := + let $teiRelatedItems := for $relatedItem in $doc//tei:notesStmt/tei:relatedItem return map { @@ -614,6 +614,16 @@ declare function query:context-relatedItems($doc as document-node()?) as map(*)? 'context-relatedItem-doc': crud:doc(substring-after($relatedItem/@target, ':')), 'context-relatedItem-n': data($relatedItem/@n) } + let $meiWeGAIdentifiers := + for $WeGAIdentifier in $doc/mei:manifestation/mei:identifier[@type = 'WeGA'] + let $key := normalize-space(string($WeGAIdentifier)) + return + map { + 'context-relatedItem-type': (), (: no equivalent in current data :) + 'context-relatedItem-doc': crud:doc($key), + 'context-relatedItem-n': () (: no equivalent in current data :) + } + let $relatedItems := ($teiRelatedItems, $meiWeGAIdentifiers) return if(exists($relatedItems)) then map { From 51bd470c8542ea99abc5c1d4cc2577546341e29e Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Mon, 9 Feb 2026 20:02:07 +0100 Subject: [PATCH 03/28] allow fallback node for sources in query:text-sources()#1 --- modules/query.xqm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/query.xqm b/modules/query.xqm index 1725a857b..eab875c09 100644 --- a/modules/query.xqm +++ b/modules/query.xqm @@ -286,7 +286,7 @@ declare function query:text-sources($doc as document-node()) as element()* { Umwandlung der Dauerleihgabe in eine Schenkung durch Hans-Jürgen Freiherr von Weber am 15. November 1986 - case 'works' case 'sources' return () (:$model('doc')//mei:sourceDesc:) + case 'works' return () (:$model('doc')//mei:sourceDesc:) case 'biblio' return $doc/tei:biblStruct default return $doc//tei:sourceDesc/tei:* return From 2b9b5bd462cf6ba910862bd4f0ea6716a7b31a5f Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Mon, 9 Feb 2026 20:05:00 +0100 Subject: [PATCH 04/28] add transformation and basic styling for tei sources --- modules/app.xqm | 2 + resources/sass/components/_tei.scss | 26 ++++++++ xsl/sources.xsl | 92 +++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 xsl/sources.xsl diff --git a/modules/app.xqm b/modules/app.xqm index 9bba2b59f..ad6a1a741 100644 --- a/modules/app.xqm +++ b/modules/app.xqm @@ -1395,6 +1395,7 @@ declare case 'works' return doc(concat($config:xsl-collection-path, '/works.xsl')) case 'writings' case 'documents' return doc(concat($config:xsl-collection-path, '/document.xsl')) case 'diaries' return doc(concat($config:xsl-collection-path, '/diaries.xsl')) + case 'sources' return doc(concat($config:xsl-collection-path, '/sources.xsl')) default return doc(concat($config:xsl-collection-path, '/var.xsl')) let $textRoot := switch($docType) @@ -1402,6 +1403,7 @@ declare case 'works' return $doc/mei:mei ! app:inject-query(.) case 'var' case 'addenda' return ($doc//tei:text/tei:body ! app:inject-query(.))/(tei:div[@xml:lang=$lang] | tei:divGen | tei:div[not(@xml:lang)]) case 'thematicCommentaries' return $doc//tei:text/tei:body ! app:inject-query(.) | $doc//tei:text/tei:back + case 'sources' return $doc//tei:text ! app:inject-query(.) default return $doc//tei:text/tei:body ! app:inject-query(.) let $body := if(functx:all-whitespace({$textRoot})) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index ecf392740..240493e27 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -289,3 +289,29 @@ li.listSubTitle { .tei_dateline { display:block; } + +/* libretti */ +.teiSrc_text { + .teiSrc_front { + .tei_titlePage { + text-align: center; + + .tei_titlePart { + display: block; + } + } + .tei_castList { + .tei_castItem { + display: block; + } + } + } + .teiSrc_body { + .tei_caption, .tei_speaker { + display: block; + } + .header-level-act { + font-size: 3rem; + } + } +} diff --git a/xsl/sources.xsl b/xsl/sources.xsl new file mode 100644 index 000000000..94815b4c4 --- /dev/null +++ b/xsl/sources.xsl @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cbe5427c2ea9d4fd4a68b4671a6bcf335f5c42a5 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Mon, 9 Feb 2026 20:06:34 +0100 Subject: [PATCH 05/28] add proof of concept toc for tei sources --- modules/app.xqm | 25 +++++++++++++++++++++++-- resources/sass/components/_tei.scss | 8 ++++++++ templates/document.html | 8 +++++++- xsl/sources.xsl | 8 ++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/modules/app.xqm b/modules/app.xqm index ad6a1a741..f83864668 100644 --- a/modules/app.xqm +++ b/modules/app.xqm @@ -1427,14 +1427,35 @@ declare else ( wega-util:transform($textRoot, $xslt1, $xslParams) ) + let $tocContent := + if ($docType = 'sources') then + element xhtml:ul { + for $h at $pos in $body//xhtml:h2[ + contains-token(string(@class), 'header-level-act') + or contains-token(string(@class), 'header-level-scene') + ] + let $class := string($h/@class) + let $level := if (contains-token($class, 'header-level-act')) then 'act' else 'scene' + let $label := normalize-space(string-join($h//text(), ' ')) + let $id := string($h/@id) + return + element xhtml:li { + attribute class { 'toc-' || $level }, + element xhtml:a { + attribute href { '#' || $id }, + $label + } + } + } + else () let $foot := if(config:is-news($docID)) then app:get-news-foot($doc, $lang) else () - return map { 'transcription' : (wega-util:remove-elements-by-class($body, 'apparatus'),$foot), - 'apparatus' : $body/descendant-or-self::*[@class='apparatus'] + 'apparatus' : $body/descendant-or-self::*[@class='apparatus'], + 'toc-content' : $tocContent } }; diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 240493e27..49ff9006b 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -291,6 +291,14 @@ li.listSubTitle { } /* libretti */ +.toc-act { + font-size: 1.2rem; + font-weight: bold; +} +.toc-scene { + text-indent: 2rem; +} + .teiSrc_text { .teiSrc_front { .tei_titlePage { diff --git a/templates/document.html b/templates/document.html index 69f46356a..7b9da7a61 100644 --- a/templates/document.html +++ b/templates/document.html @@ -173,7 +173,13 @@

-
+
+ +
+

TOC

+
+
+
diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 94815b4c4..fd5e4bc51 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -82,8 +82,16 @@ + + + + From a289e80e5929bd7ab24f55831ac71543feaa9393 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Wed, 11 Feb 2026 16:41:54 +0100 Subject: [PATCH 06/28] add styling for libretti --- resources/sass/components/_tei.scss | 45 +++++++++++++++++++++++++++-- xsl/sources.xsl | 2 +- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 49ff9006b..988e55ff1 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -300,26 +300,65 @@ li.listSubTitle { } .teiSrc_text { + --page-width: 60ch; + --verse-width: 40ch; + --lg-width: 30ch; + + max-width: var(--page-width); + margin: 0 auto; + text-align: center; + .teiSrc_front { .tei_titlePage { - text-align: center; - .tei_titlePart { display: block; + margin: 1.5rem; + line-height: 2.5; } } .tei_castList { + display: block; + line-height: 2; + margin-bottom: 1rem; + .tei_castItem { display: block; + text-align: left; + + .tei_role + .tei_roleDesc::before { + content: " "; + } } } } .teiSrc_body { - .tei_caption, .tei_speaker { + .tei_caption, + .tei_speaker { display: block; } + .srcHeader { + margin-top: 1rem; + } .header-level-act { font-size: 3rem; } + .tei_stage_left { + display: block; + text-align: left; + } + .tei_caption { + font-size: 1.5rem; + margin: 1.2rem; + } + .lg { + max-width: var(--lg-width); + margin: 0 auto; + text-align: left; + } + .verseLine { + max-width: var(--verse-width); + margin: 0 auto; + text-align: left; + } } } diff --git a/xsl/sources.xsl b/xsl/sources.xsl index fd5e4bc51..18c67aaa3 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -92,7 +92,7 @@ - + From f0c12c82536676e84686b59fc1b5d27a11558dda Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Wed, 11 Feb 2026 16:42:09 +0100 Subject: [PATCH 07/28] adjust styling of page breaks for libretti --- resources/sass/components/_tei.scss | 27 +++++++++++++++++++++++++++ xsl/sources.xsl | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 988e55ff1..c9725f070 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -308,6 +308,33 @@ li.listSubTitle { margin: 0 auto; text-align: center; + hr.tei_pb-text { + width: var(--page-width); + max-width: none; + margin: 3rem 0; + position: relative; + left: 50%; + transform: translateX(-50%); + + border: 0; + border-top: 2px solid var(--primary); + border-radius: 5px; + + &::after { + content: attr(data-content); + position: absolute; + left: 50%; + top: 0; + transform: translate(-50%, -50%); + padding: 0 1rem; + + background: #fff; + color: var(--primary); + font-size: .8rem; + font-style: italic; + } + } + .teiSrc_front { .tei_titlePage { .tei_titlePart { diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 18c67aaa3..c8f2ee486 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -97,4 +97,23 @@ + + + + + + + + + + + + +
+ + + + +
+ From ab4b5867958b32b69c2ec7aeb149fd29b6a706eb Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Thu, 12 Feb 2026 11:43:52 +0100 Subject: [PATCH 08/28] create proper toc for sources --- catalogues/dictionary_de.xml | 1 + catalogues/dictionary_en.xml | 1 + modules/app.xqm | 56 +++++++++++++++++------------ resources/sass/layout/_sidebar.scss | 17 +++++++++ templates/document.html | 13 ++++--- xsl/sources.xsl | 6 +--- 6 files changed, 61 insertions(+), 33 deletions(-) diff --git a/catalogues/dictionary_de.xml b/catalogues/dictionary_de.xml index de9148e5b..5bff52621 100644 --- a/catalogues/dictionary_de.xml +++ b/catalogues/dictionary_de.xml @@ -442,6 +442,7 @@ Diese Seite kann in Ihrem Browser nicht korrekt dargestellt werden. Zur besseren Darstellung aktualisieren Sie bitte den Browser. Inhaltsverzeichnis + Inhalt Bibliographie Discographie Literatur diff --git a/catalogues/dictionary_en.xml b/catalogues/dictionary_en.xml index eb89c92e0..22af889af 100644 --- a/catalogues/dictionary_en.xml +++ b/catalogues/dictionary_en.xml @@ -412,6 +412,7 @@ Your Browser doesn't support JavaScript or it is currently disabled. Since our site heavily relies on it we have to apologize for this inconvenience! This Website won't display correctly in your browser. It is necessary to update your browser to display the data correctly. Table of contents + Content Bibliography Discography Literature diff --git a/modules/app.xqm b/modules/app.xqm index f83864668..6324d10c1 100644 --- a/modules/app.xqm +++ b/modules/app.xqm @@ -1427,38 +1427,48 @@ declare else ( wega-util:transform($textRoot, $xslt1, $xslParams) ) - let $tocContent := - if ($docType = 'sources') then - element xhtml:ul { - for $h at $pos in $body//xhtml:h2[ - contains-token(string(@class), 'header-level-act') - or contains-token(string(@class), 'header-level-scene') - ] - let $class := string($h/@class) - let $level := if (contains-token($class, 'header-level-act')) then 'act' else 'scene' - let $label := normalize-space(string-join($h//text(), ' ')) - let $id := string($h/@id) - return - element xhtml:li { - attribute class { 'toc-' || $level }, - element xhtml:a { - attribute href { '#' || $id }, - $label - } - } - } - else () let $foot := if(config:is-news($docID)) then app:get-news-foot($doc, $lang) else () return map { 'transcription' : (wega-util:remove-elements-by-class($body, 'apparatus'),$foot), - 'apparatus' : $body/descendant-or-self::*[@class='apparatus'], - 'toc-content' : $tocContent + 'apparatus' : $body/descendant-or-self::*[@class='apparatus'] } }; +(:~ + : Create a table of contents for acts and scenes of sources + : The anchors are created seperately in sources.xsl + : + : @return an xhtml:ul with a list of anchors, categorized by 'act' or 'scene' + :) +declare function app:doc-toc($node as node(), $model as map(*)) as element()* { + element xhtml:ul { + for $head in $model('doc')//tei:text//tei:head[parent::tei:div[@type = ('act', 'scene')]] + let $parentDiv := $head/parent::tei:div + let $parentDivType := string($parentDiv/@type) + let $act := string($parentDiv/ancestor-or-self::tei:div[@type='act'][1]/@n) + let $scene := string($parentDiv/ancestor-or-self::tei:div[@type='scene'][1]/@n) + + let $id := + if ($parentDivType = 'act') then concat('act-', $act) + else if ($parentDivType = 'scene') then concat('act-', $act, '-scene-', $scene) + else () + + let $label := normalize-space(string-join($head//text(), '')) + where normalize-space($id) != '' and normalize-space($label) != '' + return + element xhtml:li { + attribute class { 'toc-' || (if ($parentDivType='act') then 'act' else 'scene') }, + element xhtml:a { + attribute href { '#' || $id }, + $label + } + } + } +}; + (:~ : Search and highlight query strings in a document : Helper function for app:prepare-text() diff --git a/resources/sass/layout/_sidebar.scss b/resources/sass/layout/_sidebar.scss index f111d2d44..78bb07dec 100644 --- a/resources/sass/layout/_sidebar.scss +++ b/resources/sass/layout/_sidebar.scss @@ -133,6 +133,23 @@ a.checkbox-only { } } +.doc-toc-side { + position: sticky; + top: 2rem; + font-size: smaller; + + .toc-act { + margin-top: .5rem; + font-size: 1.2rem; + font-weight: bold; + } + .toc-scene { + line-height: 1.7; + padding-left: 2.5rem; + text-indent: -1.3rem; + } +} + /* * select2 settings for dropdowns on start page */ diff --git a/templates/document.html b/templates/document.html index 7b9da7a61..851206398 100644 --- a/templates/document.html +++ b/templates/document.html @@ -170,16 +170,19 @@

+
+

+ toc-short +

+
+
+
+
-
-

TOC

-
-
-
diff --git a/xsl/sources.xsl b/xsl/sources.xsl index c8f2ee486..5d7d87e5d 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -84,11 +84,7 @@ - + From 695540bd9ae5030dd616c8248c8bd33d4e666192 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Thu, 12 Feb 2026 11:49:41 +0100 Subject: [PATCH 09/28] fix display for mobile screens --- resources/sass/components/_tei.scss | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index c9725f070..3815f1749 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -291,18 +291,10 @@ li.listSubTitle { } /* libretti */ -.toc-act { - font-size: 1.2rem; - font-weight: bold; -} -.toc-scene { - text-indent: 2rem; -} - .teiSrc_text { - --page-width: 60ch; - --verse-width: 40ch; - --lg-width: 30ch; + --page-width: min(60ch, 92vw); + --verse-width: min(40ch, 92vw); + --lg-width: min(30ch, 92vw); max-width: var(--page-width); margin: 0 auto; From 50edf906014566e3d8cf6c7af42c566770f7eaba Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Thu, 12 Feb 2026 12:09:35 +0100 Subject: [PATCH 10/28] fix minor bug with templating rules which prevented to transform some page breaks --- xsl/sources.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 5d7d87e5d..1b3712d93 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -54,7 +54,7 @@ - + From d930f02f1841825fce7bc6ee2e7ede6a802db87f Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Thu, 12 Feb 2026 13:54:14 +0100 Subject: [PATCH 11/28] styling tweak for speakers --- resources/sass/components/_tei.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 3815f1749..b039de7da 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -369,6 +369,9 @@ li.listSubTitle { font-size: 1.5rem; margin: 1.2rem; } + .tei_speaker{ + font-size: 1.1rem; + } .lg { max-width: var(--lg-width); margin: 0 auto; From 47a2764f14ac709bc8ec224fd609da2139981949 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Sat, 14 Feb 2026 12:30:19 +0100 Subject: [PATCH 12/28] add some inline styling for `.tei_stage` --- resources/sass/components/_tei.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index b039de7da..40b24ab69 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -365,12 +365,23 @@ li.listSubTitle { display: block; text-align: left; } + .tei_stage_right { + display: block; + text-align: right; + } .tei_caption { font-size: 1.5rem; margin: 1.2rem; } .tei_speaker{ font-size: 1.1rem; + &:has(+ .tei_stage_inline) { + display: inline; + } + + .tei_stage_inline { + display: inline; + margin-left: .3em; + } } .lg { max-width: var(--lg-width); From 7ecc329ebda0305ef31134e8d7b4b147c85fa8ba Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Sat, 14 Feb 2026 14:02:59 +0100 Subject: [PATCH 13/28] switch for default active tab for documents depending on the presence of a transcription --- modules/app.xqm | 50 ++++++++++++++++++++++++++++++++--------- templates/document.html | 12 +++++----- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/modules/app.xqm b/modules/app.xqm index 6324d10c1..0b4083138 100644 --- a/modules/app.xqm +++ b/modules/app.xqm @@ -493,6 +493,28 @@ declare } }; +(: + : set the active tab in documents, sources, letters etc. + : switch between text and editorial depending on the presence of a transcription + : + : @author Steffen Astheimer + : @return the input node with adapted class attributes ('active' for nav tabs, 'active in' for tab panes) + :) +declare function app:set-tab-state($node as node(), $model as map(*)) as element() { + let $target := if(exists($node/@href)) then substring-after($node/@href, '#') else string($node/@id) + let $isTabPane := exists($node/@id) + let $isActive := ($target = 'transcription' and $model('hasTranscription')) or ($target = 'editorial' and not($model('hasTranscription'))) + let $newClass := + if($isActive) then string-join((($node/@class, if($isTabPane) then 'in' else ()), 'active'), ' ') + else string($node/@class) + return + element {node-name($node)} { + $node/@*[not(name(.) = 'class')], + attribute class {$newClass}, + templates:process($node/node(), $model) + } +}; + (:~ : set the maximum dates for the IonRangeSlider ~:) @@ -1326,10 +1348,22 @@ declare function app:print-external-data-disclaimer($node as node(), $model as m declare %templates:wrap function app:doc-details($node as node(), $model as map(*)) as map(*) { + let $doc := $model('doc') + let $lang := $model('lang') let $facs := query:facsimile($model?doc) let $localFacsimiles := $facs[tei:graphic][not(@sameAs)] except $facs[tei:graphic[starts-with(@url, 'http')]] let $externalIIIFManifestFacsimiles := $facs[@sameAs] let $IIIFImagesMap := ($localFacsimiles | $externalIIIFManifestFacsimiles) ! app:create-IIIFImagesMap(., $model) + let $docType := $model('docType') + let $textRoot := + switch($docType) + case 'diaries' return $doc/tei:ab ! app:inject-query(.) + case 'works' return $doc/mei:mei ! app:inject-query(.) + case 'var' case 'addenda' return ($doc//tei:text/tei:body ! app:inject-query(.))/(tei:div[@xml:lang=$lang] | tei:divGen | tei:div[not(@xml:lang)]) + case 'thematicCommentaries' return $doc//tei:text/tei:body ! app:inject-query(.) | $doc//tei:text/tei:back + case 'sources' return $doc//tei:text ! app:inject-query(.) + default return $doc//tei:text/tei:body ! app:inject-query(.) + let $hasTranscription := not(functx:all-whitespace({$textRoot})) return map { 'facsimile' : $facs, @@ -1337,6 +1371,8 @@ declare 'externalIIIFManifestFacsimiles' : $externalIIIFManifestFacsimiles, 'IIIFImagesMap': $IIIFImagesMap, 'hasCreation' : exists($model?doc//tei:creation), + 'hasTranscription' : $hasTranscription, + 'textRoot' : $textRoot, 'xml-download-url' : replace(controller:create-url-for-doc($model('doc'), $model('lang')), '\.html', '.xml'), 'thematicCommentaries' : distinct-values($model('doc')//tei:note[@type='thematicCom']/@target/tokenize(., '\s+')), 'backlinks' : wdt:backlinks(())('filter-by-person')($model?docID) @@ -1397,17 +1433,10 @@ declare case 'diaries' return doc(concat($config:xsl-collection-path, '/diaries.xsl')) case 'sources' return doc(concat($config:xsl-collection-path, '/sources.xsl')) default return doc(concat($config:xsl-collection-path, '/var.xsl')) - let $textRoot := - switch($docType) - case 'diaries' return $doc/tei:ab ! app:inject-query(.) - case 'works' return $doc/mei:mei ! app:inject-query(.) - case 'var' case 'addenda' return ($doc//tei:text/tei:body ! app:inject-query(.))/(tei:div[@xml:lang=$lang] | tei:divGen | tei:div[not(@xml:lang)]) - case 'thematicCommentaries' return $doc//tei:text/tei:body ! app:inject-query(.) | $doc//tei:text/tei:back - case 'sources' return $doc//tei:text ! app:inject-query(.) - default return $doc//tei:text/tei:body ! app:inject-query(.) + let $textRoot := $model('textRoot') let $body := - if(functx:all-whitespace({$textRoot})) - then + if(not($model('hasTranscription'))) + then element xhtml:p { attribute class {'notAvailable'}, (: revealed correspondence which has backlinks gets a direct link to the backlinks, see https://github.com/Edirom/WeGA-WebApp/issues/304 :) @@ -1441,6 +1470,7 @@ declare : Create a table of contents for acts and scenes of sources : The anchors are created seperately in sources.xsl : + : @author Steffen Astheimer : @return an xhtml:ul with a list of anchors, categorized by 'act' or 'scene' :) declare function app:doc-toc($node as node(), $model as map(*)) as element()* { diff --git a/templates/document.html b/templates/document.html index 851206398..4efbd17d0 100644 --- a/templates/document.html +++ b/templates/document.html @@ -71,11 +71,11 @@

-
+
-
+
-
+

editorial

-
-

relatedItems

- -
-
-
-

absouluteChronology

-

prevLetters

- -

nextLetters

- +
+
+

+ +

+
+ +
+

relatedItems

+
-
-
-

korrespondenzstelle

+
+
+

absouluteChronology

prevLetters

nextLetters

+
+
+
+

korrespondenzstelle

+

prevLetters

+ +

nextLetters

+ +
@@ -193,6 +195,22 @@

series

WeGA, Briefe, Digitale Edition

--> +
+
+
+

relatedItems

+ +
+
+
+

authors

    From bac91792b3f70c0cfcff7fd14bcd4fb23ac06ca6 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Sat, 14 Feb 2026 18:20:53 +0100 Subject: [PATCH 15/28] add styling for (braced) castGroups --- resources/sass/components/_tei.scss | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 40b24ab69..8e3362dd6 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -348,6 +348,40 @@ li.listSubTitle { content: " "; } } + + [class^="tei_castGroup"] { + display: grid; + grid-template-columns: max-content max-content auto; + align-items: stretch; + column-gap: .5rem; + + + > .tei_castItem { + grid-column: 1; + } + > .tei_roleDesc { + grid-column: 3; + grid-row: 1 / 999; + display: flex; + align-items: center; + justify-content: flex-start; + } + } + .tei_castGroup_braced { + &::before { + content: ""; + grid-column: 2; + grid-row: 1 / 999; + align-self: stretch; + justify-self: center; + /* draw a brace for castGroups */ + width: 1rem; + border: 2px solid #000; + border-left: none; + border-radius: 0 1rem 1rem 0; + margin: .8rem 0; + } + } } } .teiSrc_body { From cd44f3f8c572cd97e12203109e051d57ae43dfce Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Sat, 14 Feb 2026 21:01:42 +0100 Subject: [PATCH 16/28] add styling for braced `spGrp` elements --- resources/sass/components/_tei.scss | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 8e3362dd6..9b33e38d0 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -427,5 +427,33 @@ li.listSubTitle { margin: 0 auto; text-align: left; } + + /* since verseLines are aligned left to a 40ch container, + * we don't use a grid here but push the brace and stage + * direction out of that container by a fixed amount + */ + .tei_spGrp_braced-left { + position: relative; + &::before { + content: ""; + position: absolute; + left: calc(var(--verse-width) / 2 * -1 - 3ch); + top: .8rem; + bottom: .8rem; + width: 1rem; + /* draw a brace for spGrps */ + background: #fff; + border: 2px solid #000; + border-right: none; + border-radius: 1rem 0 0 1rem; + } + .tei_stage_left { + position: absolute; + top: 50%; + left: calc(var(--verse-width) / 2 * -1 - 4ch); + transform: translate(-50%, -50%) rotate(90deg); + transform-origin: center; + } + } } } From 3a50e86fb76861a91b90a582bee8a1c5bd1a7968 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Sun, 15 Feb 2026 02:04:25 +0100 Subject: [PATCH 17/28] refactor layout for libretti logical overhaul for grid and indenting of libretti refactor scss to be compact and understandable more inline adjustments add xslt templates for source-relevant attributes --- resources/sass/components/_tei.scss | 142 ++++++++++++++++++++-------- xsl/sources.xsl | 22 ++++- 2 files changed, 124 insertions(+), 40 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 9b33e38d0..f67382a4d 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -115,10 +115,6 @@ div.poem h3 { text-align: center; } -.verseLine { - display: block; -} - .tei_code { font-family: monospace; } @@ -292,14 +288,14 @@ li.listSubTitle { /* libretti */ .teiSrc_text { - --page-width: min(60ch, 92vw); - --verse-width: min(40ch, 92vw); - --lg-width: min(30ch, 92vw); + --page-width: min(50ch, 92vw); + --indent: 5ch; max-width: var(--page-width); margin: 0 auto; text-align: center; + /* styling for page breaks – a mix from WeGA diaries and HenDi page breaks */ hr.tei_pb-text { width: var(--page-width); max-width: none; @@ -327,21 +323,30 @@ li.listSubTitle { } } + /* some block level elements */ + .tei_titlePart, + .tei_castList, + .tei_castItem, + .tei_caption, + .tei_speaker, + [class^="lg"], + [class^="verseLine"], + [class^="tei_stage"] { + display: block; + } + .teiSrc_front { .tei_titlePage { .tei_titlePart { - display: block; margin: 1.5rem; line-height: 2.5; } } .tei_castList { - display: block; line-height: 2; margin-bottom: 1rem; .tei_castItem { - display: block; text-align: left; .tei_role + .tei_roleDesc::before { @@ -349,13 +354,13 @@ li.listSubTitle { } } + /* styling for cast groups with optional brackets to the right */ [class^="tei_castGroup"] { display: grid; grid-template-columns: max-content max-content auto; align-items: stretch; column-gap: .5rem; - > .tei_castItem { grid-column: 1; } @@ -384,10 +389,75 @@ li.listSubTitle { } } } + .teiSrc_body { - .tei_caption, - .tei_speaker { - display: block; + /* general page layout, spacing, and indenting */ + .tei_sp { + [class^="lg"] { + margin: 0 auto; + text-align: left; + white-space: nowrap; + &:has(+ [class^="lg"]) { + margin-bottom: 2rem; + } + /* indenting especially for verseLines inside of lg */ + &[class*="indent"] { + &[class$="-1"] > * { + max-width: calc(var(--page-width) - (2 * var(--indent))); + } + &[class$="-2"] > * { + max-width: calc(var(--page-width) - (4 * var(--indent))); + } + &[class$="-3"] > * { + max-width: calc(var(--page-width) - (6 * var(--indent))); + } + } + } + /* indenting for verseLines that are not inside of lgs here*/ + [class^="verseLine"] { + margin: 0 auto; + text-align: left; + white-space: nowrap; + max-width: calc(var(--page-width) - (2 * var(--indent))); + + /* quite hacky approach to displaying 'middle' and 'final' parts of verseLines + * basically there are two offsets on which the verseLines are aligned centrally */ + &[class$="-F"] { + transform: translateX(-50%); + text-align: center; + margin-left: calc(var(--page-width) / 2); + white-space: nowrap; + } + &[class$="-M"] { + transform: translateX(-50%); + text-align: center; + margin-left: calc(var(--page-width) / 3); + white-space: nowrap; + } + &[class*="indent"] { + &[class$="-1"] { + text-indent: var(--indent); + } + &[class$="-2"] { + text-indent: calc(var(--indent) * 2); + } + &[class$="-3"] { + text-indent: calc(var(--indent) * 3); + } + } + } + } + + /* some more font sizes, margins and adjustments */ + [class^="tei_stage"] { + font-size: .9rem; + &[class$="_left"] { + text-align: justify; + text-align-last: center; + } + &[class$="_right"] { + text-align: right; + } } .srcHeader { margin-top: 1rem; @@ -395,49 +465,45 @@ li.listSubTitle { .header-level-act { font-size: 3rem; } - .tei_stage_left { - display: block; - text-align: left; - } - .tei_stage_right { - display: block; - text-align: right; - } .tei_caption { font-size: 1.5rem; - margin: 1.2rem; + margin: .8rem 0; } - .tei_speaker{ + .tei_speaker { font-size: 1.1rem; - &:has(+ .tei_stage_inline) { - display: inline; - } + margin: .3rem 0; + } + + + /* inline elements */ + .tei_speaker:has(+ .tei_stage_inline) { + display: inline; + .tei_stage_inline { display: inline; margin-left: .3em; } } - .lg { - max-width: var(--lg-width); - margin: 0 auto; - text-align: left; - } - .verseLine { - max-width: var(--verse-width); - margin: 0 auto; + [class^="verseLine"]:has(> .tei_stage_inline) { + display: inline-block; text-align: left; + width: 100%; + > .tei_stage_inline { + display: inline; + } } - /* since verseLines are aligned left to a 40ch container, + /* styling for spGrps with brackets + * + * (since verseLines are aligned left to a 40ch container, * we don't use a grid here but push the brace and stage - * direction out of that container by a fixed amount + * direction out of that container by a fixed amount) */ .tei_spGrp_braced-left { position: relative; &::before { content: ""; position: absolute; - left: calc(var(--verse-width) / 2 * -1 - 3ch); + left: calc(var(--page-width) / 2 * -1 + calc(var(--indent)) - 3ch); /* caveat: depends on the current indent */ top: .8rem; bottom: .8rem; width: 1rem; diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 1b3712d93..3c319b4e8 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -38,8 +38,7 @@ - - + @@ -112,4 +111,23 @@ + + + + + + + + + + + + + + + + From 37295606620a030f734c60cfe4bb17422e4df9eb Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Thu, 19 Feb 2026 15:27:06 +0100 Subject: [PATCH 18/28] improve sources toc - call app:prepare-text() earlier to make the transformed transcription available for querying from the sidebar - rewrite the tei:head transformation to include all heads and give them unique anchors and correct nesting - rewrite app:doc-toc() to create toc-items from the already transformed html tree --- modules/app.xqm | 29 ++++++++++++----------------- resources/sass/layout/_sidebar.scss | 13 ++++++++----- templates/document.html | 4 ++-- xsl/common_funcs.xsl | 8 ++++++++ xsl/sources.xsl | 12 +++++++----- 5 files changed, 37 insertions(+), 29 deletions(-) diff --git a/modules/app.xqm b/modules/app.xqm index 0b4083138..0ca6b481e 100644 --- a/modules/app.xqm +++ b/modules/app.xqm @@ -1467,30 +1467,25 @@ declare }; (:~ - : Create a table of contents for acts and scenes of sources - : The anchors are created seperately in sources.xsl + : Create a table of contents for nested headers of sources + : based on the sources.xsl transformation from app:prepare-text()#2 : : @author Steffen Astheimer - : @return an xhtml:ul with a list of anchors, categorized by 'act' or 'scene' + : @return an xhtml:ul with a list of anchors, categorized by header nesting level :) declare function app:doc-toc($node as node(), $model as map(*)) as element()* { element xhtml:ul { - for $head in $model('doc')//tei:text//tei:head[parent::tei:div[@type = ('act', 'scene')]] - let $parentDiv := $head/parent::tei:div - let $parentDivType := string($parentDiv/@type) - let $act := string($parentDiv/ancestor-or-self::tei:div[@type='act'][1]/@n) - let $scene := string($parentDiv/ancestor-or-self::tei:div[@type='scene'][1]/@n) - - let $id := - if ($parentDivType = 'act') then concat('act-', $act) - else if ($parentDivType = 'scene') then concat('act-', $act, '-scene-', $scene) - else () - - let $label := normalize-space(string-join($head//text(), '')) - where normalize-space($id) != '' and normalize-space($label) != '' + for $head in $model('transcription')//xhtml:h2[contains-token(@class, 'srcHeader')] + let $classTokens := tokenize(normalize-space(string($head/@class)), '\s+') + let $levelToken := ($classTokens[starts-with(., 'header-level-')])[1] + let $level := if ($levelToken) then substring-after($levelToken, 'header-level-') else '1' + let $tocClass := 'toc-level-' || $level + let $id := normalize-space(string($head/@id)) + let $label := normalize-space(string-join($head//text()[not(ancestor::xhtml:a)], '')) + where $id != '' and $label != '' return element xhtml:li { - attribute class { 'toc-' || (if ($parentDivType='act') then 'act' else 'scene') }, + attribute class { $tocClass }, element xhtml:a { attribute href { '#' || $id }, $label diff --git a/resources/sass/layout/_sidebar.scss b/resources/sass/layout/_sidebar.scss index 78bb07dec..9b2487320 100644 --- a/resources/sass/layout/_sidebar.scss +++ b/resources/sass/layout/_sidebar.scss @@ -138,15 +138,18 @@ a.checkbox-only { top: 2rem; font-size: smaller; - .toc-act { + .doc-toc-side-panel { + height: 90vh; + overflow-y: scroll; + } + .toc-level-1 { margin-top: .5rem; font-size: 1.2rem; font-weight: bold; } - .toc-scene { - line-height: 1.7; - padding-left: 2.5rem; - text-indent: -1.3rem; + .toc-level-2 { + padding: .1rem 0; + padding-left: 1rem; } } diff --git a/templates/document.html b/templates/document.html index e03036984..c2fdaa062 100644 --- a/templates/document.html +++ b/templates/document.html @@ -53,7 +53,7 @@

    CARL MARIA VON WEBER AN

-
+
@@ -181,7 +181,7 @@

-
+
diff --git a/xsl/common_funcs.xsl b/xsl/common_funcs.xsl index 5f94697bd..971b53333 100644 --- a/xsl/common_funcs.xsl +++ b/xsl/common_funcs.xsl @@ -443,6 +443,14 @@ + + + + + + diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 3c319b4e8..6112d1c28 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -80,14 +80,16 @@ - - - - + + + + + + - + From 11d05b348a8ba07644b6f4ccb78788d00423b3e2 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Thu, 5 Mar 2026 19:37:04 +0100 Subject: [PATCH 19/28] further improvements of the sources view - regularized page width - indenting for various elements up to indent-5 - paragraphs by default justified - new logic to differentiate between pages and leafs in breaks - fixed lineGroup bracketing - whitespace between two following `` elements --- resources/sass/components/_tei.scss | 106 ++++++++++++++-------------- xsl/sources.xsl | 9 ++- 2 files changed, 61 insertions(+), 54 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index f67382a4d..af3f3a83e 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -311,6 +311,7 @@ li.listSubTitle { &::after { content: attr(data-content); position: absolute; + text-indent: initial; left: 50%; top: 0; transform: translate(-50%, -50%); @@ -334,6 +335,14 @@ li.listSubTitle { [class^="tei_stage"] { display: block; } + + /* some default alignment overwrite */ + p { + text-align: justify; + } + .tei_subst + .tei_subst::before { + content: " "; + } .teiSrc_front { .tei_titlePage { @@ -396,54 +405,25 @@ li.listSubTitle { [class^="lg"] { margin: 0 auto; text-align: left; - white-space: nowrap; &:has(+ [class^="lg"]) { margin-bottom: 2rem; } - /* indenting especially for verseLines inside of lg */ - &[class*="indent"] { - &[class$="-1"] > * { - max-width: calc(var(--page-width) - (2 * var(--indent))); - } - &[class$="-2"] > * { - max-width: calc(var(--page-width) - (4 * var(--indent))); - } - &[class$="-3"] > * { - max-width: calc(var(--page-width) - (6 * var(--indent))); - } - } } - /* indenting for verseLines that are not inside of lgs here*/ + + /* quite hacky approach to displaying 'middle' and 'final' parts of verseLines + * basically there are two offsets on which the verseLines are aligned centrally */ [class^="verseLine"] { margin: 0 auto; text-align: left; - white-space: nowrap; - max-width: calc(var(--page-width) - (2 * var(--indent))); - - /* quite hacky approach to displaying 'middle' and 'final' parts of verseLines - * basically there are two offsets on which the verseLines are aligned centrally */ &[class$="-F"] { transform: translateX(-50%); text-align: center; margin-left: calc(var(--page-width) / 2); - white-space: nowrap; } &[class$="-M"] { transform: translateX(-50%); text-align: center; margin-left: calc(var(--page-width) / 3); - white-space: nowrap; - } - &[class*="indent"] { - &[class$="-1"] { - text-indent: var(--indent); - } - &[class$="-2"] { - text-indent: calc(var(--indent) * 2); - } - &[class$="-3"] { - text-indent: calc(var(--indent) * 3); - } } } } @@ -453,7 +433,6 @@ li.listSubTitle { font-size: .9rem; &[class$="_left"] { text-align: justify; - text-align-last: center; } &[class$="_right"] { text-align: right; @@ -473,7 +452,25 @@ li.listSubTitle { font-size: 1.1rem; margin: .3rem 0; } - + + /* indenting up to indent-5 */ + [class*="indent"] { + &[class$="-1"] { + text-indent: var(--indent); + } + &[class$="-2"] { + text-indent: calc(var(--indent) * 2); + } + &[class$="-3"] { + text-indent: calc(var(--indent) * 3); + } + &[class$="-4"] > * { + text-indent: calc(var(--indent) * 4); + } + &[class$="-5"] > * { + text-indent: calc(var(--indent) * 5); + } + } /* inline elements */ .tei_speaker:has(+ .tei_stage_inline) { @@ -492,34 +489,37 @@ li.listSubTitle { } } - /* styling for spGrps with brackets - * - * (since verseLines are aligned left to a 40ch container, - * we don't use a grid here but push the brace and stage - * direction out of that container by a fixed amount) - */ + /* styling for spGrps with brackets */ .tei_spGrp_braced-left { - position: relative; + display: grid; + grid-template-columns: max-content max-content auto; + align-items: stretch; + column-gap: .5rem; + + > .tei_sp { + grid-column: 3; + } + > .tei_stage_left { + grid-column: 1; + grid-row: 1 / 999; + display: flex; + align-items: center; + justify-content: center; + writing-mode: vertical-rl; + } &::before { content: ""; - position: absolute; - left: calc(var(--page-width) / 2 * -1 + calc(var(--indent)) - 3ch); /* caveat: depends on the current indent */ - top: .8rem; - bottom: .8rem; - width: 1rem; + grid-column: 2; + grid-row: 1 / 999; + align-self: stretch; + justify-self: center; /* draw a brace for spGrps */ + width: 1rem; background: #fff; border: 2px solid #000; border-right: none; border-radius: 1rem 0 0 1rem; } - .tei_stage_left { - position: absolute; - top: 50%; - left: calc(var(--verse-width) / 2 * -1 - 4ch); - transform: translate(-50%, -50%) rotate(90deg); - transform-origin: center; - } } } } diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 6112d1c28..8d1e6d159 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -99,7 +99,14 @@ - + + + + + + + + From 2965e64147bc3ac29ed1336382cbea7d337ed85e Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Fri, 6 Mar 2026 13:18:03 +0100 Subject: [PATCH 20/28] make indenting of `` and `` stack --- resources/sass/components/_tei.scss | 55 +++++++++++++++++++---------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index af3f3a83e..a4c9d45e6 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -408,6 +408,24 @@ li.listSubTitle { &:has(+ [class^="lg"]) { margin-bottom: 2rem; } + /* indenting for lg up to indent-5 */ + &[class*="indent"] { + &[class$="-1"] { + margin-left: var(--indent); + } + &[class$="-2"] { + margin-left: calc(var(--indent) * 2); + } + &[class$="-3"] { + margin-left: calc(var(--indent) * 3); + } + &[class$="-4"] > * { + margin-left: calc(var(--indent) * 4); + } + &[class$="-5"] > * { + margin-left: calc(var(--indent) * 5); + } + } } /* quite hacky approach to displaying 'middle' and 'final' parts of verseLines @@ -425,6 +443,24 @@ li.listSubTitle { text-align: center; margin-left: calc(var(--page-width) / 3); } + /* indenting for verseLines up to indent-5 */ + &[class*="indent"] { + &[class$="-1"] { + text-indent: var(--indent); + } + &[class$="-2"] { + text-indent: calc(var(--indent) * 2); + } + &[class$="-3"] { + text-indent: calc(var(--indent) * 3); + } + &[class$="-4"] > * { + text-indent: calc(var(--indent) * 4); + } + &[class$="-5"] > * { + text-indent: calc(var(--indent) * 5); + } + } } } @@ -452,25 +488,6 @@ li.listSubTitle { font-size: 1.1rem; margin: .3rem 0; } - - /* indenting up to indent-5 */ - [class*="indent"] { - &[class$="-1"] { - text-indent: var(--indent); - } - &[class$="-2"] { - text-indent: calc(var(--indent) * 2); - } - &[class$="-3"] { - text-indent: calc(var(--indent) * 3); - } - &[class$="-4"] > * { - text-indent: calc(var(--indent) * 4); - } - &[class$="-5"] > * { - text-indent: calc(var(--indent) * 5); - } - } /* inline elements */ .tei_speaker:has(+ .tei_stage_inline) { From d39021edf7ef92bd6857ae8b088982079270044f Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Fri, 6 Mar 2026 14:40:24 +0100 Subject: [PATCH 21/28] fix indenting for `` and placement of '-M' and '-F' blocks --- resources/sass/components/_tei.scss | 76 ++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index a4c9d45e6..8076c6ea3 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -94,7 +94,7 @@ $tei_list-indent: $font-size-base; } div.poem { - margin: 0.5pc 0em 0.5pc 10%; + margin: 0.5pc 0em 0.5pc 10%; } div.poem h2 { @@ -167,9 +167,9 @@ li.listSubTitle { } } -/* - und werden als 'block' gesetzt, - damit die Textausrichtung (s.u.) modifiziert werden kann +/* + und werden als 'block' gesetzt, + damit die Textausrichtung (s.u.) modifiziert werden kann */ .tei_signed, .tei_segBlock { display: block; @@ -187,8 +187,8 @@ li.listSubTitle { text-align: left; } -/* set titles of biblio entries in italics and - * set neste tei_hi_italic in normal shape +/* set titles of biblio entries in italics and + * set neste tei_hi_italic in normal shape */ .biblio-entry { .title, .journalTitle, .collectionTitle { @@ -239,7 +239,7 @@ li.listSubTitle { } /* - * address within div/@type="address" + * address within div/@type="address" */ .teiLetter_address { margin-bottom:$line-height-computed; @@ -247,7 +247,7 @@ li.listSubTitle { } /* - * address within closer + * address within closer */ .tei_closer .tei_address { margin-top:$line-height-computed; @@ -290,11 +290,13 @@ li.listSubTitle { .teiSrc_text { --page-width: min(50ch, 92vw); --indent: 5ch; + --lg-indent-amount: 0; + --l-indent-amount: 0; max-width: var(--page-width); margin: 0 auto; text-align: center; - + /* styling for page breaks – a mix from WeGA diaries and HenDi page breaks */ hr.tei_pb-text { width: var(--page-width); @@ -303,11 +305,11 @@ li.listSubTitle { position: relative; left: 50%; transform: translateX(-50%); - + border: 0; border-top: 2px solid var(--primary); border-radius: 5px; - + &::after { content: attr(data-content); position: absolute; @@ -316,19 +318,19 @@ li.listSubTitle { top: 0; transform: translate(-50%, -50%); padding: 0 1rem; - + background: #fff; color: var(--primary); font-size: .8rem; font-style: italic; } } - + /* some block level elements */ .tei_titlePart, .tei_castList, .tei_castItem, - .tei_caption, + .tei_caption, .tei_speaker, [class^="lg"], [class^="verseLine"], @@ -343,7 +345,7 @@ li.listSubTitle { .tei_subst + .tei_subst::before { content: " "; } - + .teiSrc_front { .tei_titlePage { .tei_titlePart { @@ -354,22 +356,22 @@ li.listSubTitle { .tei_castList { line-height: 2; margin-bottom: 1rem; - + .tei_castItem { text-align: left; - + .tei_role + .tei_roleDesc::before { content: " "; } } - + /* styling for cast groups with optional brackets to the right */ [class^="tei_castGroup"] { display: grid; grid-template-columns: max-content max-content auto; align-items: stretch; column-gap: .5rem; - + > .tei_castItem { grid-column: 1; } @@ -398,7 +400,7 @@ li.listSubTitle { } } } - + .teiSrc_body { /* general page layout, spacing, and indenting */ .tei_sp { @@ -408,22 +410,22 @@ li.listSubTitle { &:has(+ [class^="lg"]) { margin-bottom: 2rem; } - /* indenting for lg up to indent-5 */ + /* set lg indent modifier up to indent-5 */ &[class*="indent"] { &[class$="-1"] { - margin-left: var(--indent); + --lg-indent-amount: 1; } &[class$="-2"] { - margin-left: calc(var(--indent) * 2); + --lg-indent-amount: 2; } &[class$="-3"] { - margin-left: calc(var(--indent) * 3); + --lg-indent-amount: 3; } &[class$="-4"] > * { - margin-left: calc(var(--indent) * 4); + --lg-indent-amount: 4; } &[class$="-5"] > * { - margin-left: calc(var(--indent) * 5); + --lg-indent-amount: 5; } } } @@ -433,34 +435,32 @@ li.listSubTitle { [class^="verseLine"] { margin: 0 auto; text-align: left; - &[class$="-F"] { - transform: translateX(-50%); - text-align: center; - margin-left: calc(var(--page-width) / 2); - } &[class$="-M"] { - transform: translateX(-50%); + margin-left: calc(var(--page-width) / 4); + } + &[class$="-F"] { + margin-left: calc(var(--page-width) / 4); text-align: center; - margin-left: calc(var(--page-width) / 3); } /* indenting for verseLines up to indent-5 */ &[class*="indent"] { &[class$="-1"] { - text-indent: var(--indent); + --l-indent-amount: 1; } &[class$="-2"] { - text-indent: calc(var(--indent) * 2); + --l-indent-amount: 2; } &[class$="-3"] { - text-indent: calc(var(--indent) * 3); + --l-indent-amount: 3; } &[class$="-4"] > * { - text-indent: calc(var(--indent) * 4); + --l-indent-amount: 4; } &[class$="-5"] > * { - text-indent: calc(var(--indent) * 5); + --l-indent-amount: 5; } } + text-indent: calc((var(--indent) * var(--l-indent-amount)) + (var(--indent) * var(--lg-indent-amount))); } } From 416cb6df7696a2cab39d39cc1c99fe377d884cc9 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Fri, 6 Mar 2026 14:55:40 +0100 Subject: [PATCH 22/28] add exception for indenting + line parts --- resources/sass/components/_tei.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 8076c6ea3..69c7a9c9f 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -435,10 +435,12 @@ li.listSubTitle { [class^="verseLine"] { margin: 0 auto; text-align: left; - &[class$="-M"] { + &[class$="-M"], + &[class*="-M-"] { margin-left: calc(var(--page-width) / 4); } - &[class$="-F"] { + &[class$="-F"], + &[class*="-F-"] { margin-left: calc(var(--page-width) / 4); text-align: center; } From 2603fc518079fe276eb116168efe5c2163827578 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Tue, 24 Mar 2026 12:10:02 +0100 Subject: [PATCH 23/28] add value 'source' to link creation for `` --- xsl/common_link.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xsl/common_link.xsl b/xsl/common_link.xsl index 3d64aa0ba..382ccd57a 100644 --- a/xsl/common_link.xsl +++ b/xsl/common_link.xsl @@ -40,7 +40,7 @@ - + From 44a3129b9b08f6f549c42ad24ecb086701668cca Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Tue, 14 Apr 2026 15:18:48 +0200 Subject: [PATCH 24/28] prohibit indenting on mobile screens --- resources/sass/components/_tei.scss | 36 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index 69c7a9c9f..bf6ff8687 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -444,25 +444,27 @@ li.listSubTitle { margin-left: calc(var(--page-width) / 4); text-align: center; } - /* indenting for verseLines up to indent-5 */ - &[class*="indent"] { - &[class$="-1"] { - --l-indent-amount: 1; - } - &[class$="-2"] { - --l-indent-amount: 2; - } - &[class$="-3"] { - --l-indent-amount: 3; - } - &[class$="-4"] > * { - --l-indent-amount: 4; - } - &[class$="-5"] > * { - --l-indent-amount: 5; + /* indenting for verseLines up to indent-5 (only on big screens) */ + @media (min-width: 530px) { + &[class*="indent"] { + &[class$="-1"] { + --l-indent-amount: 1; + } + &[class$="-2"] { + --l-indent-amount: 2; + } + &[class$="-3"] { + --l-indent-amount: 3; + } + &[class$="-4"] > * { + --l-indent-amount: 4; + } + &[class$="-5"] > * { + --l-indent-amount: 5; + } } + text-indent: calc((var(--indent) * var(--l-indent-amount)) + (var(--indent) * var(--lg-indent-amount))); } - text-indent: calc((var(--indent) * var(--l-indent-amount)) + (var(--indent) * var(--lg-indent-amount))); } } From 73bd4976769c27ba7e4bda75f935c94839dcaf2f Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Tue, 14 Apr 2026 16:27:44 +0200 Subject: [PATCH 25/28] ignore VS Code synchronizer --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 06a9286c4..a281d2df8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,5 +5,6 @@ dist local.build.properties node_modules libs +.existdb.json .github **/.DS_Store From 9d53f53ac924061f6e1a41692609f82c8fd12f26 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Tue, 14 Apr 2026 17:37:20 +0200 Subject: [PATCH 26/28] add apparatus logic for `` --- catalogues/dictionary_de.xml | 1 + catalogues/dictionary_en.xml | 1 + xsl/apparatus.xsl | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/catalogues/dictionary_de.xml b/catalogues/dictionary_de.xml index 5bff52621..a37fe94eb 100644 --- a/catalogues/dictionary_de.xml +++ b/catalogues/dictionary_de.xml @@ -149,6 +149,7 @@ überschrieben durchgestrichen und ersetzt mit überschrieben mit + durch Nummerierung der Wörter umgestellt zu gelöscht in der Vorlage weitere mögliche Lesungen diff --git a/catalogues/dictionary_en.xml b/catalogues/dictionary_en.xml index 22af889af..26c21a0d5 100644 --- a/catalogues/dictionary_en.xml +++ b/catalogues/dictionary_en.xml @@ -147,6 +147,7 @@ overwritten crossed out and replaced with overwritten with + by numbering the words rearranged to erased in the copy text further possible transcriptions diff --git a/xsl/apparatus.xsl b/xsl/apparatus.xsl index 87afb39e7..a32e37ff2 100644 --- a/xsl/apparatus.xsl +++ b/xsl/apparatus.xsl @@ -236,6 +236,13 @@ + + + + + + + From 90510931487cd280087df7a44aaefc642fe4886b Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Wed, 20 May 2026 14:28:14 +0200 Subject: [PATCH 27/28] include transformation and display for actors and leader dots --- resources/sass/components/_tei.scss | 45 ++++++++++++++++++++++++----- xsl/sources.xsl | 16 ++++++++++ 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/resources/sass/components/_tei.scss b/resources/sass/components/_tei.scss index bf6ff8687..43471cdd3 100644 --- a/resources/sass/components/_tei.scss +++ b/resources/sass/components/_tei.scss @@ -329,7 +329,6 @@ li.listSubTitle { /* some block level elements */ .tei_titlePart, .tei_castList, - .tei_castItem, .tei_caption, .tei_speaker, [class^="lg"], @@ -354,28 +353,58 @@ li.listSubTitle { } } .tei_castList { + position: relative; line-height: 2; margin-bottom: 1rem; .tei_castItem { + display: grid; + grid-template-columns: auto auto 1fr auto; + column-gap: .4em; + width: 100%; text-align: left; - .tei_role + .tei_roleDesc::before { - content: " "; + .tei_role { + grid-column: 1; + } + .tei_roleDesc { + grid-column: 2; + } + .tei_leader_dots { + grid-column: 3; + border-bottom: 2.5px dotted; + transform: translateY(-0.5em); + } + .tei_actor { + grid-column: 4; + justify-self: end; } } /* styling for cast groups with optional brackets to the right */ [class^="tei_castGroup"] { display: grid; - grid-template-columns: max-content max-content auto; - align-items: stretch; - column-gap: .5rem; + grid-template-columns: auto auto auto 1fr auto; + column-gap: .4rem; + width: 100%; > .tei_castItem { - grid-column: 1; + display: contents; + + .tei_role { + grid-column: 1 + } + .tei_leader_dots { + grid-column: 4; + border-bottom: 2.5px dotted; + transform: translateY(-0.5em); + } + .tei_actor { + grid-column: 5; + justify-self: end; + } } - > .tei_roleDesc { + .tei_roleDesc { grid-column: 3; grid-row: 1 / 999; display: flex; diff --git a/xsl/sources.xsl b/xsl/sources.xsl index 8d1e6d159..0430f5055 100644 --- a/xsl/sources.xsl +++ b/xsl/sources.xsl @@ -138,5 +138,21 @@ + + + + + + + + + + + + + + + + From 86e3c9662d47418d1101b2c2be97501846721aa0 Mon Sep 17 00:00:00 2001 From: SteffenAstheimer Date: Wed, 20 May 2026 16:33:09 +0200 Subject: [PATCH 28/28] display responsibility in text constitution --- catalogues/dictionary_de.xml | 4 + catalogues/dictionary_en.xml | 6 +- resources/sass/components/_popover.scss | 12 + resources/sass/pages/_apparatus.scss | 4 + xsl/apparatus.xsl | 340 ++++++++++++++++++++++-- 5 files changed, 349 insertions(+), 17 deletions(-) diff --git a/catalogues/dictionary_de.xml b/catalogues/dictionary_de.xml index a37fe94eb..9a63237dd 100644 --- a/catalogues/dictionary_de.xml +++ b/catalogues/dictionary_de.xml @@ -151,6 +151,10 @@ überschrieben mit durch Nummerierung der Wörter umgestellt zu gelöscht + Hand + Hände + Haupthand + Weitere Hände in der Vorlage weitere mögliche Lesungen Abk. von diff --git a/catalogues/dictionary_en.xml b/catalogues/dictionary_en.xml index 26c21a0d5..3a5fa7118 100644 --- a/catalogues/dictionary_en.xml +++ b/catalogues/dictionary_en.xml @@ -149,6 +149,10 @@ overwritten with by numbering the words rearranged to erased + Hand + Hands + Main hand + Further hands in the copy text further possible transcriptions Abbreviation @@ -653,4 +657,4 @@ Mountain, Hill, Rock Forest, Heath WeGA full texts - \ No newline at end of file + diff --git a/resources/sass/components/_popover.scss b/resources/sass/components/_popover.scss index b9e4e9b2f..52bb970ff 100644 --- a/resources/sass/components/_popover.scss +++ b/resources/sass/components/_popover.scss @@ -44,6 +44,18 @@ float:left; margin-bottom: 4px; } + .hand { + display: block; + margin-top: 6px; + font-style: italic; + font-size: .7rem; + &::before { + content: "("; + } + &::after { + content: ")"; + } + } } .carousel-indicators { bottom: -45px!important; diff --git a/resources/sass/pages/_apparatus.scss b/resources/sass/pages/_apparatus.scss index a0fc09c2d..935c3cfcc 100644 --- a/resources/sass/pages/_apparatus.scss +++ b/resources/sass/pages/_apparatus.scss @@ -40,6 +40,10 @@ ul.apparatus > li { border-top:1px solid $gray-lighter; padding: 6px 0 6px 12px; margin-bottom:0; + + .apparatusEntry span.hand { + display: none; + } } /* diff --git a/xsl/apparatus.xsl b/xsl/apparatus.xsl index a32e37ff2..e9b31cd5e 100644 --- a/xsl/apparatus.xsl +++ b/xsl/apparatus.xsl @@ -11,6 +11,7 @@ +