Skip to content

Commit

Permalink
Merge pull request #87 from acdh-oeaw/71-enhancements-for-tunocent
Browse files Browse the repository at this point in the history
Fix some profile imsages renderig
  • Loading branch information
simar0at authored Jul 22, 2024
2 parents ab120ff + 0dda4ca commit 5e69d77
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
26 changes: 4 additions & 22 deletions xslt/profile_01.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,6 @@
<xsl:apply-templates select="//tei:head/tei:figure[1]/tei:head"/>
</div>
</xsl:if>
<!--
<xsl:choose>
<xsl:when test="//tei:head/tei:figure/tei:graphic">
<img>
<xsl:attribute name="src">images/<xsl:value-of select="//tei:head/tei:figure/tei:graphic/@url"/></xsl:attribute>
</img>
<div class="imgCaption">
<xsl:apply-templates select="//tei:head/tei:figure/tei:head"/>
</div>
</xsl:when>
<xsl:otherwise>
<img>
<xsl:attribute name="src">images/<xsl:value-of select="//tei:head/tei:ref[1]/@target"/></xsl:attribute>
</img>
<div class="imgCaption">
<xsl:apply-templates select="//tei:head/tei:ref/tei:p[1]"/>
</div>
</xsl:otherwise>
</xsl:choose>
-->
</div>


Expand Down Expand Up @@ -134,9 +114,11 @@
</div>
</xsl:if>

<div>
<xsl:if test="count(//tei:head/tei:figure) > 2">
<xsl:apply-templates select="//tei:head[tei:figure]" mode="gallery"/>
</xsl:if>
</xsl:if>
</div>
<br/>
<br/>
</div>
Expand Down Expand Up @@ -442,7 +424,7 @@
<xsl:attribute name="class" select="'figure small'"></xsl:attribute>
</xsl:if>
<div class="gallery-item">
<a href="concat($images-base-path, {./tei:link/@target})" title="{./tei:head}">
<a href="{concat($images-base-path, ./tei:link/@target)}" title="{./tei:head}">
<img>
<xsl:attribute name="src">
<xsl:value-of select="concat($images-base-path, tei:graphic/@url)"/>
Expand Down
10 changes: 9 additions & 1 deletion xslt/profile_vue.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@
<xsl:output method="html" encoding="UTF-8"/>
<xsl:import href="profile_01.xslt"/>

<xsl:template match="tei:ref[starts-with(@target,'http')]">
<a data-target-type="External-link" target="_blank">
<xsl:attribute name="href" select="@target" />
<xsl:value-of select="."/>
</a>
</xsl:template>


<xsl:template match="tei:head" mode="gallery">
<gallery>
<xsl:for-each select="subsequence(//tei:head/tei:figure, 2)">
<xsl:for-each select="./tei:figure">
<a>
<xsl:attribute name="href" select="concat($images-base-path, ./tei:graphic/@url)"/>
<img>
Expand Down

0 comments on commit 5e69d77

Please sign in to comment.