Skip to content

Commit

Permalink
updated chapter design, fixed paragraph numbering. TODO: check links.
Browse files Browse the repository at this point in the history
  • Loading branch information
EsGeh authored and EsGeh committed Nov 5, 2019
1 parent f1c81d1 commit d495f71
Show file tree
Hide file tree
Showing 2 changed files with 300 additions and 189 deletions.
49 changes: 14 additions & 35 deletions tei2html/tei2html_chapter_utils.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<main class="main publications publications2">
<div class="container">
<div class="main-content">
<!-- chapter table of contents -->
<section class="publications__overview">
<div class="accordion">
<div class="accordion__item accordion__item--border-top active">
Expand Down Expand Up @@ -152,32 +153,13 @@
<span class="link__label link__label--outer">Download Chapter</span>
</a>
</section>
<!-- chapter content: -->
<section class="publication-detail">
<div class="accordion">
<!-- publication title -->
<h2 class="publication-detail__title">
<xsl:if test="@n != 'nonumber'">
<xsl:value-of select="@n"/>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:apply-templates select="./tei:head" mode="body"/>
</h2>
<xsl:if test="@resp">
<p>
<!-- <a href="/author/2.html">Jürgen Renn</a> -->
<xsl:variable name="people" select="@resp"/>
<xsl:call-template name="format_string_authors">
<xsl:with-param name="authors" select="$people"/>
</xsl:call-template>
</p>
</xsl:if>
<a class="accordion__showall show" href="#">Close All</a>
<!-- <xsl:call-template name="document-structure"/> -->
<xsl:apply-templates mode="body" select="*[not(name() = 'head')]"/>
<xsl:call-template name="footnotes"/>
<!-- closing elements go here -->
</div>
<xsl:apply-templates mode="chapter_main" select="."/>
<!-- back/forward navigation -->
<xsl:apply-templates mode="chapter_navigation" select="."/>
</section>
<!-- chapter content closed-->
</div>
</div>
</main>
Expand Down Expand Up @@ -233,23 +215,20 @@ tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
<div class="accordion__content">
<div class="publication-detail__footnotes">
<ol>
<xsl:for-each select="$chapter//tei:*[name() = $paragraph_elements]">
<xsl:variable name="paragraph" select="."/>
<xsl:variable name="paragraph_nr">
<xsl:number
count="tei:*[name() = $paragraph_elements]"
from="tei:div[@type = 'chapter']"
level="any"
/>
<xsl:for-each select="$chapter//tei:note[@place = 'bottom']">
<xsl:variable name="paragraph_id" as="xs:string?">
<xsl:for-each select="parent::tei:*">
<xsl:call-template name="paragraph_id"/>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="$paragraph//tei:note[@place = 'bottom']">
<xsl:if test="$paragraph_id">
<li id="fn{@n}">
<xsl:for-each select="tei:p">
<p><xsl:apply-templates mode="html"/></p>
</xsl:for-each>
<a href="#p{$paragraph_nr}">to paragraph</a>
<a href="#{$paragraph_id}">to paragraph</a>
</li>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</ol>
</div>
Expand Down
Loading

0 comments on commit d495f71

Please sign in to comment.