diff --git a/py/remove_namespace.py b/py/remove_namespace.py index 4faa69e..d4f08b7 100644 --- a/py/remove_namespace.py +++ b/py/remove_namespace.py @@ -2,6 +2,7 @@ import os import tqdm from acdh_tei_pyutils.tei import TeiReader +from lxml import etree as ET SOURCE_DIR = 'data/editions' @@ -42,25 +43,30 @@ def handle_pb_with_lb_break(file): def add_graphic_url(file): doc = TeiReader(file) - surface = doc.any_xpath('//tei:facsimile//tei:surface') + surface = doc.any_xpath('//tei:facsimile[@corresp="#DWkonJer"]/tei:surface') count = 0 for i, s in enumerate(surface): id = s.get('{http://www.w3.org/XML/1998/namespace}id') if id is not None and '_' in id: if "F" in id or "-" in id or "266_a" in id: continue + # count is only required for special cases when sequence needs to be adjusted count += 1 idInteger = id.replace('idfacs', '').split('_')[0] if idInteger is not None: + s.attrib["n"] = str(i + 1) new_id = int(idInteger) + count url = f'iiif/images/wpn/{new_id:04d}' graphic = s.find('tei:graphic', namespaces=NSMAP) if graphic is not None: graphic.set('url', url) else: - print(f'No graphic found for surface {i}') + print(f'No graphic found for surface {i}. Creating one.') + graphic = ET.Element('graphic', attrib={'url': url}) + s.append(graphic) else: print(f'No id found for surface {i}') + doc.tree_to_file(file) diff --git a/scss/style.scss b/scss/style.scss index 2202817..5ad45ae 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -615,18 +615,22 @@ wpn-detail-view:has(span[data-bs-toggle="popover"]:hover) details:not([open]) .s margin-bottom: $spacer * 0.5; } -#textcontent-pb .longQuoteVerse, -#textcontent-pb .inkLongQuoteVerse, -#textcontent-pb .typescriptLongQuoteVerse, -#textcontent-pb .typescriptLongQuoteVerseLeading, #textcontent-pb .longQuoteVerseStart, #textcontent-pb .longQuoteVerseEnd, -#textcontent-pb .longQuoteVerseMiddle { +#textcontent-pb .longQuoteVerseMiddle, +#textcontent-pb .inkLongQuoteVerse, +#textcontent-pb .typescriptLongQuoteVerse, +#textcontent-pb .typescriptLongQuoteVerseLeading { text-align-last: left; text-align: left; text-indent: 30px; } +#textcontent-pb .longQuoteVerse { + text-align-last: left; + text-align: left; +} + #textcontent-pb .longQuoteVerse { word-spacing: .2rem; } @@ -638,7 +642,6 @@ wpn-detail-view:has(span[data-bs-toggle="popover"]:hover) details:not([open]) .s } #textcontent-pb .longQuoteMiddleCenter, -#textcontent-pb .longQuoteVerseCenter, #textcontent-pb .typescriptLongQuoteTitle, #textcontent-pb .typescriptLongQuoteTitle2, #textcontent-pb .typescriptLongQuoteAdvInsert, @@ -648,6 +651,21 @@ wpn-detail-view:has(span[data-bs-toggle="popover"]:hover) details:not([open]) .s text-align: center; } +#textcontent-pb .longQuoteVerseCenter { + margin-left: $spacer * 7 !important; + text-align: left; + text-align-last: left; +} + +#textcontent-pb .longQuoteVerseCenter .l { + width:100%; + margin: 0; +} + +// #textcontent-pb .longQuoteVerseStart .l, +// #textcontent-pb .longQuoteVerseEnd .l, +// #textcontent-pb .longQuoteVerseMiddle .l + #edition-view #sub_grid_pb { display:grid; grid-template-columns: calc(100% * 0.4) calc(100% * 0.4) calc(100% * 0.2); diff --git a/wpn-utils/wpn-typo-infobox-dropdown.ts b/wpn-utils/wpn-typo-infobox-dropdown.ts new file mode 100644 index 0000000..695724f --- /dev/null +++ b/wpn-utils/wpn-typo-infobox-dropdown.ts @@ -0,0 +1,6 @@ +const btn = document.getElementById("btn_more_text_layers"); + +btn?.addEventListener("click", () => { + const dropdown = document.getElementById("list_more_text_layers"); + dropdown?.classList.toggle("fade"); +}); \ No newline at end of file diff --git a/xslt/editions_typo.xsl b/xslt/editions_typo.xsl index d0fe5e9..877c38a 100644 --- a/xslt/editions_typo.xsl +++ b/xslt/editions_typo.xsl @@ -107,9 +107,32 @@
- + +
- +

Jerusalemer Konvolut, fol. [] recto

+ +

+
+
Textträger
+

Standort, Signatur:

+

Grundschicht, Material:

+
Zustand
+

+ +
Weitere Textschichten
+ + + +
    + +
  • +
    + +
  • Markierung für den Druck der Fackel Nr. 890:
  • +
    +
+
diff --git a/xslt/partials/add-header-pb.xsl b/xslt/partials/add-header-pb.xsl index 105c1c6..c88d612 100644 --- a/xslt/partials/add-header-pb.xsl +++ b/xslt/partials/add-header-pb.xsl @@ -14,10 +14,11 @@ + - - - + + + diff --git a/xslt/partials/scripts.xsl b/xslt/partials/scripts.xsl index 66fbea8..59f1560 100644 --- a/xslt/partials/scripts.xsl +++ b/xslt/partials/scripts.xsl @@ -21,7 +21,7 @@ - +