My static website generator using poole https://www.xythobuz.de
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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="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. </head>
  21. <body onload="loadPage()">
  22. <!--%
  23. link = ""
  24. if page.get("github", "") != "":
  25. link = page.github
  26. if page.get("git", "") != "":
  27. link = page.git
  28. if link != "":
  29. # GitHub Fork-Me Ribbon
  30. print('<div class="github-fork-ribbon-wrapper right-bottom">')
  31. print('<div class="github-fork-ribbon"><a href="')
  32. print(link)
  33. print('">Fork this with Git</a></div></div>')
  34. %-->
  35. <div id="wrap"><div id="nav">
  36. <ul id="navbar">
  37. <li id="home"><a href="index.html">xythobuz.de</a></li>
  38. <!--%
  39. mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
  40. mpages.sort(key=lambda p: int(p["position"]))
  41. entry = ' <li><a href="%s">%s</a></li>'
  42. for p in mpages[1:]:
  43. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  44. %-->
  45. <li>-</li>
  46. <li><a href="https://git.xythobuz.de/explore/repos">Gitea</a></li>
  47. <li><a href="https://github.com/xythobuz">GitHub</a></li>
  48. <li><a href="printer.html">🔨</a></li>
  49. <div class="fonts">
  50. <li><span class="font-big">Text:</span></li>
  51. <li><a class="dec" href="#"><span class="font-big">A</span><span class="font-small">A</span></a></li>
  52. <li><a class="reset" href="#"><span class="font-big">A</span><span class="font-big">A</span></a></li>
  53. <li><a class="inc" href="#"><span class="font-small">A</span><span class="font-big">A</span></a></li>
  54. </div>
  55. <!--%
  56. PY3 = sys.version_info[0] == 3
  57. tmp = [p for p in ((iter(page["lang_links"].items())) if PY3 else (page["lang_links"].iteritems()))]
  58. if len(tmp) > 1:
  59. print(' <li>')
  60. 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"><'))
  61. print("</li>")
  62. %-->
  63. </ul>
  64. </div></div>
  65. <div id="content">
  66. <!--%
  67. from datetime import datetime
  68. if page.get("noheader", "false") == "false":
  69. if page.get("title", "") == "Blog":
  70. print("<h1>%s</h1>" % (page.get("post", "")))
  71. else:
  72. if page.get("lang", "en") == "de":
  73. print("<h1>%s</h1>" % (page.get("title_de", "")))
  74. else:
  75. print("<h1>%s</h1>" % (page.get("title", "")))
  76. if page.get("lang", "en") == "de":
  77. if page.get("description_de", "") != "":
  78. print("<h5>%s</h5>" % (page.get("description_de", "")))
  79. elif page.get("description", "") != "":
  80. print("<h5>%s</h5>" % (page.get("description", "")))
  81. else:
  82. if page.get("description", "") != "":
  83. print("<h5>%s</h5>" % (page.get("description", "")))
  84. if page.get("date", "") != "":
  85. if page.get("title", "") == "Blog":
  86. if page.get("lang", "en") == "de":
  87. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  88. print("<i>Ver&ouml;ffentlicht am %s.</i>" % date)
  89. else:
  90. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  91. print("<i>Published on %s.</i>" % date)
  92. else:
  93. if page.get("lang", "en") == "de":
  94. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  95. print("<i>Projekt gestartet am %s.</i>" % date)
  96. else:
  97. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  98. print("<i>Project started on %s.</i>" % date)
  99. if page.get("date", "") != "" and page.get("update", "") != "":
  100. print("<br>")
  101. if page.get("update", "") != "":
  102. if page.get("lang", "en") == "de":
  103. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%d.%m.%Y")
  104. print("<i>Zuletzt aktualisiert am %s.</i>" % date)
  105. else:
  106. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%B %d, %Y")
  107. print("<i>Last updated on %s.</i>" % date)
  108. link = githubCommitBadge(page, True)
  109. if len(link) > 0:
  110. print("<p>Recent activity on GitHub: " + link + "</p>")
  111. %-->
  112. {{ __content__ }}
  113. <hr id="footbar">
  114. <!--%
  115. # Comments
  116. if page.get("comments", "false") == "true":
  117. print('<div id="commento"></div>')
  118. print('<hr>')
  119. elif page.get("comments", "false") != "false":
  120. print('<div style="text-align: center;"><a href="%s">Head over here to discuss this article!</a></div>' % page.get("comments", "false"))
  121. print('<hr>')
  122. %-->
  123. </div>
  124. <div id="footer">
  125. <a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
  126. &middot;
  127. <a href="http://shjs.sourceforge.net">SHJS</a>
  128. &middot;
  129. <a href="https://github.com/sachinchoolur/lightGallery">lightGallery</a>
  130. &middot;
  131. <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC-BY-NC-SA</a>
  132. &middot;
  133. <a href="https://github.com/sponsors/xythobuz">GitHub Sponsors</a>
  134. &middot;
  135. <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>
  136. &middot;
  137. <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_send-money&nav=1&email=xythobuz@me.com">PayPal</a>
  138. <br><span style="font-size: xx-small">
  139. Static HTML generated at <!--% print(datetime.now().strftime("%Y-%m-%d %H:%M:%S %z")) %-->
  140. </span>
  141. </div>
  142. <script type="text/javascript">
  143. function loadPage() {
  144. // adapted from https://sourceforge.net/p/shjs/feature-requests/5/#0940
  145. $("pre[class^='sh_']").each(function() {
  146. // wrap pre with div._sh
  147. $('<div class="_sh"><div class="_sh_lines"></div></div>').insertBefore($(this));
  148. $(this).appendTo($(this).prev('._sh'));
  149. // split content of pre with linebreaks so we can get total line number
  150. var content = $.trim($(this).html());
  151. var lines = content.split('\n');
  152. // append line number to span._sh_lines
  153. for(var line = 1; line < lines.length + 1; line++) {
  154. $(this).prev('._sh_lines').append('<span data-line="' + line + '">' + line + '</span>');
  155. }
  156. });
  157. $("pre:not([class^='sh_']):not([class='ascii'])").each(function() {
  158. // wrap pre with div._sh
  159. $('<div class="_sh"></div>').insertBefore($(this));
  160. $(this).appendTo($(this).prev('._sh'));
  161. });
  162. sh_highlightDocument('/js/sh/', '.min.js');
  163. }
  164. </script>
  165. <script type="text/javascript" src="js/sh_main.js"></script>
  166. <script type="text/javascript" src="js/jquery.min.js"></script>
  167. <!--%
  168. if page.get("comments", "false") == "true":
  169. print('<script defer src="https://comments.xythobuz.de/js/commento.js"></script>')
  170. %-->
  171. <script type="text/javascript">
  172. $(document).ready(function() {
  173. jQuery(window).resize(function() {
  174. $('#wrap').css('height', $('#nav').css('height'));
  175. });
  176. var fontSize = parseInt($('body').css('font-size'), 10);
  177. var initialFontSize = fontSize;
  178. $('.inc').on('click', function() {
  179. fontSize += 1;
  180. $('#content').css('font-size', fontSize + 'px');
  181. })
  182. $('.dec').on('click', function() {
  183. if (fontSize > 1) {
  184. fontSize -= 1;
  185. $('#content').css('font-size', fontSize + 'px');
  186. }
  187. })
  188. $('.reset').on('click', function() {
  189. if (fontSize != initialFontSize) {
  190. fontSize = initialFontSize;
  191. $('#content').css('font-size', initialFontSize + 'px');
  192. }
  193. })
  194. $(document).keypress(function(event) {
  195. if (event.charCode == '+'.charCodeAt(0)) {
  196. fontSize += 1;
  197. $('#content').css('font-size', fontSize + 'px');
  198. }
  199. if (event.charCode == '-'.charCodeAt(0)) {
  200. if (fontSize > 1) {
  201. fontSize -= 1;
  202. $('#content').css('font-size', fontSize + 'px');
  203. }
  204. }
  205. if (event.charCode == '0'.charCodeAt(0)) {
  206. if (fontSize != initialFontSize) {
  207. fontSize = initialFontSize;
  208. $('#content').css('font-size', initialFontSize + 'px');
  209. }
  210. }
  211. });
  212. })
  213. </script>
  214. <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
  215. <script type="text/javascript" src="js/lightgallery-all.min.js"></script>
  216. <script type="text/javascript">
  217. $(document).ready(function() {
  218. var lg = document.getElementsByClassName("lightgallery");
  219. for (var i = 0; i < lg.length; i++) {
  220. var settings = {
  221. loadYoutubeThumbnail: true,
  222. youtubeThumbSize: 'mqdefault',
  223. loadVimeoThumbnail: true,
  224. vimeoThumbSize: 'thumbnail_medium',
  225. youtubePlayerParams: {
  226. modestbranding: 1,
  227. showinfo: 0,
  228. rel: 0
  229. },
  230. vimeoPlayerParams: {
  231. byline: 0,
  232. portrait: 0
  233. },
  234. thumbnail:true,
  235. animateThumb: true,
  236. showThumbByDefault: false,
  237. galleryId: i,
  238. hideBarsDelay: 2500
  239. };
  240. var d = lg.item(i);
  241. if ($(d).find(".border").length > 0) {
  242. settings.selector = '.border';
  243. }
  244. $(d).lightGallery(settings);
  245. }
  246. });
  247. </script>
  248. <script>
  249. var coll = document.getElementsByClassName("collapse");
  250. var i;
  251. for (i = 0; i < coll.length; i++) {
  252. coll[i].addEventListener("click", function() {
  253. this.classList.toggle("collapseactive");
  254. var content = this.nextElementSibling;
  255. if (content.style.maxHeight) {
  256. content.style.maxHeight = null;
  257. setTimeout(function() {
  258. content.style.borderWidth = null;
  259. }, 800);
  260. } else {
  261. content.style.maxHeight = content.scrollHeight + "px";
  262. content.style.borderWidth = "2px";
  263. }
  264. });
  265. }
  266. </script>
  267. <script>
  268. (function(f, a, t, h, o, m){
  269. a[h]=a[h]||function(){
  270. (a[h].q=a[h].q||[]).push(arguments)
  271. };
  272. o=f.createElement('script'),
  273. m=f.getElementsByTagName('script')[0];
  274. o.async=1; o.src=t; o.id='fathom-script';
  275. m.parentNode.insertBefore(o,m)
  276. })(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
  277. fathom('set', 'siteId', 'APYRK');
  278. fathom('trackPageview');
  279. </script>
  280. </body>
  281. </html>