all repos — h3rald @ 264bd33e343a0f9a7916877497fdf881d537c06f

The sources of https://h3rald.com

Fixed delicious bug; updated background.
h3rald h3rald@h3rald.com
Fri, 11 Sep 2009 09:05:43 +0200
commit

264bd33e343a0f9a7916877497fdf881d537c06f

parent

0cf024149fc89e103107ef70e2bda1bdd46db89b

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

@@ -215,7 +215,7 @@ display: block

margin: auto border: 1px solid #222 background: #fff - padding-top: 5px + padding: 5px 0 #content .article-buttons li font-family: "Arial", "Sans-serif"
M content/css/_layout.sasscontent/css/_layout.sass

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

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

@@ -81,7 +81,7 @@ height: 19px

background: url(../images/theme/ribbon.png) repeat-x #main - background: #fff url(../images/theme/main.png) + background: #fff url(../images/theme/main.jpg) #content
M content/js/init.jscontent/js/init.js

@@ -3,6 +3,13 @@ -----

$(function() { $('#gallery a').lightBox(); }); +function delicious_counter(data) { + var posts = data[0].total_posts; + if (!posts) return; + var text = posts+" bookmarks"; + if (posts == 1) { text = posts+" bookmark" }; + $('#delcounter').text(text); + } $(document).ready(function() { $('.timeago').timeago(); // Drop Caps
M layouts/article_buttons.erblayouts/article_buttons.erb

@@ -14,7 +14,7 @@ function delicious_counter(data) {

var posts = data[0].total_posts; if (!posts) return; var text = posts+" bookmarks"; - if (posts == 1) { text = posts+" bookmarks" }; + if (posts == 1) { text = posts+" bookmark" }; document.getElementById('delcounter').innerHTML = text; } </script>

@@ -25,7 +25,6 @@ <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>
M layouts/default.erblayouts/default.erb

@@ -119,20 +119,23 @@ <% else %>

<script src="/js/compressed.js" type="text/javascript"></script> <% end %> <% if @item[:type] == 'page' then %> - <script type="text/javascript"> - $(document).ready(function() { - display_opinions(7); - display_tweets(7); - display_bookmarks(7); - }); - </script> + <script type="text/javascript"> + $(document).ready(function() { + display_opinions(7); + display_tweets(7); + display_bookmarks(7); + }); + </script> + <% end %> + <% if @item[:type] == 'article' then %> + <script src="http://badges.del.icio.us/feeds/json/url/data?url=<%= url_for @item %>&amp;callback=delicious_counter"></script> <% end %> <% if @item[:github] then %> - <script type="text/javascript"> - $(document).ready(function() { - display_commits(5, '<%= @item[:github] %>'); - }); - </script> + <script type="text/javascript"> + $(document).ready(function() { + display_commits(5, '<%= @item[:github] %>'); + }); + </script> <% end %> </body> </html>