My static website generator using poole https://www.xythobuz.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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.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="author" href="xythobuz@xythobuz.de" />
  15. <link rel="shortcut icon" href="img/favicon.ico" />
  16. <link rel="alternate" type="application/rss+xml" title="xythobuz.de" href="rss.xml" />
  17. <link type="text/css" rel="stylesheet" href="css/style.css" />
  18. <link type="text/css" rel="stylesheet" href="css/print.css" media="print" />
  19. <link type="text/css" rel="stylesheet" href="css/gh-fork-ribbon.css" />
  20. <link type="text/css" rel="stylesheet" href="css/lightgallery.min.css" />
  21. <script type="text/javascript" src="js/sh_main.js"></script>
  22. </head>
  23. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  24. <!--%
  25. link = ""
  26. if page.get("github", "") != "":
  27. link = page.github
  28. if page.get("git", "") != "":
  29. link = page.git
  30. if link != "":
  31. # GitHub Fork-Me Ribbon
  32. print '<div class="github-fork-ribbon-wrapper right-bottom">'
  33. print '<div class="github-fork-ribbon"><a href="'
  34. print link
  35. print '">Fork this with Git</a></div></div>'
  36. %-->
  37. <div id="wrap"><div id="nav">
  38. <ul>
  39. <li id="home"><a href="index.html">xythobuz.de</a></li>
  40. <!--%
  41. mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
  42. mpages.sort(key=lambda p: int(p["position"]))
  43. entry = ' <li><a href="%s">%s</a></li>'
  44. for p in mpages[1:]:
  45. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  46. %-->
  47. <li>-</li>
  48. <li><a href="https://git.xythobuz.de/explore/repos">Gitea</a></li>
  49. <li><a href="https://github.com/xythobuz">GitHub</a></li>
  50. <li><a href="printer.html">🔨</a></li>
  51. <div class="fonts">
  52. <li><span class="font-big">Text:</span></li>
  53. <li><a class="dec" href="#"><span class="font-big">A</span><span class="font-small">A</span></a></li>
  54. <li><a class="reset" href="#"><span class="font-big">A</span><span class="font-big">A</span></a></li>
  55. <li><a class="inc" href="#"><span class="font-small">A</span><span class="font-big">A</span></a></li>
  56. </div>
  57. <!--%
  58. tmp = [p for p in page["lang_links"].iteritems()]
  59. if len(tmp) > 1:
  60. print ' <li>'
  61. 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"><')
  62. print "</li>"
  63. %-->
  64. </ul>
  65. </div></div>
  66. <div id="content">
  67. <!--%
  68. from datetime import datetime
  69. if page.get("noheader", "false") == "false":
  70. if page.get("title", "") == "Blog":
  71. print "<h1>%s</h1>" % (page.get("post", ""))
  72. else:
  73. if page.get("lang", "en") == "de":
  74. print "<h1>%s</h1>" % (page.get("title_de", ""))
  75. else:
  76. print "<h1>%s</h1>" % (page.get("title", ""))
  77. if page.get("description", "") != "":
  78. print "<h5>%s</h5>" % (page.get("description", ""))
  79. if page.get("date", "") != "":
  80. if page.get("title", "") == "Blog":
  81. if page.get("lang", "en") == "de":
  82. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  83. print "<i>Ver&ouml;ffentlicht am %s.</i>" % date
  84. else:
  85. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  86. print "<i>Published on %s.</i>" % date
  87. else:
  88. if page.get("lang", "en") == "de":
  89. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  90. print "<i>Projekt gestartet am %s.</i>" % date
  91. else:
  92. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  93. print "<i>Project started on %s.</i>" % date
  94. if page.get("date", "") != "" and page.get("update", "") != "":
  95. print "<br>"
  96. if page.get("update", "") != "":
  97. if page.get("lang", "en") == "de":
  98. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%d.%m.%Y")
  99. print "<i>Zuletzt aktualisiert am %s.</i>" % date
  100. else:
  101. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%B %d, %Y")
  102. print "<i>Last updated on %s.</i>" % date
  103. link = githubCommitBadge(page, True)
  104. if len(link) > 0:
  105. print "<p>Recent activity on GitHub: " + link + "</p>"
  106. %-->
  107. {{ __content__ }}
  108. <hr>
  109. <!--%
  110. # Disqus Comments (only show button to load afterwards)
  111. if page.get("comments", "false") == "true":
  112. print '<div style="text-align: center;">'
  113. print '<button class="show-comments">Load Disqus comments</button>'
  114. print '<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>'
  115. print '</div>'
  116. print '<div id="disqus_thread"></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" src="js/jquery.min.js"></script>
  139. <!--%
  140. # Dynamically load Disqus comments after user requested it
  141. if page.get("comments", "false") == "true":
  142. print '<script type="text/javascript">'
  143. print 'var disqus_shortname = "xythobuz";'
  144. print 'var disqus_identifier = "http://xythobuz.org/' + page["url"] + '";'
  145. print 'var disqus_url = "http://xythobuz.org/' + page["url"] + '";'
  146. print '$(document).ready(function() {'
  147. print '$(".show-comments").on("click", function(){'
  148. print '(function() {'
  149. print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;'
  150. print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
  151. print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] ).appendChild(dsq);'
  152. print '})();'
  153. print '$(this).fadeOut();'
  154. print '});'
  155. print '});'
  156. print '</script>'
  157. %-->
  158. <script type="text/javascript">
  159. $(document).ready(function() {
  160. jQuery(window).resize(function() {
  161. $('#wrap').css('height', $('#nav').css('height'));
  162. });
  163. var fontSize = parseInt($('body').css('font-size'), 10);
  164. var initialFontSize = fontSize;
  165. $('.inc').on('click', function() {
  166. fontSize += 1;
  167. $('#content').css('font-size', fontSize + 'px');
  168. })
  169. $('.dec').on('click', function() {
  170. if (fontSize > 1) {
  171. fontSize -= 1;
  172. $('#content').css('font-size', fontSize + 'px');
  173. }
  174. })
  175. $('.reset').on('click', function() {
  176. if (fontSize != initialFontSize) {
  177. fontSize = initialFontSize;
  178. $('#content').css('font-size', initialFontSize + 'px');
  179. }
  180. })
  181. $(document).keypress(function(event) {
  182. if (event.charCode == '+'.charCodeAt(0)) {
  183. fontSize += 1;
  184. $('#content').css('font-size', fontSize + 'px');
  185. }
  186. if (event.charCode == '-'.charCodeAt(0)) {
  187. if (fontSize > 1) {
  188. fontSize -= 1;
  189. $('#content').css('font-size', fontSize + 'px');
  190. }
  191. }
  192. if (event.charCode == '0'.charCodeAt(0)) {
  193. if (fontSize != initialFontSize) {
  194. fontSize = initialFontSize;
  195. $('#content').css('font-size', initialFontSize + 'px');
  196. }
  197. }
  198. });
  199. })
  200. </script>
  201. <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
  202. <script type="text/javascript" src="js/lightgallery-all.min.js"></script>
  203. <script type="text/javascript">
  204. $(document).ready(function() {
  205. var lg = document.getElementsByClassName("lightgallery");
  206. for (var i = 0; i < lg.length; i++) {
  207. var settings = {
  208. loadYoutubeThumbnail: true,
  209. youtubeThumbSize: 'mqdefault',
  210. loadVimeoThumbnail: true,
  211. vimeoThumbSize: 'thumbnail_medium',
  212. youtubePlayerParams: {
  213. modestbranding: 1,
  214. showinfo: 0,
  215. rel: 0
  216. },
  217. vimeoPlayerParams: {
  218. byline: 0,
  219. portrait: 0
  220. },
  221. thumbnail:true,
  222. animateThumb: true,
  223. showThumbByDefault: false,
  224. galleryId: i
  225. };
  226. var d = lg.item(i);
  227. if ($(d).find(".border").length > 0) {
  228. settings.selector = '.border';
  229. }
  230. $(d).lightGallery(settings);
  231. }
  232. });
  233. </script>
  234. <script>
  235. (function(f, a, t, h, o, m){
  236. a[h]=a[h]||function(){
  237. (a[h].q=a[h].q||[]).push(arguments)
  238. };
  239. o=f.createElement('script'),
  240. m=f.getElementsByTagName('script')[0];
  241. o.async=1; o.src=t; o.id='fathom-script';
  242. m.parentNode.insertBefore(o,m)
  243. })(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
  244. fathom('set', 'siteId', 'APYRK');
  245. fathom('trackPageview');
  246. </script>
  247. </body>
  248. </html>