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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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. </div>
  139. <script type="text/javascript">
  140. function loadPage() {
  141. // adapted from https://sourceforge.net/p/shjs/feature-requests/5/#0940
  142. $("pre[class^='sh_']").each(function() {
  143. // wrap pre with div._sh
  144. $('<div class="_sh"><div class="_sh_lines"></div></div>').insertBefore($(this));
  145. $(this).appendTo($(this).prev('._sh'));
  146. // split content of pre with linebreaks so we can get total line number
  147. var content = $.trim($(this).html());
  148. var lines = content.split('\n');
  149. // append line number to span._sh_lines
  150. for(var line = 1; line < lines.length + 1; line++) {
  151. $(this).prev('._sh_lines').append('<span data-line="' + line + '">' + line + '</span>');
  152. }
  153. });
  154. $("pre:not([class^='sh_']):not([class='ascii'])").each(function() {
  155. // wrap pre with div._sh
  156. $('<div class="_sh"></div>').insertBefore($(this));
  157. $(this).appendTo($(this).prev('._sh'));
  158. });
  159. sh_highlightDocument('/js/sh/', '.min.js');
  160. }
  161. </script>
  162. <script type="text/javascript" src="js/sh_main.js"></script>
  163. <script type="text/javascript" src="js/jquery.min.js"></script>
  164. <!--%
  165. if page.get("comments", "false") == "true":
  166. print('<script defer src="https://comments.xythobuz.de/js/commento.js"></script>')
  167. %-->
  168. <script type="text/javascript">
  169. $(document).ready(function() {
  170. jQuery(window).resize(function() {
  171. $('#wrap').css('height', $('#nav').css('height'));
  172. });
  173. var fontSize = parseInt($('body').css('font-size'), 10);
  174. var initialFontSize = fontSize;
  175. $('.inc').on('click', function() {
  176. fontSize += 1;
  177. $('#content').css('font-size', fontSize + 'px');
  178. })
  179. $('.dec').on('click', function() {
  180. if (fontSize > 1) {
  181. fontSize -= 1;
  182. $('#content').css('font-size', fontSize + 'px');
  183. }
  184. })
  185. $('.reset').on('click', function() {
  186. if (fontSize != initialFontSize) {
  187. fontSize = initialFontSize;
  188. $('#content').css('font-size', initialFontSize + 'px');
  189. }
  190. })
  191. $(document).keypress(function(event) {
  192. if (event.charCode == '+'.charCodeAt(0)) {
  193. fontSize += 1;
  194. $('#content').css('font-size', fontSize + 'px');
  195. }
  196. if (event.charCode == '-'.charCodeAt(0)) {
  197. if (fontSize > 1) {
  198. fontSize -= 1;
  199. $('#content').css('font-size', fontSize + 'px');
  200. }
  201. }
  202. if (event.charCode == '0'.charCodeAt(0)) {
  203. if (fontSize != initialFontSize) {
  204. fontSize = initialFontSize;
  205. $('#content').css('font-size', initialFontSize + 'px');
  206. }
  207. }
  208. });
  209. })
  210. </script>
  211. <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
  212. <script type="text/javascript" src="js/lightgallery-all.min.js"></script>
  213. <script type="text/javascript">
  214. $(document).ready(function() {
  215. var lg = document.getElementsByClassName("lightgallery");
  216. for (var i = 0; i < lg.length; i++) {
  217. var settings = {
  218. loadYoutubeThumbnail: true,
  219. youtubeThumbSize: 'mqdefault',
  220. loadVimeoThumbnail: true,
  221. vimeoThumbSize: 'thumbnail_medium',
  222. youtubePlayerParams: {
  223. modestbranding: 1,
  224. showinfo: 0,
  225. rel: 0
  226. },
  227. vimeoPlayerParams: {
  228. byline: 0,
  229. portrait: 0
  230. },
  231. thumbnail:true,
  232. animateThumb: true,
  233. showThumbByDefault: false,
  234. galleryId: i,
  235. hideBarsDelay: 2500
  236. };
  237. var d = lg.item(i);
  238. if ($(d).find(".border").length > 0) {
  239. settings.selector = '.border';
  240. }
  241. $(d).lightGallery(settings);
  242. }
  243. });
  244. </script>
  245. <script>
  246. var coll = document.getElementsByClassName("collapse");
  247. var i;
  248. for (i = 0; i < coll.length; i++) {
  249. coll[i].addEventListener("click", function() {
  250. this.classList.toggle("collapseactive");
  251. var content = this.nextElementSibling;
  252. if (content.style.maxHeight) {
  253. content.style.maxHeight = null;
  254. setTimeout(function() {
  255. content.style.borderWidth = null;
  256. }, 800);
  257. } else {
  258. content.style.maxHeight = content.scrollHeight + "px";
  259. content.style.borderWidth = "2px";
  260. }
  261. });
  262. }
  263. </script>
  264. <script>
  265. (function(f, a, t, h, o, m){
  266. a[h]=a[h]||function(){
  267. (a[h].q=a[h].q||[]).push(arguments)
  268. };
  269. o=f.createElement('script'),
  270. m=f.getElementsByTagName('script')[0];
  271. o.async=1; o.src=t; o.id='fathom-script';
  272. m.parentNode.insertBefore(o,m)
  273. })(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
  274. fathom('set', 'siteId', 'APYRK');
  275. fathom('trackPageview');
  276. </script>
  277. </body>
  278. </html>