aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yapyap/feed.yaml30
-rw-r--r--yapyap/template.xml26
-rw-r--r--yapyap/theme.xsl198
-rw-r--r--yapyap/yapyap.xml60
4 files changed, 0 insertions, 314 deletions
diff --git a/yapyap/feed.yaml b/yapyap/feed.yaml
deleted file mode 100644
index b7088f9..0000000
--- a/yapyap/feed.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
1feed:
2 author: Mitja Felicijan
3 link: https://mitjafelicijan.com
4 email: m@mitjafelicijan.com
5
6posts:
7
8 - text: |
9 Containers are wonderful, but they come with a lot of baggage. And because they are in their nature layered, the images require quite a lot of space and also a lot of additional software to handle them. They are not as lightweight as they seem, and many popular images require 500 MB plus disk space.
10 The idea of running this as PID 1 would result in a significantly smaller footprint, as we will see later in the post.
11 https://mitjafelicijan.com/running-golang-application-as-pid1.html
12 date: Sat, 29 Jan 2022 08:00:00 EST
13 image: /assets/yapyap/pid1.jpg
14
15 - text: |
16 A while ago I bought a small eInk display Inky pHAT and I have a bunch of Raspberry Pi's Zero lying around that I really need to use.
17 A cool, simple evening project using some of the parts I had lying at home.
18 https://mitjafelicijan.com/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html
19 date: Sat, 29 Jan 2022 08:00:00 EST
20 image: /assets/world-clock/world-clock.jpg
21
22 - text: |
23 A simple microblogging platform that you host yourself and is a valid RSS feed.
24 Done with XSL (The Extensible Stylesheet Language).
25 https://git.mitjafelicijan.com/yapyap.git/
26 date: Sat, 29 Jan 2022 08:00:00 EST
27
28 - text: It has to start somewhere! 🖖🤯🥷🦄
29 date: Fri, 28 Jan 2022 08:00:00 EST
30 image: /assets/yapyap/hello.png
diff --git a/yapyap/template.xml b/yapyap/template.xml
deleted file mode 100644
index 3333cc8..0000000
--- a/yapyap/template.xml
+++ /dev/null
@@ -1,26 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type="text/xsl" href="theme.xsl?v=2"?>
3<rss version="2.0">
4 <channel>
5
6 <title>{{ .Feed.Author }}</title>
7 <link>{{ .Feed.Link }}</link>
8 <managingEditor>{{ .Feed.Email }} ({{ .Feed.Author }})</managingEditor>
9 <generator>YapYap</generator>
10
11 {{ range $i, $e := .Posts }}
12 <item>
13
14 <guid>{{ $i }}</guid>
15 <description>{{ .Text | nl2br }}</description>
16 <pubDate>{{ .Date }}</pubDate>
17
18 {{if .Image }}
19 <enclosure url="{{ .Image }}" type="image/jpeg" />
20 {{end}}
21
22 </item>
23 {{ end }}
24
25 </channel>
26</rss>
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>
diff --git a/yapyap/yapyap.xml b/yapyap/yapyap.xml
deleted file mode 100644
index e001a99..0000000
--- a/yapyap/yapyap.xml
+++ /dev/null
@@ -1,60 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type="text/xsl" href="theme.xsl?v=2"?>
3<rss version="2.0">
4 <channel>
5
6 <title>Mitja Felicijan</title>
7 <link>https://mitjafelicijan.com</link>
8 <managingEditor>m@mitjafelicijan.com (Mitja Felicijan)</managingEditor>
9 <generator>YapYap</generator>
10
11
12 <item>
13
14 <guid>0</guid>
15 <description>Containers are wonderful, but they come with a lot of baggage. And because they are in their nature layered, the images require quite a lot of space and also a lot of additional software to handle them. They are not as lightweight as they seem, and many popular images require 500 MB plus disk space.<br/><br/>The idea of running this as PID 1 would result in a significantly smaller footprint, as we will see later in the post.<br/><br/>https://mitjafelicijan.com/running-golang-application-as-pid1.html</description>
16 <pubDate>Sat, 29 Jan 2022 08:00:00 EST</pubDate>
17
18
19 <enclosure url="/assets/yapyap/pid1.jpg" type="image/jpeg" />
20
21
22 </item>
23
24 <item>
25
26 <guid>1</guid>
27 <description>A while ago I bought a small eInk display Inky pHAT and I have a bunch of Raspberry Pi's Zero lying around that I really need to use.<br/><br/>A cool, simple evening project using some of the parts I had lying at home.<br/><br/>https://mitjafelicijan.com/simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html</description>
28 <pubDate>Sat, 29 Jan 2022 08:00:00 EST</pubDate>
29
30
31 <enclosure url="/assets/world-clock/world-clock.jpg" type="image/jpeg" />
32
33
34 </item>
35
36 <item>
37
38 <guid>2</guid>
39 <description>A simple microblogging platform that you host yourself and is a valid RSS feed.<br/><br/>Done with XSL (The Extensible Stylesheet Language).<br/><br/>https://git.mitjafelicijan.com/yapyap.git/</description>
40 <pubDate>Sat, 29 Jan 2022 08:00:00 EST</pubDate>
41
42
43
44 </item>
45
46 <item>
47
48 <guid>3</guid>
49 <description>It has to start somewhere! 🖖🤯🥷🦄</description>
50 <pubDate>Fri, 28 Jan 2022 08:00:00 EST</pubDate>
51
52
53 <enclosure url="/assets/yapyap/hello.png" type="image/jpeg" />
54
55
56 </item>
57
58
59 </channel>
60</rss>