Browse Source

Small Flattr Button

Thomas Buck 11 years ago
parent
commit
e814c0f9de
1 changed files with 8 additions and 6 deletions
  1. 8
    6
      page.html

+ 8
- 6
page.html View File

@@ -72,12 +72,14 @@
72 72
                 %-->
73 73
                 <li class="divider-vertical"></li>
74 74
                 <li><a href="http://xythobuz.de/lastmusic">♫</a></li>
75
-                <li class="divider-vertical"></li>
76 75
                 <!--%
77
-                        print '<li class="dropdown"><a href="language.html" class="dropdown-toggle" data-toggle="dropdown">Language<b class="caret"></b></a><ul class="dropdown-menu">'
78
-                        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<")
79
-                        print "</ul></li>"
80
-                        print ''
76
+                        tmp = [p for p in page["lang_links"].iteritems()]
77
+                        if len(tmp) > 1:
78
+                            print '<li class="divider-vertical"></li>'
79
+                            print '<li class="dropdown"><a href="language.html" class="dropdown-toggle" data-toggle="dropdown">Language<b class="caret"></b></a><ul class="dropdown-menu">'
80
+                            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<")
81
+                            print "</ul></li>"
82
+                            print ''
81 83
                 %-->
82 84
                 <li class="divider-vertical"></li>
83 85
                 <script type="text/javascript">
@@ -116,7 +118,7 @@
116 118
                 sys.stdout.write(page.url)
117 119
                 sys.stdout.write('" title="')
118 120
                 sys.stdout.write(htmlspecialchars(page.title))
119
-                sys.stdout.write('">')
121
+                sys.stdout.write('" data-flattr-button="compact">')
120 122
                 sys.stdout.write(htmlspecialchars(page.get("description", page.title)))
121 123
                 sys.stdout.write("</a>\n")
122 124
                 print '</span>'

Loading…
Cancel
Save