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.

page.html 13KB

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