Skip to content

Commit

Permalink
kleiner link eingefügt
Browse files Browse the repository at this point in the history
  • Loading branch information
martinantonmueller committed Jan 31, 2025
1 parent cdb69ec commit f289f43
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions xslt/editions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -165,26 +165,21 @@
</nav>
</div>
<xsl:call-template name="html_footer"/>
<!-- Das ist nur eine Interim-Funktion, die mir erlauben soll, das ISO-Datum schnell zu kopieren -->
<script>
function copyToClipboard() {
// Den Text, den du kopieren möchtest
var textToCopy = document.getElementById("isoDateValue").innerText;
<div class="d-flex justify-content-between">
<span id="isoDateValue" style="color:white">
<xsl:value-of select="descendant::tei:titleStmt[1]/tei:title[@type = 'iso-date'][1]/text()"/>
</span>

// Erstellen eines temporären Textfelds, um den Text in die Zwischenablage zu kopieren
var tempInput = document.createElement("textarea");
tempInput.value = textToCopy;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand("copy");
document.body.removeChild(tempInput);

alert("Text kopiert: " + textToCopy);
}
</script>
<span id="isoDateValue" style="color:white">
<xsl:value-of select="descendant::tei:titleStmt[1]/tei:title[@type = 'iso-date'][1]/text()"/>
</span>
<span id="isoDateValueLink" style="color:white">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="concat('https://wienerschnitzler.org/tag.html#', descendant::tei:titleStmt[1]/tei:title[@type = 'iso-date'][1]/text())"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="descendant::tei:titleStmt[1]/tei:title[@type = 'iso-date'][1]/text()"/>
</xsl:element>
</span>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit f289f43

Please sign in to comment.