aboutsummaryrefslogtreecommitdiff
path: root/yapyap/theme.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'yapyap/theme.xsl')
-rw-r--r--yapyap/theme.xsl198
1 files changed, 0 insertions, 198 deletions
diff --git a/yapyap/theme.xsl b/yapyap/theme.xsl
deleted file mode 100644
index f9af006..0000000
--- a/yapyap/theme.xsl
+++ /dev/null
@@ -1,198 +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 <style>
15 :root {
16 --base-document-width: 500px;
17 }
18
19 * {
20 box-sizing: border-box;
21 background-color: transparent;
22 margin: 0;
23 padding: 0;
24 border: 0;
25 list-style-type: none;
26 outline: none;
27 text-decoration: none;
28 position: relative;
29 box-shadow: none;
30
31 -moz-osx-font-smoothing: grayscale !important;
32 text-rendering: optimizeLegibility !important;
33 -webkit-font-smoothing: antialiased !important;
34 }
35
36 body {
37 font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
38 font-size: 13px;
39 line-height: 140%;
40 background: #fff;
41 }
42
43 h1 { font-size: 140%; }
44 h2 { font-size: 130%; }
45 h3 { font-size: 120%; }
46
47 .fixed {
48 position: fixed;
49 top: 0;
50 left: 0;
51 right: 0;
52 width: 100%;
53 background: #fff;
54 z-index: 2;
55 border-bottom: 1px solid #eee;
56 }
57
58 header {
59 max-width: var(--base-document-width);
60 margin: 0 auto;
61 padding: 20px;
62 }
63
64 header .meta {
65 flex-grow: 1;
66 }
67
68 header a {
69 color: #111;
70 }
71
72 main {
73 max-width: var(--base-document-width);
74 margin: 0 auto;
75 padding: 20px;
76 padding-top: 100px;
77 }
78
79 article {
80 border: 1px solid #eee;
81 margin-block-end: 20px;
82 max-width: 100%;
83
84 border-radius: 10px;
85 overflow: hidden;
86 }
87
88 article figure img {
89 width: 100%;
90 max-height: 250px;
91 object-fit: cover;
92 }
93
94 article section {
95 padding: 15px;
96 }
97
98 article section p {
99 margin-block-end: 15px;
100 font-size: 120%;
101 }
102
103 article section .meta {
104 color: #808080;
105 font-weight: 500;
106 }
107
108
109 @media (prefers-color-scheme: dark) {
110 body, .fixed {
111 background: #222;
112 color: #fff;
113 border-color: #444;
114 }
115
116 header a {
117 color: #fff;
118 }
119
120 article {
121 border-color: #444;
122 }
123 }
124
125 @media only screen and (max-width: 600px) {
126 body {
127 font-size: 12px;
128 }
129 }
130
131 </style>
132
133 </head>
134
135 <body>
136
137 <div class="fixed">
138 <header>
139 <div class="meta">
140 <h1><xsl:value-of select="rss/channel/title" /></h1>
141 <p>
142 <a target="_blank">
143
144 <xsl:attribute name="href">
145 <xsl:value-of select="rss/channel/link" />
146 </xsl:attribute>
147
148 <xsl:value-of select="rss/channel/link" />
149 </a>
150 </p>
151 </div>
152 </header>
153 </div>
154
155 <main>
156
157 <xsl:for-each select="rss/channel/item">
158 <xsl:sort select="guid" data-type="number" order="ascending" />
159
160 <article>
161
162 <xsl:if test="enclosure/@url">
163 <figure>
164 <img>
165 <xsl:attribute name="src">
166 <xsl:value-of select="enclosure/@url" />
167 </xsl:attribute>
168 </img>
169 </figure>
170 </xsl:if>
171
172 <section>
173 <xsl:if test="description">
174 <p><xsl:copy-of select="description" /></p>
175 </xsl:if>
176
177 <xsl:if test="pubDate">
178 <div class="meta">
179 <time>
180 <xsl:attribute name="datetime">
181 <xsl:value-of select="pubDate" />
182 </xsl:attribute>
183 <xsl:value-of select="pubDate" />
184 </time>
185 </div>
186 </xsl:if>
187 </section>
188
189 </article>
190 </xsl:for-each>
191
192 </main>
193
194 </body>
195 </html>
196
197 </xsl:template>
198</xsl:stylesheet>