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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. <link rel="author" href="xythobuz@xythobuz.de">
  9. <link rel="shortcut icon" href="img/favicon.ico">
  10. <script type="text/javascript" src="js/sh_main.js"></script>
  11. <link type="text/css" rel="stylesheet" href="css/sh_bright.min.css" />
  12. <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
  13. <link rel="alternate" type="application/rss+xml" title="Blog" href="rss.xml">
  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. <!--%
  17. if page.get("flattr", "false") == "true":
  18. print "<script type='text/javascript'>"
  19. print "/* <![CDATA[ */"
  20. print "(function() {"
  21. print "var s = document.createElement('script');"
  22. print "var t = document.getElementsByTagName('script')[0];"
  23. print "s.type = 'text/javascript';"
  24. print "s.async = true;"
  25. print "s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';"
  26. print "t.parentNode.insertBefore(s, t);"
  27. print "})();"
  28. print "/* ]]> */"
  29. print "</script>"
  30. %-->
  31. </head>
  32. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  33. <!--%
  34. if page.get("github", "") != "":
  35. # GitHub Fork-Me Ribbon
  36. print '<div class="github-fork-ribbon-wrapper right">'
  37. print '<div class="github-fork-ribbon"><a href="'
  38. print page.github
  39. print '">Fork me on GitHub</a></div></div>'
  40. %-->
  41. <div id="header">
  42. <h1>xythobuz.de</h1>
  43. <h2>{{ page.get("funny", htmlspecialchars(page["title"])) }}</h2>
  44. </div>
  45. <!--%
  46. if len("".join(["%s" % lang for lang in page["lang_links"]])) > 2:
  47. print '<div id="lang"><span id="lang2">Translation: '
  48. print " | ".join(["<a href='%s'>%s</a>" % (url, lang) for lang, url in page["lang_links"].iteritems()])
  49. print "</span></div>"
  50. %-->
  51. <div class="colmask leftmenu"><div class="colleft">
  52. <div class="content">
  53. {{ __content__ }}
  54. <!--%
  55. import sys
  56. # Flattr Button
  57. if page.get("flattr", "false") == "true":
  58. print '<span id="flattr">'
  59. sys.stdout.write('<a class="FlattrButton" href="')
  60. sys.stdout.write(BASE_URL)
  61. sys.stdout.write('/')
  62. sys.stdout.write(page.url)
  63. sys.stdout.write('" title="')
  64. sys.stdout.write(htmlspecialchars(page.title))
  65. sys.stdout.write('">')
  66. sys.stdout.write(htmlspecialchars(page.get("description", page.title)))
  67. sys.stdout.write("</a>\n")
  68. print '</span>'
  69. # Twitter Button
  70. if page.get("twitter", "") != "":
  71. print '<span id="twitter">'
  72. sys.stdout.write('<a href="https://twitter.com/share" class="twitter-share-button" data-via="')
  73. sys.stdout.write(page.twitter)
  74. sys.stdout.write('" data-dnt="true" data-related="')
  75. sys.stdout.write(page.twitter)
  76. sys.stdout.write('" data-count="vertical">Tweet</a>')
  77. sys.stdout.write('<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");')
  78. sys.stdout.write("</script>\n")
  79. print '</span>'
  80. # Reddit Button
  81. if page.get("reddit", "") != "":
  82. print '<span id="reddit">'
  83. sys.stdout.write('<script type="text/javascript">reddit_url = "')
  84. if (page.reddit == "true"):
  85. sys.stdout.write(BASE_URL)
  86. sys.stdout.write('/')
  87. sys.stdout.write(page.url)
  88. else:
  89. sys.stdout.write(page.reddit)
  90. sys.stdout.write('";</script>')
  91. sys.stdout.write("\n")
  92. sys.stdout.write('<script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>')
  93. sys.stdout.write("\n")
  94. print '</span>'
  95. # GitHub Fork Button
  96. if page.get("github", "") != "":
  97. print '<span id="github">'
  98. sys.stdout.write('<a href="')
  99. sys.stdout.write(page.github)
  100. sys.stdout.write('" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>')
  101. sys.stdout.write("\n")
  102. print '</span>'
  103. %-->
  104. <!--%
  105. if page.get("print", "false") == "true":
  106. 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>"""
  107. if page.get("comments", "false") == "true":
  108. print '<div id="disqus_thread"></div>'
  109. print '<script type="text/javascript">'
  110. print 'var disqus_shortname = "xythobuz";'
  111. print '(function() {'
  112. print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;'
  113. print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
  114. print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);'
  115. print '})();'
  116. print '</script>'
  117. print '<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>'
  118. print '<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>'
  119. %-->
  120. </div>
  121. <div class="nav">
  122. <h3>Thomas Buck</h3>
  123. <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
  124. <p id="bio">
  125. I'm a 19 year old Information Engineering student from Germany, mostly building cool stuff with AVR microcontrollers. All of my projects are released as <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a> on my <a href="https://github.com/xythobuz">GitHub Profile</a>.
  126. </p>
  127. <ul id="menuList">
  128. <!--%
  129. blanked = "a"
  130. mpages = [p for p in pages if "menu-position" in p and p.lang == "en"]
  131. mpages.sort(key=lambda p: int(p["menu-position"]))
  132. entry = '<li><a href="%s">%s</a></li>'
  133. for p in mpages:
  134. if int(p["menu-position"]) >= 10 and blanked == "a":
  135. blanked = "b"
  136. print '<li>&nbsp;</li>'
  137. if int(p["menu-position"]) >= 55 and blanked == "b":
  138. blanked = "c"
  139. print '<li>&nbsp;</li>'
  140. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  141. %-->
  142. </ul>
  143. <div id="recent">
  144. Recent blog posts:
  145. <ul id="recentList">
  146. <!--%
  147. from datetime import datetime
  148. posts = [p for p in pages if "post" in p] # get all blog post pages
  149. posts.sort(key=lambda p: p.get("date"), reverse=True) # sort post pages by date
  150. posts = posts[:5]
  151. for p in posts:
  152. print '<li class="recentList"><a href="%s">%s</a></li><li class="recentDate">%s</li>' % (p.url, p.post, p.date)
  153. %-->
  154. </ul>
  155. </div>
  156. </div>
  157. </div></div>
  158. <img id="dude" alt="The Dude abides..." src="img/dude.png">
  159. <img id="walter" alt="Mark it zero!" src="img/walter.png">
  160. <div id="footer">
  161. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  162. &middot;
  163. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  164. &middot;
  165. <a href="http://validator.w3.org/check?uri=referer">Validate HTML</a>
  166. &middot;
  167. <a href="http://jigsaw.w3.org/css-validator/validator?uri=xythobuz.de%2Fstyle.css&amp;profile=css3">Validate CSS</a>
  168. &middot;
  169. <a href="http://feed1.w3.org/check.cgi?url={{ BASE_URL }}/rss.xml">Validate RSS</a>
  170. &middot;
  171. <a href="http://www.validome.org/google/validate?url={{ BASE_URL }}&amp;googleTyp=SITEMAP">Validate Sitemap</a>
  172. </div>
  173. <img src="stats/count.php?img" alt="Analytics">
  174. <!--%
  175. print '<script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>'
  176. %-->
  177. <script type="text/javascript">
  178. var _gaq = _gaq || [];
  179. _gaq.push(['_setAccount', 'UA-39163591-1']);
  180. _gaq.push(['_setDomainName', 'xythobuz.org']);
  181. _gaq.push(['_setAllowLinker', true]);
  182. _gaq.push(['_trackPageview']);
  183. (function() {
  184. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  185. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  186. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  187. })();
  188. </script>
  189. </body>
  190. </html>