datenspuren 2024: add <news-list/>
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
fe2ede5c2f
commit
d3e1be7d5a
|
@ -32,6 +32,9 @@ h1 {
|
|||
vertical-align: top;
|
||||
transform: translate3d(0px, 0px, 0px);
|
||||
}
|
||||
h2 date {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes arrive_l {
|
||||
from {
|
||||
|
|
|
@ -77,4 +77,35 @@
|
|||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="news-list">
|
||||
<xsl:variable name="prefix" select="@prefix"/>
|
||||
<xsl:variable name="details" select="@details"/>
|
||||
|
||||
<xsl:for-each select="document('../../news.xml')/page/news/newsfile">
|
||||
<xsl:sort select="date:seconds(document(concat('../../', .))/item/@date)" data-type="number" order="descending" />
|
||||
<xsl:variable name="newsfile" select="."/>
|
||||
|
||||
<xsl:for-each select="document(concat('../../', $newsfile))/item">
|
||||
<xsl:if test="((string-length($prefix) = 0) or starts-with($newsfile, concat('content/news/', $prefix))) and (($details != 'resources-only') or (count(resource) > 0))">
|
||||
|
||||
<h2 class="summary">
|
||||
<date>
|
||||
<xsl:call-template name="get-short-datestring">
|
||||
<xsl:with-param name="date" select="@date"/>
|
||||
</xsl:call-template>
|
||||
</date>
|
||||
<a href="https://www.c3d2.de/{substring-before(substring-after($newsfile, 'content/'), '.xml')}.html" class="url">
|
||||
<xsl:value-of select="@title"/>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Diese Elemente entsprechen Block.class aus xsd/c3d2web.xsd -->
|
||||
<!--xsl:apply-templates select=".//*[name() = 'dl' or name() = 'p' or name() = 'ul' or name() = 'ol' or name() = 'pre']"/-->
|
||||
<xsl:apply-templates select="*[name() != 'image']"/>
|
||||
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Reference in New Issue