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 9.0KB

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. <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. <!--%
  54. import sys
  55. # Flattr Button
  56. if page.get("flattr", "false") == "true":
  57. print '<div id="flattr">'
  58. sys.stdout.write('<a class="FlattrButton" href="')
  59. sys.stdout.write(BASE_URL)
  60. sys.stdout.write('/')
  61. sys.stdout.write(page.url)
  62. sys.stdout.write('" title="')
  63. sys.stdout.write(htmlspecialchars(page.title))
  64. sys.stdout.write('">')
  65. sys.stdout.write(htmlspecialchars(page.get("description", page.title)))
  66. sys.stdout.write("</a>\n")
  67. print '</div>'
  68. # Twitter Button
  69. if page.get("twitter", "") != "":
  70. print '<div id="twitter">'
  71. sys.stdout.write('<a href="https://twitter.com/share" class="twitter-share-button" data-via="')
  72. sys.stdout.write(page.twitter)
  73. sys.stdout.write('" data-dnt="true" data-related="')
  74. sys.stdout.write(page.twitter)
  75. sys.stdout.write('" data-count="vertical">Tweet</a>')
  76. 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");')
  77. sys.stdout.write("</script>\n")
  78. print '</div>'
  79. # Reddit Button
  80. if page.get("reddit", "") != "":
  81. print '<div id="reddit">'
  82. sys.stdout.write('<script type="text/javascript">reddit_url = "')
  83. if (page.reddit == "true"):
  84. sys.stdout.write(BASE_URL)
  85. sys.stdout.write('/')
  86. sys.stdout.write(page.url)
  87. else:
  88. sys.stdout.write(page.reddit)
  89. sys.stdout.write('";</script>')
  90. sys.stdout.write("\n")
  91. sys.stdout.write('<script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>')
  92. sys.stdout.write("\n")
  93. print '</div>'
  94. # GitHub Fork Button
  95. if page.get("github", "") != "":
  96. print '<div id="github">'
  97. sys.stdout.write('<a href="')
  98. sys.stdout.write(page.github)
  99. sys.stdout.write('" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>')
  100. sys.stdout.write("\n")
  101. print '</div>'
  102. %-->
  103. {{ __content__ }}
  104. <!--%
  105. if page.get("comments", "false") == "true":
  106. print '<div id="disqus_thread"></div>'
  107. print '<script type="text/javascript">'
  108. print 'var disqus_shortname = "xythobuz";'
  109. print '(function() {'
  110. print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;'
  111. print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
  112. print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);'
  113. print '})();'
  114. print '</script>'
  115. print '<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>'
  116. print '<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>'
  117. %-->
  118. </div>
  119. <div class="nav">
  120. <h3>Thomas Buck</h3>
  121. <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
  122. <p id="bio">
  123. 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 Free Software.
  124. </p>
  125. <ul id="menuList">
  126. <!--%
  127. blanked = "a"
  128. mpages = [p for p in pages if "menu-position" in p and p.lang == "en"]
  129. mpages.sort(key=lambda p: int(p["menu-position"]))
  130. entry = '<li><a href="%s">%s</a></li>'
  131. for p in mpages:
  132. if int(p["menu-position"]) >= 10 and blanked == "a":
  133. blanked = "b"
  134. print '<li>&nbsp;</li>'
  135. if int(p["menu-position"]) >= 55 and blanked == "b":
  136. blanked = "c"
  137. print '<li>&nbsp;</li>'
  138. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  139. %-->
  140. </ul>
  141. <div id="recent">
  142. Recent blog posts:
  143. <ul id="recentList">
  144. <!--%
  145. from datetime import datetime
  146. posts = [p for p in pages if "post" in p] # get all blog post pages
  147. posts.sort(key=lambda p: p.get("date"), reverse=True) # sort post pages by date
  148. posts = posts[:5]
  149. for p in posts:
  150. print '<li class="recentList"><a href="%s">%s</a></li><li class="recentDate">%s</li>' % (p.url, p.post, p.date)
  151. %-->
  152. </ul>
  153. </div>
  154. </div>
  155. </div></div>
  156. <img id="dude" alt="The Dude abides..." src="img/dude.png">
  157. <img id="walter" alt="Mark it zero!" src="img/walter.png">
  158. <div id="footer">
  159. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  160. &middot;
  161. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  162. &middot;
  163. <a href="http://validator.w3.org/check?uri=referer">Validate HTML</a>
  164. &middot;
  165. <a href="http://jigsaw.w3.org/css-validator/validator?uri=xythobuz.de%2Fstyle.css&amp;profile=css3">Validate CSS</a>
  166. &middot;
  167. <a href="http://feed1.w3.org/check.cgi?url={{ BASE_URL }}/rss.xml">Validate RSS</a>
  168. &middot;
  169. <a href="http://www.validome.org/google/validate?url={{ BASE_URL }}&amp;googleTyp=SITEMAP">Validate Sitemap</a>
  170. </div>
  171. <img src="stats/count.php?img" alt="Analytics">
  172. <!--%
  173. print '<script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>'
  174. %-->
  175. </body>
  176. </html>