-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.html
More file actions
268 lines (245 loc) · 12.8 KB
/
page.html
File metadata and controls
268 lines (245 loc) · 12.8 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE html>
<html lang="{{ page.get('lang', 'en') }}">
<head>
<meta charset="{{ htmlspecialchars(__encoding__) }}">
<title>{{ htmlspecialchars(page.get("post", "Blog")) if page.title == "Blog" else htmlspecialchars(page.title) }} - xythobuz.de</title>
<meta name="description" content="{{ htmlspecialchars(page.get('description', 'Electronics & Software Projects')) }}">
<meta name="keywords" content="{{ htmlspecialchars(page.get('keywords', 'xythobuz')) }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="fediverse:creator" content="@xythobuz@chaos.social">
<link rel="shortcut icon" href="{{ page.get('favicon', 'img/favicon.ico') }}">
<link rel="alternate" type="application/rss+xml" title="xythobuz.de" href="rss.xml">
<link type="text/css" rel="stylesheet" href="css/style.min.css">
<link type="text/css" rel="stylesheet" href="css/print.min.css" media="print">
<!--%
if page.get("github", page.get("git", "")) != "":
print('<link type="text/css" rel="stylesheet" href="css/gh-fork-ribbon.min.css">')
if page["page_flags"]["lightgallery"] > 0:
print('<link type="text/css" rel="stylesheet" href="lg/lightgallery-bundle.min.css">')
if page.get("auto_toc", "false") == "true":
print('<link type="text/css" rel="stylesheet" href="css/auto_toc.min.css">')
# optionally add additional stylesheets
styles = page.get("additional_css", "").split()
for s in styles:
print('<link type="text/css" rel="stylesheet" href="' + s + '">')
# add links to alternate language versions
for lang in page["other_lang"]:
if lang == page["lang"]:
# skip this language
continue
url = BASE_URL + '/' + page["lang_links"][lang]
print('<link rel="alternate" hreflang="' + lang + '" href="' + url + '">')
%-->
</head>
<body class="js_off">
<script>document.body.className = document.body.className.replace('js_off', 'js_on');</script>
<!--%
# GitHub Fork-Me Ribbon
link = ""
if page.get("github", "") != "":
link = page.github
if page.get("git", "") != "":
link = page.git
if link != "":
print('<div class="github-fork-ribbon-wrapper right-bottom">')
print('<div class="github-fork-ribbon">')
print('<a href="' + link + '">Fork this with Git</a>')
print('</div></div>')
# No Gen-AI seal
if page.get("no_gen_ai", "false") == "true":
print('<div class="seal_bottom_left">')
print('<a href="https://www.polygon-treehouse.com/no-gen-ai-seal">')
print('<img class="seal_img" src="img/NoGenAI_Seal.png" alt="This developer assures that No Gen AI was used in this indie game">')
print('</a></div>')
%-->
<div id="wrap"><div id="nav">
<ul id="navbar">
<li id="home"><a href="index.html">xythobuz.de</a></li>
<!--%
mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
mpages.sort(key=lambda p: [ int(p["position"]), p["title"] ])
entry = ' <li><a href="%s">%s</a></li>'
for p in mpages[1:]:
print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
%-->
<li>-</li>
<li><a href="https://codeberg.org/xythobuz">Codeberg</a></li>
<!-- <li><a href="https://git.xythobuz.de/explore/repos">Gitea</a></li> -->
<li><a href="https://github.com/xythobuz">GitHub</a></li>
<!-- <li><a href="printer.html">🔨</a></li> -->
<li class="has_js"><ul class="fonts">
<li><span class="font-big">Text:</span></li>
<li><a class="dec" href="#"><span class="font-big">A</span><span class="font-small">A</span></a></li>
<li><a class="reset" href="#"><span class="font-big">A</span><span class="font-big">A</span></a></li>
<li><a class="inc" href="#"><span class="font-small">A</span><span class="font-big">A</span></a></li>
</ul></li>
<!--%
if len(page["other_lang"]) > 1:
markup = " ".join(["<li><a href='%s'>%s</a></li>" % (page["lang_links"][lang], lang) for lang in page["other_lang"]])
markup = markup.replace(">en<", '><img src="img/en.png" alt="English"><')
markup = markup.replace(">de<", '><img src="img/de.png" alt="Deutsch"><')
print('<li><ul class="fonts">' + markup + '</ul></li>')
%-->
</ul>
</div></div>
<!--%
if page.get("auto_toc", "false") == "true":
print('<div id="toc_wrap"></div>')
%-->
<div id="content">
<!--%
from datetime import datetime
if page.get("noheader", "false") == "false":
if page.get("title", "") == "Blog":
print("<h1>%s</h1>" % (page.get("post", "")))
else:
if page.get("lang", "en") == "de":
print("<h1>%s</h1>" % (page.get("title_de", page.get("title", ""))))
else:
print("<h1>%s</h1>" % (page.get("title", page.get("title_de", ""))))
if page.get("lang", "en") == "de":
if page.get("description_de", "") != "":
print("<h5>%s</h5>" % (page.get("description_de", "")))
elif page.get("description", "") != "":
print("<h5>%s</h5>" % (page.get("description", "")))
else:
if page.get("description", "") != "":
print("<h5>%s</h5>" % (page.get("description", "")))
if page.get("date", "") != "":
date_obj, date_has_time = page_to_datetime(page["date"])
if page.get("lang", "en") == "de":
if date_has_time:
date = date_obj.strftime("%d.%m.%Y um %H:%M")
else:
date = date_obj.strftime("%d.%m.%Y")
else:
if date_has_time:
date = date_obj.strftime("%B %d, %Y at %I:%M %p")
else:
date = date_obj.strftime("%B %d, %Y")
if page.get("title", "") == "Blog":
if page.get("lang", "en") == "de":
print("<i>Artikel veröffentlicht am %s.</i>" % date)
else:
print("<i>Post published on %s.</i>" % date)
else:
if page.get("lang", "en") == "de":
print("<i>Projekt veröffentlicht am %s.</i>" % date)
else:
print("<i>Project published on %s.</i>" % date)
if page.get("date", "") != "" and page.get("update", "") != "":
print("<br>")
if page.get("update", "") != "":
update_obj, update_has_time = page_to_datetime(page["update"])
if page.get("lang", "en") == "de":
if update_has_time:
date = update_obj.strftime("%d.%m.%Y um %H:%M")
else:
date = update_obj.strftime("%d.%m.%Y")
print("<i>Zuletzt aktualisiert am %s.</i>" % date)
else:
if update_has_time:
date = update_obj.strftime("%B %d, %Y at %I:%M %p")
else:
date = update_obj.strftime("%B %d, %Y")
print("<i>Last updated on %s.</i>" % date)
link = githubCommitBadge(page, True)
if len(link) > 0:
if page.get("lang", "en") == "de":
print("<p>Kürzliche Aktivität im Repo: " + link + "</p>")
else:
print("<p>Recent activity in the repo: " + link + "</p>")
if page.get("auto_toc", "false") == "true":
print('<p class="access_link" id="toc_toggle_wrap"></p>')
%-->
{{ __content__ }}
<hr id="footbar">
<!--%
# Comments
if page.get("comments", "false") == "true":
print('<div id="commento"></div>')
print('<hr>')
elif page.get("comments", "false") != "false":
print('<div style="text-align: center;"><a href="%s">Head over here to discuss this article!</a></div>' % page.get("comments", "false"))
print('<hr>')
%-->
</div>
<div id="scroll_up"></div>
<div id="footer">
<a rel="me" href="https://chaos.social/@xythobuz">Mastodon</a>
·
<a rel="jslicense" href="licensing.html" data-jslicense="1">Licensing</a>
·
<a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC-BY-NC-SA</a>
·
<a rel="license" href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3</a>
·
<a rel="license" href="/sitemap.xml">Sitemap</a>
<br>
<a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
·
<a href="https://jquery.com">jQuery</a>
·
<a href="http://shjs.sourceforge.net">SHJS</a>
·
<a href="https://github.com/sachinchoolur/lightGallery">lightGallery</a>
·
<a href="https://github.com/adryd325/oneko.js">oneko.js</a>
<br>
<a href="https://github.com/sponsors/xythobuz">GitHub Sponsors</a>
·
<a href="http://www.amazon.de/?_encoding=UTF8&camp=1638&creative=19454&linkCode=ur2&site-redirect=de&tag=xythobuzorg-21">Amazon.de Affiliate</a>
·
<a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_send-money&nav=1&email=xythobuz@me.com">PayPal</a>
<br>
<span style="font-size: x-small">
<a href="<!--% print('https://codeberg.org/xythobuz/website/src/branch/master/input/' + page.get('fullpath').replace('.de.md', '.md') + '?display=source') %-->">View Source '<!--% print(page.get("fullpath").replace('.de.md', '.md')) %-->'</a> (<a href="<!--% print(page.get('fname').replace('./input/', '').replace('.de.md', '.md')) %-->">locally</a>)
</span>
<br>
<span style="font-size: xx-small" title="<!--% print(page["page_flags"]) %-->">
Static HTML generated at <!--%
import datetime as dt
if hasattr(dt, "UTC"):
print(datetime.now(dt.UTC).strftime("%Y-%m-%d %H:%M:%S UTC"))
else:
print(datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC"))
%-->
</span>
<br><!--%
encoded = url_escape(page.get("fname").replace("./input", get_conf("base_url")).replace('.md', '.html'))
print('<a href="https://validator.w3.org/nu/?doc=' + encoded + '"><img src="data/valid-html.svg" alt="Valid HTML"></a>')
print('<a href="https://jigsaw.w3.org/css-validator/validator?uri=' + encoded + '"><img src="data/valid-css.svg" alt="Valid CSS"></a>')
%-->
</div>
<script src="js/jquery-3.7.1.min.js"></script>
<script src="js/tracking.min.js"></script>
<script src="js/scroller.min.js"></script>
<script src="js/resize.min.js"></script>
<script src="js/oneko.min.js"></script>
<!--%
scripts = page.get("additional_js", "").split()
for s in scripts:
print('<script src="' + s + '"></script>')
if page.get("auto_toc", "false") == "true":
print('<script src="js/auto_toc.min.js"></script>')
if page["page_flags"]["collapse"] > 0:
print('<script src="js/collapse.min.js"></script>')
if page["page_flags"]["shjs"] > 0:
print("""<script src="js/sh_main.min.js"></script>
<script src="js/shjs.min.js"></script>
<script src="js/copy.min.js"></script>""")
if page["page_flags"]["lightgallery"] > 0:
print("""<script src="lg/lightgallery.min.js"></script>
<script src="lg/lg-autoplay.min.js"></script>
<script src="lg/lg-fullscreen.min.js"></script>
<script src="lg/lg-hash.min.js"></script>
<script src="lg/lg-rotate.min.js"></script>
<script src="lg/lg-thumbnail.min.js"></script>
<script src="lg/lg-video.min.js"></script>
<script src="lg/lg-zoom.min.js"></script>
<script src="js/lightgallery.min.js"></script>""")
if page.get("comments", "false") == "true":
print('<script src="https://comments.xythobuz.de/js/commento.js"></script>')
%-->
</body>
</html>