mirror of
https://github.com/welpo/tabi.git
synced 2025-12-14 11:48:45 +01:00
add separator between dates in Atom feed
This commit is contained in:
parent
313e573a3a
commit
f3946dc7c6
2 changed files with 15 additions and 2 deletions
|
|
@ -54,12 +54,22 @@
|
|||
<xsl:for-each select="/atom:feed/atom:entry">
|
||||
<section class="bloglist-row bottom-divider">
|
||||
<ul class="bloglist-meta">
|
||||
<xsl:if test="$post_listing_date = 'date' or $post_listing_date = 'both'">
|
||||
<xsl:variable name="show_date" select="$post_listing_date = 'date' or $post_listing_date = 'both'"/>
|
||||
<xsl:variable name="show_updated" select="$post_listing_date = 'updated' or $post_listing_date = 'both'"/>
|
||||
|
||||
<xsl:if test="$show_date">
|
||||
<li class="date">
|
||||
<xsl:value-of select="substring(atom:published, 0, 11)"/>
|
||||
</li>
|
||||
</xsl:if>
|
||||
<xsl:if test="$post_listing_date = 'updated' or $post_listing_date = 'both'">
|
||||
|
||||
<xsl:if test="$show_date and $show_updated">
|
||||
<li class="mobile-only">
|
||||
<xsl:value-of select="/atom:feed/str:translations/str:separator"/>
|
||||
</li>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$show_updated">
|
||||
<li class="date">
|
||||
<xsl:variable name="update_string" select="/atom:feed/str:translations/str:last_updated_on"/>
|
||||
<xsl:variable name="update_date" select="substring(atom:updated, 0, 11)"/>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
<?xml-stylesheet href="{{ get_url(path='/feed_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:base="http://purl.org/atompub/base/1.0/" xml:lang="{{ lang }}" xml:base="{{ config.base_url }}">
|
||||
<str:translations xmlns:str="https://github.com/welpo/tabi">
|
||||
<str:separator>
|
||||
{{ config.extra.separator | default(value="•") }}
|
||||
</str:separator>
|
||||
<str:about_feeds>
|
||||
{{- macros_translate::translate(key="about_feeds", default="This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader", language_strings=language_strings) -}}
|
||||
</str:about_feeds>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue