blob: e271d672b008bf4aab8a1702803d37be37148a82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
{{- printf `<?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="1.1"
>
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" data="xml">
<head>
{{ printf `<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"/>
{{- $default := resources.Get "css/default.css" -}}
{{- if .Site.Params.site.production -}}
{{ $css := slice $default | resources.Concat "css/bundle.css" | resources.Minify | fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $css.Permalink }}"/>
{{- else }}
<link rel="stylesheet" type="text/css" href="{{ $default.Permalink }}"/>
{{- end }}
</head>
<body>
<column-left>
</column-left>
<column-middle>
<main>
<nav>
<icon-button>
<a onclick="window.history.go(-1); return false;">
<xsl:choose>
<xsl:when test="/rss/channel/atom:link[@rel='previous']/@href">
<xsl:attribute name="href">
<xsl:value-of select="/rss/channel/atom:link[@rel='previous']/@href"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">/</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
{{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }}
<small>Back</small>
</a>
</icon-button>
<section>
<h2><xsl:value-of select="/rss/channel/title"/>'s Feed</h2>
<small>Web Feed Preview</small>
</section>
<xsl:if test="/rss/channel/atom:link[@rel='next']/@href">
<icon-button>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/rss/channel/atom:link[@rel='next']/@href"/>
</xsl:attribute>
{{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-right.svg")) }}
<small>Next</small>
</a>
</icon-button>
</xsl:if>
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
<icon-navigator hidden="">
<icon-button>
<a id="nav-middle-{{ path.Base .Identifier }}" href="{{ .URL | absURL }}">
{{ with .Identifier }}
{{ $icon := print (partial "function-paths.html" "static") "/icons/" . ".svg" }}
{{ safeHTML (readFile $icon) }}
{{ end }}
<small>{{ delimit (first 1 (split .Name " ")) " " }}</small>
</a>
</icon-button>
</icon-navigator>
{{ end }}
{{ end }}
</nav>
<navigation-separator><hr hidden=""></hr></navigation-separator>
<xsl:for-each select="/rss/channel/item">
<micro-card>
<micro-summary>
<micro-thumbnail>
<figure>
<a>
<xsl:attribute name="href"><xsl:value-of select="/rss/channel/link"/></xsl:attribute>
<picture>
<img>
<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"><xsl:value-of select="/rss/channel/image/url"/></xsl:attribute>
</img>
</picture>
</a>
</figure>
</micro-thumbnail>
<micro-content>
<h2>
<a>
<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>
|