aboutsummaryrefslogtreecommitdiff
path: root/yapyap
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2022-01-08 05:46:48 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2022-01-08 05:46:48 +0100
commit349948e738d0396d98c30a346b2ed208942cab54 (patch)
tree3cd014911884f7b72380e83aaea32b5eb215ee1b /yapyap
parent7d4d2b286213c7e9de07787614670553132e182b (diff)
downloadmitjafelicijan.com-349948e738d0396d98c30a346b2ed208942cab54.tar.gz
Removed YapYap things from repo. Maybe mvoe it to the new repo
Diffstat (limited to 'yapyap')
-rw-r--r--yapyap/yapyap.xml38
-rw-r--r--yapyap/yapyap.xsl251
2 files changed, 0 insertions, 289 deletions
diff --git a/yapyap/yapyap.xml b/yapyap/yapyap.xml
deleted file mode 100644
index 538a4de..0000000
--- a/yapyap/yapyap.xml
+++ /dev/null
@@ -1,38 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type="text/xsl" href="yapyap.xsl"?>
3<rss version="2.0">
4 <channel>
5 <title>Mitja Felicijan</title>
6 <link>https://mitjafelicijan.com</link>
7 <description>Fan of science fiction and dabbler in code</description>
8 <managingEditor>m@mitjafelicijan.com</managingEditor>
9 <generator>YapYap</generator>
10 <crawlable>yes</crawlable>
11 <yapyap>1.0</yapyap>
12 <image>
13 <url>https://mitjafelicijan.com/assets/general/favicon.png</url>
14 </image>
15
16
17 <item>
18 <rid>2</rid>
19 <description>No-Code ML Apps: Build Models in a Few Clicks https://serokell.io/blog/benefits-of-no-code-applications</description>
20 <enclosure url="https://c.tenor.com/9Pxk6fdasc4AAAAC/what-elias-elias.gif"></enclosure>
21 <pubDate>Tue, 07 Sep 2021 16:00:00 +0000</pubDate>
22 </item>
23
24 <item>
25 <rid>2</rid>
26 <description>Well, this is cool http://unikernel.org/. Rethinking Cloud Infrastructure</description>
27 <pubDate>Tue, 07 Sep 2021 16:00:00 +0000</pubDate>
28 </item>
29
30 <item>
31 <rid>1</rid>
32 <description>Hi, Mark!</description>
33 <pubDate>Tue, 07 Sep 2021 00:00:00 +0000</pubDate>
34 </item>
35
36
37 </channel>
38</rss>
diff --git a/yapyap/yapyap.xsl b/yapyap/yapyap.xsl
deleted file mode 100644
index 8fecb30..0000000
--- a/yapyap/yapyap.xsl
+++ /dev/null
@@ -1,251 +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:output method="html"/>
4 <xsl:template match="/">
5
6 <html>
7
8 <head>
9
10 <meta charset="utf-8" />
11 <meta name="theme-color" content="#ffffff" />
12 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
13 <meta http-equiv="X-UA-Compatible" content="ie=edge" />
14
15 <link rel="manifest" href="/manifest.json?v=1" />
16
17 <meta name="theme-color" content="#f4ca16" />
18
19 <link rel="preconnect" href="https://fonts.googleapis.com" />
20 <link rel="preconnect" href="https://fonts.gstatic.com" />
21 <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&amp;display=swap" rel="stylesheet" type='text/css' />
22
23 <style>
24 :root {
25 --base-document-width: 500px;
26 }
27
28 * {
29 box-sizing: border-box;
30 background-color: transparent;
31 margin: 0;
32 padding: 0;
33 border: 0;
34 list-style-type: none;
35 outline: none;
36 text-decoration: none;
37 position: relative;
38 box-shadow: none;
39
40 -moz-osx-font-smoothing: grayscale !important;
41 text-rendering: optimizeLegibility !important;
42 -webkit-font-smoothing: antialiased !important;
43 }
44
45 body {
46 font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
47 font-size: 14px;
48 line-height: 140%;
49 }
50
51 h1 { font-size: 140%; }
52 h2 { font-size: 130%; }
53 h3 { font-size: 120%; }
54
55 .fixed {
56 position: fixed;
57 top: 0;
58 left: 0;
59 right: 0;
60 width: 100%;
61 background: #f4ca16;
62 z-index: 2;
63 border-bottom: 0px solid #eee;
64 }
65
66 header {
67 max-width: var(--base-document-width);
68 margin: 0 auto;
69 padding: 20px;
70 display: flex;
71 gap: 10px;
72 align-items: center;
73 }
74
75 header figure img {
76 width: 48px;
77 height: 48px;
78 object-fit: cover;
79 border-radius: 100%;
80 }
81
82 header .meta {
83 flex-grow: 1;
84 }
85
86 header .subscribe span {
87 background: #ffffff;
88 border: 2px solid #eaae3c;
89 padding: 8px 15px;
90 border-radius: 50px;
91 color: #eaae3c;
92 font-weight: 700;
93 cursor: pointer;
94 text-transform: uppercase;
95 font-size: 80%;
96 }
97
98 header .subscribe span:hover {
99 background-color: #eaae3c;
100 color: #fff;
101 }
102
103 main {
104 max-width: var(--base-document-width);
105 margin: 0 auto;
106 padding: 20px;
107 padding-top: 120px;
108 }
109
110 article {
111 border: 1px solid #eee;
112 margin-block-end: 20px;
113 max-width: 100%;
114
115 border-radius: 5px;
116 overflow: hidden;
117 }
118
119 article figure img {
120 width: 100%;
121 height: 300px;
122 object-fit: cover;
123 border-bottom: 1px solid #eee;
124 }
125
126 article section {
127 padding: 10px 15px;
128 }
129
130 article section p {
131 margin-block-end: 15px;
132 font-size: 120%;
133 }
134
135 article section .meta {
136 display: flex;
137 gap: 5px;
138 align-items: center;
139 color: #808080;
140 font-weight: 500;
141 }
142
143 article section .meta img {
144 width: 15px;
145 height: 15px;
146 object-fit: cover;
147 border-radius: 100%;
148 }
149
150 </style>
151
152 </head>
153
154 <body>
155
156 <div class="fixed">
157 <header>
158 <figure>
159 <img>
160 <xsl:attribute name="src">
161 <xsl:value-of select="rss/channel/image/url" />
162 </xsl:attribute>
163 </img>
164 </figure>
165 <div class="meta">
166 <h1><xsl:value-of select="rss/channel/title" /></h1>
167 <p><xsl:value-of select="rss/channel/link" /></p>
168 </div>
169 </header>
170 </div>
171
172 <main>
173
174 <xsl:for-each select="rss/channel/item">
175 <xsl:sort select="rid" data-type="number" order="descending" />
176
177 <article>
178
179 <xsl:if test="enclosure/@url">
180 <figure>
181 <a target="_blank">
182 <xsl:attribute name="href">
183 <xsl:value-of select="enclosure/@url" />
184 </xsl:attribute>
185
186 <img>
187 <xsl:attribute name="src">
188 <xsl:value-of select="enclosure/@url" />
189 </xsl:attribute>
190 </img>
191 </a>
192 </figure>
193 </xsl:if>
194
195 <section>
196 <xsl:if test="description">
197 <p><xsl:value-of select="description" /></p>
198 </xsl:if>
199
200 <xsl:if test="pubDate">
201 <div class="meta">
202 <img>
203 <xsl:attribute name="src">
204 <xsl:value-of select="/rss/channel/image/url" />
205 </xsl:attribute>
206 </img>
207
208 <time class="timeago">
209 <xsl:attribute name="datetime">
210 <xsl:value-of select="pubDate" />
211 </xsl:attribute>
212 <xsl:value-of select="pubDate" />
213 </time>
214 </div>
215 </xsl:if>
216 </section>
217
218 </article>
219 </xsl:for-each>
220
221 </main>
222
223 <script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
224 <script src="https://unpkg.com/dayjs@1.8.21/plugin/relativeTime.js"></script>
225 <script>
226
227 dayjs.extend(window.dayjs_plugin_relativeTime);
228 document.querySelectorAll('time').forEach(element => {
229 element.innerText = dayjs(element.getAttribute('datetime')).fromNow();
230 });
231
232 function replaceURLs(message) {
233 var urlRegex = /(((https?:\/\/)|(www\.))[^\s]+)/g;
234 return message.replace(urlRegex, function (url) {
235 return `<a>@@@@${url}</a>`;
236 });
237 }
238
239 document.querySelectorAll('article p').forEach(element => {
240 // element.innerHTML = replaceURLs(element.innerHTML);
241 console.log(replaceURLs(element.innerHTML));
242 });
243
244 </script>
245
246 </body>
247 </html>
248
249 </xsl:template>
250</xsl:stylesheet>
251