Skip to content

Commit

Permalink
html fixes: headings within tei:lg are turned into spans
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Oct 10, 2016
1 parent 2c5bab9 commit 5b6f0ca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
19 changes: 5 additions & 14 deletions resources/less/weber.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
url('../fonts/2B4A81_2_0.ttf') format('truetype');}


h1,h2,h3,h4,h5,h6,p
h1,h2,h3,h4,h5,h6,p,.heading3,.heading4
{
margin-bottom: 30px;
}
Expand All @@ -41,28 +41,19 @@ h1.document
font-size: 40px;
}

h3
h3,.heading3
{
line-height: 1.5em;
}

h2,h3,h4
h2,h3,h4,.heading3,.heading4
{
margin-top: 0px;
font-family: 'CamingoDos-Bold';
color: @gray;
}


h1 a,h2 a,h3 a,h4 a
{


}



h4
h4,.heading4
{
line-height: 20px;
font-weight: 400px;
Expand All @@ -74,7 +65,7 @@ a:hover
}


h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover
h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,.heading3 a:hover,.heading4 a:hover
{
text-decoration: none;
}
Expand Down
18 changes: 16 additions & 2 deletions xsl/common_main.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,11 @@
</xsl:template>

<!-- Überschriften innerhalb einer floatingText-Umgebung -->
<xsl:template match="tei:head[ancestor::tei:floatingText][not(parent::tei:list)]" priority="0.6">
<xsl:template match="tei:head[parent::tei:body][ancestor::tei:floatingText]" priority="0.6">
<xsl:variable name="minHeadLevel" as="xs:integer" select="2"/>
<xsl:variable name="increments" as="xs:integer">
<!-- Wenn es ein Untertitel ist bzw. der Titel einer Linegroup wird der Level hochgezählt -->
<xsl:value-of select="count(parent::tei:lg | .[@type='sub'])"/>
<xsl:value-of select="count(.[@type='sub'])"/>
</xsl:variable>
<xsl:element name="{concat('h', $minHeadLevel + $increments)}">
<xsl:apply-templates select="@xml:id"/>
Expand Down Expand Up @@ -479,6 +479,20 @@
<xsl:apply-templates/>
</xsl:element>
</xsl:template>

<!-- Überschriften innerhalb einer lg-Umgebung -->
<xsl:template match="tei:head[parent::tei:lg]">
<xsl:variable name="minHeadLevel" as="xs:integer" select="2"/>
<xsl:variable name="increments" as="xs:integer">
<!-- Verschachtelungstiefe hochgezählt -->
<xsl:value-of select="count(ancestor::tei:lg)"/>
</xsl:variable>
<xsl:element name="span">
<xsl:apply-templates select="@xml:id"/>
<xsl:attribute name="class" select="concat('heading', $minHeadLevel + $increments)"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>

<xsl:template match="tei:footNote"/>

Expand Down

0 comments on commit 5b6f0ca

Please sign in to comment.