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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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/sh_bright.min.css" />
  13. <link rel="stylesheet" href="css/bootstrap.css" type="text/css" media="screen" />
  14. <link rel="stylesheet" href="css/gh-fork-ribbon.css" />
  15. <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
  16. <script type="text/javascript" src="js/sh_main.js"></script>
  17. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
  18. <script type="text/javascript" src="js/bootstrap.js"></script>
  19. <!--%
  20. if page.get("flattr", "false") == "true":
  21. print "<script type='text/javascript'>"
  22. print "/* <![CDATA[ */"
  23. print "(function() {"
  24. print "var s = document.createElement('script');"
  25. print "var t = document.getElementsByTagName('script')[0];"
  26. print "s.type = 'text/javascript';"
  27. print "s.async = true;"
  28. print "s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';"
  29. print "t.parentNode.insertBefore(s, t);"
  30. print "})();"
  31. print "/* ]]> */"
  32. print "</script>"
  33. %-->
  34. </head>
  35. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  36. <!--%
  37. if page.get("github", "") != "":
  38. # GitHub Fork-Me Ribbon
  39. print '<div class="github-fork-ribbon-wrapper right">'
  40. print '<div class="github-fork-ribbon"><a href="'
  41. print page.github
  42. print '">Fork me on GitHub</a></div></div>'
  43. %-->
  44. <div class="navbar">
  45. <div class="navbar-inner">
  46. <a class="brand" href="http://xythobuz.de/lastmusic">♫</a>
  47. <ul class="nav">
  48. <!--%
  49. mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
  50. mpages.sort(key=lambda p: int(p["position"]))
  51. entry = '<li><a href="%s">%s</a></li>'
  52. newEntry = '<li class="dropdown"><a href="%s" class="dropdown-toggle" data-toggle="dropdown">%s<b class="caret"></b></a><ul class="dropdown-menu">'
  53. newEntry2 = '<li class="dropdown-submenu"><a href="%s" class="dropdown-toggle" data-toggle="dropdown">%s</a><ul class="dropdown-menu">'
  54. for p in mpages:
  55. sub = [r for r in pages if r.get("parent", "") == p.url.replace("/", "").replace(".html", "") and r.lang == "en"]
  56. sub.sort(key=lambda r: int(r["position"]))
  57. if len(sub) > 0:
  58. print(newEntry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  59. for r in sub:
  60. subsub = [s for s in pages if s.get("parent", "") == r.url.replace("/", "").replace(".html", "") and s.lang == "en"]
  61. subsub.sort(key = lambda s: int(s["position"]))
  62. if len(subsub) > 0:
  63. print(newEntry2 % (htmlspecialchars(r["url"]), htmlspecialchars(r["title"])))
  64. for s in subsub:
  65. print(entry % (htmlspecialchars(s["url"]), htmlspecialchars(s["title"])))
  66. print("</ul>")
  67. else:
  68. print(entry % (htmlspecialchars(r["url"]), htmlspecialchars(r["title"])))
  69. print("</ul>")
  70. else:
  71. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  72. %-->
  73. </ul>
  74. </div>
  75. </div>
  76. <div id="header">
  77. <h1>xythobuz.de</h1>
  78. <p><a href="http://xythobuz.de/lastmusic">♫</a></p>
  79. <h2>{{ page.get("funny", htmlspecialchars(page["title"])) }}</h2>
  80. </div>
  81. <!--%
  82. if len("".join(["%s" % lang for lang in page["lang_links"]])) > 2:
  83. print '<div class="btn-group"><a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Language<span class="caret"></span></a><ul class="dropdown-menu">'
  84. print " | ".join(["<li><a href='%s'>%s</a></li>" % (url, lang) for lang, url in page.iteritems()])
  85. print "</ul></div>"
  86. %-->
  87. <div id="content">
  88. {{ __content__ }}
  89. <!--%
  90. import sys
  91. # Flattr Button
  92. if page.get("flattr", "false") == "true":
  93. print '<span id="flattr">'
  94. sys.stdout.write('<a class="FlattrButton" href="')
  95. sys.stdout.write(BASE_URL)
  96. sys.stdout.write('/')
  97. sys.stdout.write(page.url)
  98. sys.stdout.write('" title="')
  99. sys.stdout.write(htmlspecialchars(page.title))
  100. sys.stdout.write('">')
  101. sys.stdout.write(htmlspecialchars(page.get("description", page.title)))
  102. sys.stdout.write("</a>\n")
  103. print '</span>'
  104. # Twitter Button
  105. if page.get("twitter", "") != "":
  106. print '<span id="twitter">'
  107. sys.stdout.write('<a href="https://twitter.com/share" class="twitter-share-buttdata-via="')
  108. sys.stdout.write(page.twitter)
  109. sys.stdout.write('" data-dnt="true" data-related="')
  110. sys.stdout.write(page.twitter)
  111. sys.stdout.write('" data-count="vertical">Tweet</a>')
  112. sys.stdout.write('<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twi.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitwjs");')
  113. sys.stdout.write("</script>\n")
  114. print '</span>'
  115. # Reddit Button
  116. if page.get("reddit", "") != "":
  117. print '<span id="reddit">'
  118. sys.stdout.write('<script type="text/javascript">reddit_url = "')
  119. if (page.reddit == "true"):
  120. sys.stdout.write(BASE_URL)
  121. sys.stdout.write('/')
  122. sys.stdout.write(page.url)
  123. else:
  124. sys.stdout.write(page.reddit)
  125. sys.stdout.write('";</script>')
  126. sys.stdout.write("\n")
  127. sys.stdout.write('<script type="text/javascript" src="http://www.redcom/static/button/button2.js"></script>')
  128. sys.stdout.write("\n")
  129. print '</span>'
  130. # GitHub Fork Button
  131. if page.get("github", "") != "":
  132. print '<span id="github">'
  133. sys.stdout.write('<a href="')
  134. sys.stdout.write(page.github)
  135. sys.stdout.write('" class="gitforked-button gitforked-forks gitforked-watchers"></a>')
  136. sys.stdout.write("\n")
  137. print '</span>'
  138. if page.get("print", "false") == "true":
  139. print """<div id="print"><script>var pfHeaderImgUrl = '';var pfHeaderTagline = '';var pfdisableClickToDel = 0;var pfHideImages = 0;var pfImageDisplayStyle = 'right';var pfDisablePDF = 0;var pfDisableEmail = 0;var pfDisablePrint = 0;var pfCustomCSS = '';var pfBtVersion='1';(function(){var js, pf;pf = document.createElement('script');pf.type = 'text/javascript';if('https:' == document.location.protocol){js='https://pf-cdn.printfriendly.com/ssl/main.js'}else{js='http://cdn.printfriendly.com/printfriendly.js'}pf.src=js;document.getElementsByTagName('head')[0].appendChild(pf)})();</script><a href="http://www.printfriendly.com" style="color:#6D9F00;text-decoration:none;" class="printfriendly" onclick="window.print();return false;" title="Printer Friendly and PDF"><img style="border:none;margin:0 6px" src="https://pf-cdn.printfriendly.com/images/icons/pf-print-icon.gif" width="16" height="15" alt="Print Friendly Version of this page" />Print <img style="border:none;margin:0 6px" src="https://pf-cdn.printfriendly.com/images/icons/pf-pdf-icon.gif" width="12" height="12" alt="Get a PDF version of this webpage" />PDF</a></div>"""
  140. if page.get("comments", "false") == "true":
  141. print '<div id="disqus_thread"></div>'
  142. print '<script type="text/javascript">'
  143. print 'var disqus_shortname = "xythobuz";'
  144. print '(function() {'
  145. print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;'
  146. print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
  147. print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] ).appendChild(dsq);'
  148. print '})();'
  149. print '</script>'
  150. print '<noscript>Please enable JavaScript to view the <a href="http://disqus. com/?ref_noscript">comments powered by Disqus.</a></noscript>'
  151. print '<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>'
  152. elif page.get("comments", "false") != "false":
  153. print '<p><a href="%s">Head over here to discuss this article!</a></p>' % page.get("comments", "false")
  154. %-->
  155. </div>
  156. <div style="color: gray; text-align: center;">
  157. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  158. &middot;
  159. Made with <a href="http://twitter.github.io/bootstrap/index.html">Bootstrap</a>
  160. &middot;
  161. Using <a href="http://shjs.sourceforge.net">SHJS</a>
  162. &middot;
  163. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  164. </div>
  165. <img src="stats/count.php?img" alt="Analytics">
  166. <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
  167. <script type="text/javascript">
  168. var _gaq = _gaq || [];
  169. _gaq.push(['_setAccount', 'UA-39163591-1']);
  170. _gaq.push(['_setDomainName', 'xythobuz.org']);
  171. _gaq.push(['_setAllowLinker', true]);
  172. _gaq.push(['_trackPageview']);
  173. (function() {
  174. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  175. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  176. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  177. })();
  178. </script>
  179. </body>
  180. </html>