My static website generator using poole https://www.xythobuz.de
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

page.html 11KB

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