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

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