|
@@ -98,6 +98,15 @@
|
98
|
98
|
<!--%
|
99
|
99
|
import sys
|
100
|
100
|
|
|
101
|
+ # Horizontal Line and Centered DIV
|
|
102
|
+ if page.get("flattr", "false") == "true" or page.get("twitter", "") != "" or page.get("reddit", "") != "" or page.get("github", "") != "" or page.get("print", "false") == "true":
|
|
103
|
+ print '<hr>'
|
|
104
|
+ print '<div style="text-align: center;">'
|
|
105
|
+
|
|
106
|
+ # Print and PDF Buttons
|
|
107
|
+ if page.get("print", "false") == "true":
|
|
108
|
+ 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>"""
|
|
109
|
+
|
101
|
110
|
# Flattr Button
|
102
|
111
|
if page.get("flattr", "false") == "true":
|
103
|
112
|
print '<span id="flattr">'
|
|
@@ -140,7 +149,7 @@
|
140
|
149
|
sys.stdout.write("\n")
|
141
|
150
|
print '</span>'
|
142
|
151
|
|
143
|
|
- # GitHub Fork Button
|
|
152
|
+ # GitHub Fork Button. Place this last!
|
144
|
153
|
if page.get("github", "") != "":
|
145
|
154
|
print '<span id="github">'
|
146
|
155
|
sys.stdout.write('<a href="')
|
|
@@ -149,11 +158,15 @@
|
149
|
158
|
sys.stdout.write("\n")
|
150
|
159
|
print '</span>'
|
151
|
160
|
|
152
|
|
- if page.get("print", "false") == "true":
|
153
|
|
- 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>"""
|
|
161
|
+ # Close DIV, horizontal line when no comments
|
|
162
|
+ if page.get("flattr", "false") == "true" or page.get("twitter", "") != "" or page.get("reddit", "") != "" or page.get("github", "") != "" or page.get("print", "false") == "true":
|
|
163
|
+ print '</div>'
|
|
164
|
+ if page.get("comments", "false") != "true":
|
|
165
|
+ print '<hr>'
|
154
|
166
|
|
|
167
|
+ # Disqus Comments
|
155
|
168
|
if page.get("comments", "false") == "true":
|
156
|
|
- print '<div id="disqus_thread"></div>'
|
|
169
|
+ print '<hr><div id="disqus_thread"></div>'
|
157
|
170
|
print '<script type="text/javascript">'
|
158
|
171
|
print 'var disqus_shortname = "xythobuz";'
|
159
|
172
|
print '(function() {'
|