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 11KB

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