xsl/gemini.xsl: add news excerpts, make whitespace more consistent
c3d2-web deployed Details
c3d2-gemini deployed Details

This commit is contained in:
Astro 2022-03-08 17:42:31 +01:00
parent d272167229
commit b8e3cf5560
1 changed files with 12 additions and 7 deletions

View File

@ -6,7 +6,7 @@
xmlns:crypto="http://exslt.org/crypto">
<output method="text" encoding="utf-8"/>
<strip-space elements="page item image event div p ul ol li blockquote"/>
<strip-space elements="page item addendum image event div p ul ol li blockquote"/>
<include href="date.xsl"/>
<template match="/page">
@ -53,7 +53,7 @@
<if test="/page/portal">
<text>## Navigation&#10;&#10;</text>
<text>## Navigation&#10;</text>
<for-each select="document('../content/navigation.xml')/navigation/group">
<for-each select="file">
<text>=&gt; </text>
@ -110,6 +110,8 @@
<value-of select="@author"/>
<text>&#10;</text>
<apply-templates select="*[name() = 'p' or name() = 'blockquote' or name() = 'ul' or name() = 'ol']"/>
<text>=> </text>
<value-of select="substring-before(substring-after($newsfile, 'content/'), '.xml')"/>
<text>.gmi News lesen&#10;</text>
@ -117,7 +119,7 @@
</if>
</for-each>
<text>&#10;&#10;</text>
<text>&#10;&#10;# Ressourcen&#10;</text>
<text>=> news-atom.xml ATOM&#10;</text>
<text>=> news-rss.xml RSS&#10;</text>
<text>=> news-archiv.gmi Archiv&#10;</text>
@ -265,6 +267,10 @@
<text>)&#10;</text>
</template>
<template match="event">
<text>&#10;</text>
</template>
<template match="event/start">
<text>* Beginn: </text>
<call-template name="get-datestring">
@ -322,7 +328,6 @@
</template>
<template match="p">
<text>&#10;</text>
<if test="@title">
<text>## </text>
<value-of select="@title"/>
@ -348,10 +353,10 @@
<param name="text"/>
<choose>
<when test="contains($text, '&#13;')">
<value-of select="substring-before($text, '&#13;')"/>
<when test="contains($text, '&#10;')">
<value-of select="substring-before($text, '&#10;')"/>
<call-template name="normalize-paragraph">
<with-param name="text" select="substring-after($text, '&#13;')"/>
<with-param name="text" select="substring-after($text, '&#10;')"/>
</call-template>
</when>
<otherwise>