aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/home.rss-style.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/home.rss-style.xsl')
-rw-r--r--themes/default/layouts/_default/home.rss-style.xsl143
1 files changed, 143 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/home.rss-style.xsl b/themes/default/layouts/_default/home.rss-style.xsl
new file mode 100644
index 0000000..d7b0d23
--- /dev/null
+++ b/themes/default/layouts/_default/home.rss-style.xsl
@@ -0,0 +1,143 @@
+{{- print "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | safeHTML }}
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="3.0">
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ {{- print "<title><xsl:value-of select=\"/rss/channel/title\"/> Web Feed</title>" | safeHTML }}
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
+ <link rel="stylesheet" type="text/css" href="/css/default.css"/>
+ </head>
+ <body>
+ <column-left>
+ </column-left>
+ <column-middle>
+ <main>
+ <nav>
+ <icon-button>
+ <a id="top" href="#">
+ {{ safeHTML (readFile "static/icons/feather/arrow-up.svg") }}
+ <small>Top</small>
+ </a>
+ </icon-button>
+
+ <section>
+ <h2><xsl:value-of select="/rss/channel/title"/> Feed</h2>
+ <small>Web Feed Preview</small>
+ </section>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-home" href="/">
+ {{ safeHTML (readFile "static/icons/feather/home.svg") }}
+ <small>Home</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-tag" href="/tags/">
+ {{ safeHTML (readFile "static/icons/feather/tag.svg") }}
+ <small>Tags</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-clock" href="/archives/messages/">
+ {{ safeHTML (readFile "static/icons/tabler/clock.svg") }}
+ <small>History</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-book-2" href="/archives/tags/">
+ {{ safeHTML (readFile "static/icons/tabler/book-2.svg") }}
+ <small>Records</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-users" href="/authors/">
+ {{ safeHTML (readFile "static/icons/feather/users.svg") }}
+ <small>Authors</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-rss" href="/rss.xml">
+ {{ safeHTML (readFile "static/icons/feather/rss.svg") }}
+ <small>RSS</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-circle" href="/index.json">
+ {{ safeHTML (readFile "static/icons/feather/circle.svg") }}
+ <small>JSON</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-git-commit" href="/sources/">
+ {{ safeHTML (readFile "static/icons/feather/git-commit.svg") }}
+ <small>Sources</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+ </nav>
+ <navigation-separator><hr hidden=""></hr></navigation-separator>
+ <xsl:for-each select="/rss/channel/item">
+ <micro-card>
+ <micro-summary>
+ <micro-thumbnail>
+ <figure>
+ <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="/rss/channel/link"/></xsl:attribute>
+ <picture>
+ {{- $file := "/profile/picture.png" -}}
+ {{- $image := imageConfig (print "content/" (partial "author-media-path.html" .) $file) -}}
+ <img
+ loading="lazy"
+ width="{{ $image.Width }}"
+ height="{{ $image.Height }}">
+ <xsl:attribute name="alt"><xsl:value-of select="/rss/channel/category"/></xsl:attribute>
+ <xsl:attribute name="title"><xsl:value-of select="/rss/channel/category"/></xsl:attribute>
+ <xsl:attribute name="src">{{ .Site.BaseURL }}/<xsl:value-of select="/rss/channel/category"/>/media/profile/picture.png</xsl:attribute>
+ </img>
+ </picture>
+ </a>
+ </figure>
+ </micro-thumbnail>
+ <micro-content>
+ <h2>
+ <a target="_blank">
+ <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
+ <xsl:value-of select="title" />
+ </a>
+ </h2>
+ <small> Published: <xsl:value-of select="pubDate" /> </small>
+ </micro-content>
+ </micro-summary>
+ </micro-card>
+ </xsl:for-each>
+ </main>
+ </column-middle>
+ <column-right>
+ </column-right>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>