aboutsummaryrefslogtreecommitdiff
path: root/static/yap/theme.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'static/yap/theme.xsl')
-rwxr-xr-xstatic/yap/theme.xsl113
1 files changed, 0 insertions, 113 deletions
diff --git a/static/yap/theme.xsl b/static/yap/theme.xsl
deleted file mode 100755
index 4706f95..0000000
--- a/static/yap/theme.xsl
+++ /dev/null
@@ -1,113 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:template match="/">
4
5 <html>
6
7 <head>
8
9 <meta charset="utf-8" />
10 <meta name="theme-color" content="#ffffff" />
11 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
12 <meta http-equiv="X-UA-Compatible" content="ie=edge" />
13
14 <title>Microblog - Mitja Felicijan</title>
15 <link rel="icon" type="image/gif" href="/general/favicon.gif" />
16
17 <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet" />
18
19 <style>
20 .container-blog {
21 max-width: 700px;
22 }
23 </style>
24
25 <script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
26 <script>
27 window.addEventListener('load', () => {
28 document.querySelectorAll('time').forEach(el => {
29 const formattedDate = dayjs(el.getAttribute('datetime')).format('dddd, MMMM D, YYYY h:mm A');
30 el.innerText = formattedDate;
31 });
32 });
33 </script>
34
35 <!--
36 Examples:
37
38 <item>
39 <guid>1</guid>
40 <title>Example of Image post</title>
41 <pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>
42 <enclosure url="https://placeimg.com/550/300/tech" />
43 </item>
44 <item>
45 <title>Example of Text post</title>
46 <pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>
47 </item>
48 -->
49
50 </head>
51
52 <body>
53
54 <header class="container-blog mx-auto px-6 md:p-0">
55 <div class="flex py-4 mt-4 mb-6 items-center gap-2">
56 <h1>
57 <a href="/" class="text-xl font-bold hover:bg-yellow-100">
58 <xsl:value-of select="rss/channel/pageTitle" />
59 </a>
60 </h1>
61 </div>
62 </header>
63
64 <main class="container-blog mx-auto px-6 md:p-0 mb-32">
65
66 <xsl:for-each select="rss/channel/item">
67 <xsl:sort select="guid" data-type="number" order="descending" />
68
69 <article class="flex flex-col md:flex-row gap-4 mb-10">
70
71 <xsl:if test="enclosure/@url">
72 <a class="w-full md:w-90 block" target="_blank">
73 <xsl:attribute name="href">
74 <xsl:value-of select="enclosure/@url" />
75 </xsl:attribute>
76
77 <img class="rounded w-full object-contain md:object-fill">
78 <xsl:attribute name="src">
79 <xsl:value-of select="enclosure/@url" />
80 </xsl:attribute>
81 </img>
82 </a>
83 </xsl:if>
84
85 <section>
86 <xsl:if test="pubDate">
87 <div class="text-gray-400 text-xs font-medium mb-1">
88 <time>
89 <xsl:attribute name="datetime">
90 <xsl:value-of select="pubDate" />
91 </xsl:attribute>
92 <xsl:value-of select="pubDate" />
93 </time>
94 </div>
95 </xsl:if>
96
97 <xsl:if test="title">
98 <div>
99 <xsl:value-of select="title" />
100 </div>
101 </xsl:if>
102 </section>
103
104 </article>
105 </xsl:for-each>
106
107 </main>
108
109 </body>
110 </html>
111
112 </xsl:template>
113</xsl:stylesheet>