My static website generator using poole https://www.xythobuz.de
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. <!DOCTYPE html>
  2. <!--%
  3. if page.get("lang", "en") == "de":
  4. print('<html lang="de">')
  5. else:
  6. print('<html lang="en">')
  7. %-->
  8. <head>
  9. <meta charset="{{ htmlspecialchars(__encoding__) }}" />
  10. <title>{{ htmlspecialchars(page.get("post", "Blog")) if page.title == "Blog" else htmlspecialchars(page.title) }} - xythobuz.de</title>
  11. <meta name="description" content="{{ htmlspecialchars(page.get("description", "Electronics & Software Projects")) }}" />
  12. <meta name="keywords" content="{{ htmlspecialchars(page.get("keywords", "xythobuz")) }}" />
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  14. <link rel="shortcut icon" href="{{ page.get("favicon", "img/favicon.ico") }}" />
  15. <link rel="alternate" type="application/rss+xml" title="xythobuz.de" href="rss.xml" />
  16. <link type="text/css" rel="stylesheet" href="css/style.css" />
  17. <link type="text/css" rel="stylesheet" href="css/print.css" media="print" />
  18. <link type="text/css" rel="stylesheet" href="css/gh-fork-ribbon.css" />
  19. <link type="text/css" rel="stylesheet" href="css/lightgallery.min.css" />
  20. <!--%
  21. if page.get("auto_toc", "false") == "true":
  22. print('<link type="text/css" rel="stylesheet" href="css/auto_toc.css" />')
  23. %-->
  24. </head>
  25. <body onload="loadPage()">
  26. <!--%
  27. # GitHub Fork-Me Ribbon
  28. link = ""
  29. if page.get("github", "") != "":
  30. link = page.github
  31. if page.get("git", "") != "":
  32. link = page.git
  33. if link != "":
  34. print('<div class="github-fork-ribbon-wrapper right-bottom">')
  35. print('<div class="github-fork-ribbon"><a href="')
  36. print(link)
  37. print('">Fork this with Git</a></div></div>')
  38. # No Gen-AI seal
  39. if page.get("no_gen_ai", "false") == "true":
  40. print('<div class="seal_bottom_left">')
  41. print('<a href="https://www.polygon-treehouse.com/no-gen-ai-seal">')
  42. print('<img class="seal_img" src="img/NoGenAI_Seal.png" alt="This developer assures that No Gen AI was used in this indie game" />')
  43. print('</a></div>')
  44. %-->
  45. <div id="wrap"><div id="nav">
  46. <ul id="navbar">
  47. <li id="home"><a href="index.html">xythobuz.de</a></li>
  48. <!--%
  49. mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
  50. mpages.sort(key=lambda p: int(p["position"]))
  51. entry = ' <li><a href="%s">%s</a></li>'
  52. for p in mpages[1:]:
  53. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  54. %-->
  55. <li>-</li>
  56. <li><a href="https://codeberg.org/xythobuz">Codeberg</a></li>
  57. <li><a href="https://git.xythobuz.de/explore/repos">Gitea</a></li>
  58. <li><a href="https://github.com/xythobuz">GitHub</a></li>
  59. <!-- <li><a href="printer.html">🔨</a></li> -->
  60. <div class="fonts">
  61. <li><span class="font-big">Text:</span></li>
  62. <li><a class="dec" href="#"><span class="font-big">A</span><span class="font-small">A</span></a></li>
  63. <li><a class="reset" href="#"><span class="font-big">A</span><span class="font-big">A</span></a></li>
  64. <li><a class="inc" href="#"><span class="font-small">A</span><span class="font-big">A</span></a></li>
  65. </div>
  66. <!--%
  67. PY3 = sys.version_info[0] == 3
  68. tmp = [p for p in ((iter(page["lang_links"].items())) if PY3 else (page["lang_links"].iteritems()))]
  69. if len(tmp) > 1:
  70. print(' <li>')
  71. print(" ".join(["<li><a href='%s'>%s</a></li>" % (url, lang) for lang, url in ((iter(page["lang_links"].items())) if PY3 else (page["lang_links"].iteritems()))]).replace(">en<", '><img src="img/en.png" alt="English"><').replace(">de<", '><img src="img/de.png" alt="Deutsch"><'))
  72. print("</li>")
  73. %-->
  74. </ul>
  75. </div></div>
  76. <!--%
  77. if page.get("auto_toc", "false") == "true":
  78. print('<div id="toc_wrap"></div>')
  79. %-->
  80. <div id="content">
  81. <!--%
  82. from datetime import datetime
  83. if page.get("noheader", "false") == "false":
  84. if page.get("title", "") == "Blog":
  85. print("<h1>%s</h1>" % (page.get("post", "")))
  86. else:
  87. if page.get("lang", "en") == "de":
  88. print("<h1>%s</h1>" % (page.get("title_de", "")))
  89. else:
  90. print("<h1>%s</h1>" % (page.get("title", "")))
  91. if page.get("lang", "en") == "de":
  92. if page.get("description_de", "") != "":
  93. print("<h5>%s</h5>" % (page.get("description_de", "")))
  94. elif page.get("description", "") != "":
  95. print("<h5>%s</h5>" % (page.get("description", "")))
  96. else:
  97. if page.get("description", "") != "":
  98. print("<h5>%s</h5>" % (page.get("description", "")))
  99. if page.get("date", "") != "":
  100. if page.get("title", "") == "Blog":
  101. if page.get("lang", "en") == "de":
  102. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  103. print("<i>Ver&ouml;ffentlicht am %s.</i>" % date)
  104. else:
  105. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  106. print("<i>Published on %s.</i>" % date)
  107. else:
  108. if page.get("lang", "en") == "de":
  109. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  110. print("<i>Projekt gestartet am %s.</i>" % date)
  111. else:
  112. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  113. print("<i>Project started on %s.</i>" % date)
  114. if page.get("date", "") != "" and page.get("update", "") != "":
  115. print("<br>")
  116. if page.get("update", "") != "":
  117. if page.get("lang", "en") == "de":
  118. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%d.%m.%Y")
  119. print("<i>Zuletzt aktualisiert am %s.</i>" % date)
  120. else:
  121. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%B %d, %Y")
  122. print("<i>Last updated on %s.</i>" % date)
  123. link = githubCommitBadge(page, True)
  124. if len(link) > 0:
  125. print("<p>Recent activity on GitHub: " + link + "</p>")
  126. if page.get("auto_toc", "false") == "true":
  127. print('<p class="access_link" id="toc_toggle_wrap"></p>')
  128. %-->
  129. {{ __content__ }}
  130. <hr id="footbar">
  131. <!--%
  132. # Comments
  133. if page.get("comments", "false") == "true":
  134. print('<div id="commento"></div>')
  135. print('<hr>')
  136. elif page.get("comments", "false") != "false":
  137. print('<div style="text-align: center;"><a href="%s">Head over here to discuss this article!</a></div>' % page.get("comments", "false"))
  138. print('<hr>')
  139. %-->
  140. </div>
  141. <div id="scroll_up"></div>
  142. <div id="footer">
  143. <a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
  144. &middot;
  145. <a href="http://shjs.sourceforge.net">SHJS</a>
  146. &middot;
  147. <a href="https://github.com/sachinchoolur/lightGallery">lightGallery</a>
  148. &middot;
  149. <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC-BY-NC-SA</a>
  150. &middot;
  151. <a href="https://github.com/sponsors/xythobuz">GitHub Sponsors</a>
  152. &middot;
  153. <a href="http://www.amazon.de/?_encoding=UTF8&amp;camp=1638&amp;creative=19454&amp;linkCode=ur2&amp;site-redirect=de&amp;tag=xythobuzorg-21">Amazon.de Affiliate</a>
  154. &middot;
  155. <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_send-money&nav=1&email=xythobuz@me.com">PayPal</a>
  156. <br><span style="font-size: xx-small">
  157. Static HTML generated at <!--% print(datetime.now().strftime("%Y-%m-%d %H:%M:%S %z")) %-->
  158. </span>
  159. <br><span style="font-size: xx-small">
  160. <a href="<!--% print(page.get('fname').replace('./input/', '').replace('.de.md', '.md')) %-->">View Source '<!--% print(page.get("fname").replace('./input/', '').replace('.de.md', '.md')) %-->'</a>
  161. </span>
  162. </div>
  163. <script type="text/javascript">
  164. // helper to show or hide scroll-up-button depending on scroll position
  165. function scroll_visibility() {
  166. if ($(document).scrollTop() > 0) {
  167. $("#scroll_up").show("fast");
  168. } else {
  169. $("#scroll_up").hide("fast");
  170. }
  171. }
  172. function add_scroll_up() {
  173. // don't show on short pages
  174. if ($("html").outerHeight() <= $(window).height()) {
  175. return;
  176. }
  177. // add button, initially hidden
  178. $("<a>", {
  179. text: "⇑",
  180. id: "scroll_up_btn",
  181. click: function() {
  182. var hash = location.hash.replace("#","");
  183. if (hash != "") {
  184. const location = window.location.href.split('#')[0];
  185. window.history.pushState({}, "", location);
  186. }
  187. window.scrollTo({ top: 0, behavior: "auto" });
  188. return true;
  189. },
  190. }).appendTo('#scroll_up');
  191. $("#scroll_up").hide();
  192. // register handler and set initial state
  193. scroll_visibility();
  194. $(window).scroll(scroll_visibility);
  195. }
  196. function prepare_syntax_highlighting() {
  197. // adapted from https://sourceforge.net/p/shjs/feature-requests/5/#0940
  198. $("pre[class^='sh_']").each(function() {
  199. // wrap pre with div._sh
  200. $('<div class="_sh"><div class="_sh_lines"></div></div>').insertBefore($(this));
  201. $(this).appendTo($(this).prev('._sh'));
  202. // allow skipping line numbers
  203. if ($(this).attr("skip_line_no") != undefined) {
  204. return;
  205. }
  206. // split content of pre with linebreaks so we can get total line number
  207. var content = $.trim($(this).html());
  208. var lines = content.split('\n');
  209. // configurable line number offset
  210. var line_cnt_off = "1";
  211. if ($(this).attr("offset") != undefined) {
  212. line_cnt_off = $(this).attr("offset");
  213. }
  214. var max = lines.length + parseInt(line_cnt_off);
  215. // append line number to span._sh_lines
  216. for (var line = line_cnt_off; line < max; line++) {
  217. $(this).prev('._sh_lines').append('<span data-line="' + line + '">' + line + '</span>');
  218. }
  219. });
  220. $("pre:not([class^='sh_']):not([class='ascii'])").each(function() {
  221. // wrap pre with div._sh
  222. $('<div class="_sh"></div>').insertBefore($(this));
  223. $(this).appendTo($(this).prev('._sh'));
  224. });
  225. sh_highlightDocument('/js/sh/', '.min.js');
  226. }
  227. function loadPage() {
  228. prepare_syntax_highlighting();
  229. add_scroll_up();
  230. }
  231. </script>
  232. <script type="text/javascript" src="js/sh_main.js"></script>
  233. <script type="text/javascript" src="js/jquery.min.js"></script>
  234. <!--%
  235. if page.get("comments", "false") == "true":
  236. print('<script defer src="https://comments.xythobuz.de/js/commento.js"></script>')
  237. if page.get("auto_toc", "false") == "true":
  238. print('<script defer src="js/auto_toc.js"></script>')
  239. %-->
  240. <script type="text/javascript">
  241. $(document).ready(function() {
  242. jQuery(window).resize(function() {
  243. $('#wrap').css('height', $('#nav').css('height'));
  244. });
  245. var fontSize = parseInt($('body').css('font-size'), 10);
  246. var initialFontSize = fontSize;
  247. $('.inc').on('click', function() {
  248. fontSize += 1;
  249. $('#content').css('font-size', fontSize + 'px');
  250. })
  251. $('.dec').on('click', function() {
  252. if (fontSize > 1) {
  253. fontSize -= 1;
  254. $('#content').css('font-size', fontSize + 'px');
  255. }
  256. })
  257. $('.reset').on('click', function() {
  258. if (fontSize != initialFontSize) {
  259. fontSize = initialFontSize;
  260. $('#content').css('font-size', initialFontSize + 'px');
  261. }
  262. })
  263. $(document).keypress(function(event) {
  264. if (event.charCode == '+'.charCodeAt(0)) {
  265. fontSize += 1;
  266. $('#content').css('font-size', fontSize + 'px');
  267. }
  268. if (event.charCode == '-'.charCodeAt(0)) {
  269. if (fontSize > 1) {
  270. fontSize -= 1;
  271. $('#content').css('font-size', fontSize + 'px');
  272. }
  273. }
  274. if (event.charCode == '0'.charCodeAt(0)) {
  275. if (fontSize != initialFontSize) {
  276. fontSize = initialFontSize;
  277. $('#content').css('font-size', initialFontSize + 'px');
  278. }
  279. }
  280. });
  281. })
  282. </script>
  283. <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
  284. <script type="text/javascript" src="js/lightgallery-all.min.js"></script>
  285. <script type="text/javascript">
  286. $(document).ready(function() {
  287. var lg = document.getElementsByClassName("lightgallery");
  288. for (var i = 0; i < lg.length; i++) {
  289. var settings = {
  290. loadYoutubeThumbnail: true,
  291. youtubeThumbSize: 'mqdefault',
  292. loadVimeoThumbnail: true,
  293. vimeoThumbSize: 'thumbnail_medium',
  294. youtubePlayerParams: {
  295. modestbranding: 1,
  296. showinfo: 0,
  297. rel: 0
  298. },
  299. vimeoPlayerParams: {
  300. byline: 0,
  301. portrait: 0
  302. },
  303. thumbnail:true,
  304. animateThumb: true,
  305. showThumbByDefault: false,
  306. galleryId: i,
  307. hideBarsDelay: 2500
  308. };
  309. var d = lg.item(i);
  310. if ($(d).find(".border").length > 0) {
  311. settings.selector = '.border';
  312. }
  313. $(d).lightGallery(settings);
  314. }
  315. });
  316. </script>
  317. <script>
  318. var coll = document.getElementsByClassName("collapse");
  319. var i;
  320. for (i = 0; i < coll.length; i++) {
  321. coll[i].addEventListener("click", function() {
  322. this.classList.toggle("collapseactive");
  323. var content = this.nextElementSibling;
  324. if (content.style.maxHeight) {
  325. content.style.maxHeight = null;
  326. setTimeout(function() {
  327. content.style.borderWidth = null;
  328. content.style.display = "none";
  329. }, 120);
  330. } else {
  331. content.style.display = "block";
  332. content.style.maxHeight = content.scrollHeight + "px";
  333. content.style.borderWidth = "2px";
  334. }
  335. });
  336. }
  337. </script>
  338. <script>
  339. (function(f, a, t, h, o, m){
  340. a[h]=a[h]||function(){
  341. (a[h].q=a[h].q||[]).push(arguments)
  342. };
  343. o=f.createElement('script'),
  344. m=f.getElementsByTagName('script')[0];
  345. o.async=1; o.src=t; o.id='fathom-script';
  346. m.parentNode.insertBefore(o,m)
  347. })(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
  348. fathom('set', 'siteId', 'APYRK');
  349. fathom('trackPageview');
  350. </script>
  351. </body>
  352. </html>