My static website generator using poole https://www.xythobuz.de
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

page.html 11KB

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