My static website generator using poole https://www.xythobuz.de
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

page.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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.min.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.min.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');" style="font-size: 1.8em; font-family: 'Droid Sans', sans-serif;">
  36. <!--%
  37. if page.get("github", "") != "":
  38. # GitHub Fork-Me Ribbon
  39. print '<div class="github-fork-ribbon-wrapper right fixed">'
  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 navbar-fixed-top">
  45. <div class="navbar-inner">
  46. <ul class="nav navbar-nav">
  47. <!--%
  48. mpages = [p for p in pages if p.get("parent", "") == "main" and p.lang == "en"]
  49. mpages.sort(key=lambda p: int(p["position"]))
  50. entry = '<li><a href="%s">%s</a></li>'
  51. newEntry = '<li class="dropdown"><a href="%s" class="dropdown-toggle" data-toggle="dropdown">%s <b class="caret"></b></a><ul class="dropdown-menu">'
  52. newEntry2 = '<li class="dropdown-submenu"><a href="%s" class="dropdown-toggle disabled" data-toggle="dropdown">%s</a><ul class="dropdown-menu">'
  53. for p in mpages:
  54. sub = [r for r in pages if r.get("parent", "") == p.url.replace("/", "").replace(".html", "") and r.lang == "en"]
  55. sub.sort(key=lambda r: int(r["position"]))
  56. if len(sub) > 0:
  57. print(newEntry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  58. for r in sub:
  59. subsub = [s for s in pages if s.get("parent", "") == r.url.replace("/", "").replace(".html", "") and s.lang == "en"]
  60. subsub.sort(key = lambda s: int(s["position"]))
  61. if len(subsub) > 0:
  62. print(newEntry2 % (htmlspecialchars(r["url"]), htmlspecialchars(r["title"])))
  63. for s in subsub:
  64. print(entry % (htmlspecialchars(s["url"]), htmlspecialchars(s["title"])))
  65. print("</ul>")
  66. else:
  67. print(entry % (htmlspecialchars(r["url"]), htmlspecialchars(r["title"])))
  68. print("</ul>")
  69. else:
  70. print(entry % (htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
  71. %-->
  72. <li class="divider-vertical"></li>
  73. <li><a href="http://xythobuz.de/lastmusic">♫</a></li>
  74. <!--%
  75. tmp = [p for p in page["lang_links"].iteritems()]
  76. if len(tmp) > 1:
  77. print '<li class="divider-vertical"></li>'
  78. print '<li class="dropdown"><a href="language.html" class="dropdown-toggle" data-toggle="dropdown">Language <b class="caret"></b></a><ul class="dropdown-menu">'
  79. print " ".join(["<li><a href='%s'>%s</a></li>" % (url, lang) for lang, url in page["lang_links"].iteritems()]).replace(">en<", ">English<").replace(">de<", ">Deutsch<")
  80. print "</ul></li>"
  81. print ''
  82. %-->
  83. <li class="divider-vertical"></li>
  84. <script type="text/javascript">
  85. function sitesearch(curobj) {
  86. curobj.q.value = "site:xythobuz.de " + curobj.r.value
  87. }
  88. </script>
  89. <form class="navbar-form pull-right" action="http://www.google.com/search" method="get" onSubmit="sitesearch(this)">
  90. <input name="q" type="hidden" />
  91. <input name="r" type="text" class="form-control" placeholder="Search..." />
  92. </form>
  93. </ul>
  94. </div>
  95. </div>
  96. <div style="width: 75%; margin-left: auto; margin-right: auto; padding-top: 50px;">
  97. {{ __content__ }}
  98. <!--%
  99. import sys
  100. # Horizontal Line and Centered DIV
  101. if page.get("flattr", "false") == "true" or page.get("twitter", "") != "" or page.get("reddit", "") != "" or page.get("github", "") != "" or page.get("print", "false") == "true":
  102. print '<hr>'
  103. print '<div style="text-align: center;">'
  104. # Print and PDF Buttons
  105. if page.get("print", "false") == "true":
  106. 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>"""
  107. # Flattr Button
  108. if page.get("flattr", "false") == "true":
  109. print '<span id="flattr">'
  110. sys.stdout.write('<a class="FlattrButton" href="')
  111. sys.stdout.write(BASE_URL)
  112. sys.stdout.write('/')
  113. sys.stdout.write(page.url)
  114. sys.stdout.write('" title="')
  115. sys.stdout.write(htmlspecialchars(page.title))
  116. sys.stdout.write('" data-flattr-button="compact">')
  117. sys.stdout.write(htmlspecialchars(page.get("description", page.title)))
  118. sys.stdout.write("</a>\n")
  119. print '</span>'
  120. # Twitter Button
  121. if page.get("twitter", "") != "":
  122. print '<span id="twitter">'
  123. sys.stdout.write('<a href="https://twitter.com/share" class="twitter-share-buttdata-via="')
  124. sys.stdout.write(page.twitter)
  125. sys.stdout.write('" data-dnt="true" data-related="')
  126. sys.stdout.write(page.twitter)
  127. sys.stdout.write('" data-count="vertical">Tweet</a>')
  128. 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");')
  129. sys.stdout.write("</script>\n")
  130. print '</span>'
  131. # Reddit Button
  132. if page.get("reddit", "") != "":
  133. print '<span id="reddit">'
  134. sys.stdout.write('<script type="text/javascript">reddit_url = "')
  135. if (page.reddit == "true"):
  136. sys.stdout.write(BASE_URL)
  137. sys.stdout.write('/')
  138. sys.stdout.write(page.url)
  139. else:
  140. sys.stdout.write(page.reddit)
  141. sys.stdout.write('";</script>')
  142. sys.stdout.write("\n")
  143. sys.stdout.write('<script type="text/javascript" src="http://www.redcom/static/button/button2.js"></script>')
  144. sys.stdout.write("\n")
  145. print '</span>'
  146. # GitHub Fork Button. Place this last!
  147. if page.get("github", "") != "":
  148. print '<span id="github">'
  149. sys.stdout.write('<a href="')
  150. sys.stdout.write(page.github)
  151. sys.stdout.write('" class="gitforked-button gitforked-forks gitforked-watchers"></a>')
  152. sys.stdout.write("\n")
  153. print '</span>'
  154. # Close DIV, horizontal line when no comments
  155. if page.get("flattr", "false") == "true" or page.get("twitter", "") != "" or page.get("reddit", "") != "" or page.get("github", "") != "" or page.get("print", "false") == "true":
  156. print '</div>'
  157. if page.get("comments", "false") != "true":
  158. print '<hr>'
  159. # Disqus Comments
  160. if page.get("comments", "false") == "true":
  161. print '<hr><div id="disqus_thread"></div>'
  162. print '<script type="text/javascript">'
  163. print 'var disqus_shortname = "xythobuz";'
  164. print '(function() {'
  165. print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;'
  166. print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
  167. print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] ).appendChild(dsq);'
  168. print '})();'
  169. print '</script>'
  170. print '<noscript>Please enable JavaScript to view the <a href="http://disqus. com/?ref_noscript">comments powered by Disqus.</a></noscript>'
  171. print '<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>'
  172. elif page.get("comments", "false") != "false":
  173. print '<p><a href="%s">Head over here to discuss this article!</a></p>' % page.get("comments", "false")
  174. %-->
  175. </div>
  176. <div style="color: gray; text-align: center;">
  177. Made with <a href="http://bitbucket.org/obensonne/poole">Poole</a>, <a href="http://twitter.github.io/bootstrap/index.html">Bootstrap</a> and <a href="http://shjs.sourceforge.net">SHJS</a>
  178. &middot;
  179. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  180. </div>
  181. <img src="http://xythobuz.de/stats/count.php?img" alt="Analytics">
  182. <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
  183. <script type="text/javascript">
  184. var _gaq = _gaq || [];
  185. _gaq.push(['_setAccount', 'UA-39163591-1']);
  186. _gaq.push(['_setDomainName', 'xythobuz.org']);
  187. _gaq.push(['_setAllowLinker', true]);
  188. _gaq.push(['_trackPageview']);
  189. setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])", 30000);
  190. (function() {
  191. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  192. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  193. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  194. })();
  195. </script>
  196. </body>
  197. </html>