Fixed delicious bug; updated background.
h3rald h3rald@h3rald.com
Fri, 11 Sep 2009 09:05:43 +0200
9 files changed,
26 insertions(+),
17 deletions(-)
M
content/css/_elements.sass
→
content/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.sass
→
content/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.js
→
content/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/default.erb
→
layouts/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 %>&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>