Remove direct verse styling from html. 23.10
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 19 Oct 2023 10:09:58 +0000 (12:09 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 19 Oct 2023 10:12:30 +0000 (12:12 +0200)
CHANGELOG.md
setup.py
src/librarian/xslt/book2html.xslt

index a1cff15..f523442 100644 (file)
@@ -2,6 +2,10 @@
 
 This document records all notable changes to Librarian.
 
+## 23.10
+
+- Remove direct verse styling from HTML.
+
 ## 23.08
 
 - Move statistics counter to L2 WLgit lDocument.
index 0f7be1b..b14204f 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def whole_tree(prefix, path):
 
 setup(
     name='librarian',
-    version='23.8',
+    version='23.10',
     description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats',
     author="Marek StÄ™pniowski",
     author_email='marek@stepniowski.com',
index 390d147..b009345 100644 (file)
     <xsl:param name="verse-content" />
     <xsl:param name="verse-type" />
     <div class="verse">
+      <xsl:attribute name="class">
+        <xsl:text>verse</xsl:text>
         <xsl:choose>
             <xsl:when test="name($verse-type) = 'wers_akap'">
-                <xsl:attribute name="style">padding-left: 1em</xsl:attribute>
+              <xsl:text> verse-p</xsl:text>
             </xsl:when>
             <xsl:when test="name($verse-type) = 'wers_wciety'">
-                <xsl:choose>
-                    <xsl:when test="$verse-content/@typ">
-                        <xsl:attribute name="style">padding-left: <xsl:value-of select="$verse-content/@typ" />em</xsl:attribute>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:attribute name="style">padding-left: 1em</xsl:attribute>
-                    </xsl:otherwise>
-                </xsl:choose>
+              <xsl:text> verse-indent</xsl:text>
+              <xsl:if test="$verse-content/@typ">
+                <xsl:text> verse-indent-</xsl:text>
+                <xsl:value-of select="$verse-content/@typ" />
+              </xsl:if>
             </xsl:when>
             <xsl:when test="name($verse-type) = 'wers_cd'">
-                <xsl:attribute name="style">padding-left: 12em</xsl:attribute>
+              <xsl:text> verse-cont</xsl:text>
             </xsl:when>
             <xsl:when test="name($verse-type) = 'wers_do_prawej'">
-                <xsl:attribute name="style">text-align: right</xsl:attribute>
+              <xsl:text> verse-right</xsl:text>
             </xsl:when>
             <xsl:when test="name($verse-type) = 'wers_srodek'">
-                <xsl:attribute name="style">text-align: center</xsl:attribute>
+              <xsl:text> verse-center</xsl:text>
             </xsl:when>
         </xsl:choose>
-        <xsl:apply-templates select="$verse-content" mode="inline" />
+      </xsl:attribute>
+      <xsl:apply-templates select="$verse-content" mode="inline" />
     </div>
 </xsl:template>