Explorar el Código

Centered Share Widgets

Thomas Buck hace 12 años
padre
commit
71e9da409e
Se han modificado 1 ficheros con 17 adiciones y 4 borrados
  1. 17
    4
      page.html

+ 17
- 4
page.html Ver fichero

98
         <!--%
98
         <!--%
99
             import sys
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
             # Flattr Button
110
             # Flattr Button
102
             if page.get("flattr", "false") == "true":
111
             if page.get("flattr", "false") == "true":
103
                 print '<span id="flattr">'
112
                 print '<span id="flattr">'
140
                 sys.stdout.write("\n")
149
                 sys.stdout.write("\n")
141
                 print '</span>'
150
                 print '</span>'
142
 
151
 
143
-            # GitHub Fork Button
152
+            # GitHub Fork Button. Place this last!
144
             if page.get("github", "") != "":
153
             if page.get("github", "") != "":
145
                 print '<span id="github">'
154
                 print '<span id="github">'
146
                 sys.stdout.write('<a href="')
155
                 sys.stdout.write('<a href="')
149
                 sys.stdout.write("\n")
158
                 sys.stdout.write("\n")
150
                 print '</span>'
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
             if page.get("comments", "false") == "true":
168
             if page.get("comments", "false") == "true":
156
-                print '<div id="disqus_thread"></div>'
169
+                print '<hr><div id="disqus_thread"></div>'
157
                 print '<script type="text/javascript">'
170
                 print '<script type="text/javascript">'
158
                 print 'var disqus_shortname = "xythobuz";'
171
                 print 'var disqus_shortname = "xythobuz";'
159
                 print '(function() {'
172
                 print '(function() {'

Loading…
Cancelar
Guardar