all repos — h3rald @ 0cf024149fc89e103107ef70e2bda1bdd46db89b

The sources of https://h3rald.com

Updated social counters.
* Closes #47.
h3rald h3rald@h3rald.com
Thu, 10 Sep 2009 17:29:26 +0200
commit

0cf024149fc89e103107ef70e2bda1bdd46db89b

parent

28830bb965303071622d3e8b0644939de64aafbe

M content/css/_elements.sasscontent/css/_elements.sass

@@ -27,7 +27,7 @@ color: #555

font-style: italic padding: 0 0 0 33px margin: 0 - background: url(../images/theme/theme/quote.gif) no-repeat top left + background: url(../images/theme/quote.png) no-repeat top left .hidden

@@ -203,7 +203,7 @@

&.article-meta float: left list-style-type: none - border-left: 3px solid #ccc + border-left: 3px solid #222 padding-left: 0.5em margin-left: 0.5em margin-bottom: 1em

@@ -213,11 +213,19 @@ text-align: center

list-style-type: none display: block margin: auto - -.article-buttons li + border: 1px solid #222 + background: #fff + padding-top: 5px + +#content .article-buttons li + font-family: "Arial", "Sans-serif" + font-size: 0.8em + font-weight: bold display: inline + margin-left: 0 + vertical-align: top -.article-meta li +#content .article-meta li margin-left: 0 .date
M content/css/_layout.sasscontent/css/_layout.sass

@@ -11,6 +11,7 @@

html, body height: 100% line-height: 1.2 + background: #000 url(../images/theme/pattern.png) p, ol, ul margin: 0.5em 0

@@ -97,11 +98,9 @@

#wrapper min-height: 100% margin-bottom: -40px - background: #000 url(../images/theme/pattern.png) #border-bottom clear: both - background: #000 height: auto padding: 0 width: 100%
M layouts/article_buttons.erblayouts/article_buttons.erb

@@ -10,10 +10,22 @@ var digg_url = '<%= url_for @item %>';

var digg_skin = 'compact'; var digg_window = 'new'; var tweetmeme_style = 'compact'; + function delicious_counter(data) { + var posts = data[0].total_posts; + if (!posts) return; + var text = posts+" bookmarks"; + if (posts == 1) { text = posts+" bookmarks" }; + document.getElementById('delcounter').innerHTML = text; + } </script> <ul class="article-buttons"> <li><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></li> <li><script type="text/javascript" src="http://www.reddit.com/button.js?t=1"></script></li> <li><script type="text/javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script> </li> <li><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></li> + <li><a href="http://www.stumbleupon.com/submit?url=<%= url_for @item %>"> <img border=0 src="http://cdn.stumble-upon.com/images/120x20_su_gray.gif" alt=""></a></li> + <li> + <script src="http://badges.del.icio.us/feeds/json/url/data?url=<%= url_for @item %>&amp;callback=delicious_counter"></script> + <span id="delcounter">0 bookmarks</span><img src="http://static.delicious.com/img/delicious.small.gif" /><a href="http://delicious.com/post?url=<%= url_for @item %>&amp;title=<%= @item[:title]%>">Save</a> + </li> </ul>