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.

page.html 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="{{ htmlspecialchars(__encoding__) }}" />
  5. <title>{{ htmlspecialchars(page.title) }} - xythobuz.de</title>
  6. <meta name="description" content="{{ htmlspecialchars(page.get("description", "Electronics & Software Projects")) }}" />
  7. <meta name="keywords" content="{{ htmlspecialchars(page.get("keywords", "xythobuz")) }}" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  9. <link rel="author" href="xythobuz@xythobuz.de" />
  10. <link rel="shortcut icon" href="img/favicon.ico" />
  11. <link rel="alternate" type="application/rss+xml" title="Blog" href="rss.xml" />
  12. <link type="text/css" rel="stylesheet" href="css/style.css" />
  13. <link type="text/css" rel="stylesheet" href="css/sh_bright.min.css" />
  14. <link type="text/css" rel="stylesheet" href="css/gh-fork-ribbon.css" />
  15. <link type="text/css" rel="stylesheet" href="css/lightgallery.min.css" />
  16. <script type="text/javascript" src="js/sh_main.js"></script>
  17. </head>
  18. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  19. <!--%
  20. if page.get("github", "") != "":
  21. # GitHub Fork-Me Ribbon
  22. print '<div class="github-fork-ribbon-wrapper right fixed">'
  23. print '<div class="github-fork-ribbon"><a href="'
  24. print page.github
  25. print '">Fork me on GitHub</a></div></div>'
  26. %-->
  27. <div id="nav">
  28. <ul>
  29. <li id="home"><a href="index.html">xythobuz.de</a></li>
  30. <!--%
  31. mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
  32. mpages.sort(key=lambda p: int(p["position"]))
  33. entry = ' <li><a href="%s">%s</a></li>'
  34. for p in mpages[1:]:
  35. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  36. %-->
  37. <li>-</li>
  38. <li><a href="https://git.xythobuz.de/explore/repos">Gitea</a></li>
  39. <li><a href="https://github.com/xythobuz">GitHub</a></li>
  40. <li><a href="printer.html">🔨</a></li>
  41. <div class="fonts">
  42. <li><span class="font-big">Text:</span></li>
  43. <li><a class="dec" href="#"><span class="font-big">A</span><span class="font-small">A</span></a></li>
  44. <li><a class="reset" href="#"><span class="font-big">A</span><span class="font-big">A</span></a></li>
  45. <li><a class="inc" href="#"><span class="font-small">A</span><span class="font-big">A</span></a></li>
  46. </div>
  47. <!--%
  48. tmp = [p for p in page["lang_links"].iteritems()]
  49. if len(tmp) > 1:
  50. print ' <li>'
  51. 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"><')
  52. print "</li>"
  53. %-->
  54. </ul>
  55. </div>
  56. <div id="content">
  57. <!--%
  58. from datetime import datetime
  59. if page.get("noheader", "false") == "false":
  60. if page.get("title", "") == "Blog":
  61. print "<h1>%s</h1>" % (page.get("post", ""))
  62. else:
  63. if page.get("lang", "en") == "de":
  64. print "<h1>%s</h1>" % (page.get("title_de", ""))
  65. else:
  66. print "<h1>%s</h1>" % (page.get("title", ""))
  67. if page.get("date", "") != "":
  68. if page.get("lang", "en") == "de":
  69. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%d.%m.%Y")
  70. print "<i>Ver&ouml;ffentlicht am %s.</i>" % date
  71. else:
  72. date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
  73. print "<i>Published at %s.</i>" % date
  74. if page.get("date", "") != "" and page.get("update", "") != "":
  75. print "<br>"
  76. if page.get("update", "") != "":
  77. if page.get("lang", "en") == "de":
  78. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%d.%m.%Y")
  79. print "<i>Zuletzt aktualisiert am %s.</i>" % date
  80. else:
  81. date = datetime.strptime(page["update"], "%Y-%m-%d").strftime("%B %d, %Y")
  82. print "<i>Last updated at %s.</i>" % date
  83. %-->
  84. {{ __content__ }}
  85. <!--%
  86. # Disqus Comments (only show button to load afterwards)
  87. if page.get("comments", "false") == "true":
  88. print '<div style="margin-top: 1em; text-align: center;">'
  89. print '<button class="show-comments">Load Disqus comments</button>'
  90. print '</div>'
  91. print '<div id="disqus_thread"></div>'
  92. print '<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>'
  93. elif page.get("comments", "false") != "false":
  94. print '<p><a href="%s">Head over here to discuss this article!</a></p>' % page.get("comments", "false")
  95. %-->
  96. </div>
  97. <div id="footer">
  98. <a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
  99. &middot;
  100. <a href="http://shjs.sourceforge.net">SHJS</a>
  101. &middot;
  102. <a href="https://github.com/sachinchoolur/lightGallery">lightGallery</a>
  103. &middot;
  104. <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC-BY</a>
  105. &middot;
  106. <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>
  107. &middot;
  108. <a href="http://www.amazon.de/registry/wishlist/1TURV4XV2J3VT">Amazon.de Wishlist</a>
  109. &middot;
  110. <a href="http://steamcommunity.com/id/xythobuz/wishlist/?sort=price">Steam Wishlist</a>
  111. &middot;
  112. <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_send-money&nav=1&email=xythobuz@me.com">PayPal</a>
  113. </div>
  114. <script type="text/javascript" src="js/jquery.min.js"></script>
  115. <!--%
  116. # Dynamically load Disqus comments after user requested it
  117. if page.get("comments", "false") == "true":
  118. print '<script type="text/javascript">'
  119. print 'var disqus_shortname = "xythobuz";'
  120. print 'var disqus_identifier = "http://xythobuz.org/' + page["url"] + '";'
  121. print 'var disqus_url = "http://xythobuz.org/' + page["url"] + '";'
  122. print '$(document).ready(function() {'
  123. print '$(".show-comments").on("click", function(){'
  124. print '(function() {'
  125. print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;'
  126. print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
  127. print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] ).appendChild(dsq);'
  128. print '})();'
  129. print '$(this).fadeOut();'
  130. print '});'
  131. print '});'
  132. print '</script>'
  133. %-->
  134. <script type="text/javascript">
  135. $(document).ready(function(){
  136. var fontSize = parseInt($('body').css('font-size'), 10);
  137. var initialFontSize = fontSize;
  138. $('.inc').on('click', function() {
  139. fontSize += 1;
  140. $('#content').css('font-size', fontSize + 'px');
  141. })
  142. $('.dec').on('click', function() {
  143. if (fontSize > 1) {
  144. fontSize -= 1;
  145. $('#content').css('font-size', fontSize + 'px');
  146. }
  147. })
  148. $('.reset').on('click', function() {
  149. if (fontSize != initialFontSize) {
  150. fontSize = initialFontSize;
  151. $('#content').css('font-size', initialFontSize + 'px');
  152. }
  153. })
  154. })
  155. </script>
  156. <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
  157. <script type="text/javascript" src="js/lightgallery-all.min.js"></script>
  158. <script type="text/javascript">
  159. $(document).ready(function() {
  160. var lg = document.getElementsByClassName("lightgallery");
  161. for (var i = 0; i < lg.length; i++) {
  162. $(lg.item(i)).lightGallery({
  163. loadYoutubeThumbnail: true,
  164. youtubeThumbSize: 'mqdefault',
  165. loadVimeoThumbnail: true,
  166. vimeoThumbSize: 'thumbnail_medium',
  167. youtubePlayerParams: {
  168. modestbranding: 1,
  169. showinfo: 0,
  170. rel: 0
  171. },
  172. vimeoPlayerParams: {
  173. byline: 0,
  174. portrait: 0
  175. },
  176. thumbnail:true,
  177. animateThumb: true,
  178. showThumbByDefault: false,
  179. galleryId: i
  180. });
  181. }
  182. });
  183. </script>
  184. <script>
  185. (function(f, a, t, h, o, m){
  186. a[h]=a[h]||function(){
  187. (a[h].q=a[h].q||[]).push(arguments)
  188. };
  189. o=f.createElement('script'),
  190. m=f.getElementsByTagName('script')[0];
  191. o.async=1; o.src=t; o.id='fathom-script';
  192. m.parentNode.insertBefore(o,m)
  193. })(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
  194. fathom('set', 'siteId', 'APYRK');
  195. fathom('trackPageview');
  196. </script>
  197. </body>
  198. </html>