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

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