Added sharing buttons. * Closes #39.
h3rald h3rald@h3rald.com
Sun, 06 Sep 2009 13:14:59 +0200
4 files changed,
64 insertions(+),
16 deletions(-)
M
content/css/_elements.sass
→
content/css/_elements.sass
@@ -139,19 +139,26 @@ ul
overflow: hidden &.article-meta + float: left list-style-type: none border-left: 3px solid #ccc padding-left: 1em margin-left: 0.5em + &.article-buttons + text-align: center + list-style-type: none + display: block + margin: auto + +.article-buttons li + display: inline -.date - font-style: italic - - -#content .article-meta li +.article-meta li margin-left: 0 +.date + font-style: italic .inner-border img margin-top: 7px
M
content/css/_layout.sass
→
content/css/_layout.sass
@@ -66,7 +66,14 @@ background: #fff
#content text-align: justify - padding: 0 10px + padding: 0 1em + +#content-body + clear: both + +#content-footer + text-align: center + margin: auto #wrapper min-height: 100%@@ -74,6 +81,7 @@ margin-bottom: -40px
background: #000 #border-bottom + clear: both background: #000 height: auto padding: 0@@ -115,7 +123,8 @@ clear: both
font-size: 95% color: #CACACA -#share +.share + clear: both margin: auto padding: 5px text-align: center
M
layouts/default.erb
→
layouts/default.erb
@@ -58,12 +58,32 @@ <div id="content" class="clearfix<%= (@item[:permalink] == 'home') ? ' home' : ' standard' %>">
<h2><%= @item[:title] %></h2> <% case @item[:type] when 'article' then%> + <div id="content-header"> <%= render 'article_meta', :article => @item %> + <div class="share"> + <a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_120_16.gif" width="120" height="16" alt="Share/Save/Bookmark"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl=location.href;a2a_onclick=1;a2a_prioritize=["delicious","stumbleupon","friendfeed","twitter","dzone","digg","reddit","slashdot","facebook","newsvine","sphere","ping"];</script> + <% if @item[:feed] then %> + <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> + <a class="a2a_dd" href="http://www.addtoany.com/subscribe?linkname=&linkurl=http%3A%2F%2Fwww.h3rald.com%2Frss%2F"><img src="http://static.addtoany.com/buttons/subscribe_120_16.gif" width="120" height="16" alt="Subscribe"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl="http://www.h3rald.com<%= @item[:feed] %>rss/";a2a_onclick=1;</script><script type="text/javascript" src="http://static.addtoany.com/menu/feed.js"></script> + <% end %> + </div> + <%= render 'article_buttons' %> + </div> <% end %> <hr /> - <div class="content-body"> + <div id="content-body"> <%= yield %> </div> + <div id="content-footer"> + <div class="share"> + <a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_120_16.gif" width="120" height="16" alt="Share/Save/Bookmark"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl=location.href;a2a_onclick=1;a2a_prioritize=["delicious","stumbleupon","friendfeed","twitter","dzone","digg","reddit","slashdot","facebook","newsvine","sphere","ping"];</script> + <% if @item[:feed] then %> + <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> + <a class="a2a_dd" href="http://www.addtoany.com/subscribe?linkname=&linkurl=http%3A%2F%2Fwww.h3rald.com%2Frss%2F"><img src="http://static.addtoany.com/buttons/subscribe_120_16.gif" width="120" height="16" alt="Subscribe"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl="http://www.h3rald.com<%= @item[:feed] %>rss/";a2a_onclick=1;</script><script type="text/javascript" src="http://static.addtoany.com/menu/feed.js"></script> + <% end %> + </div> + <%= render 'article_buttons' if @item[:type] == 'article' %> + </div> </div> <!-- CONTENT END --> </div>@@ -71,14 +91,7 @@ <!-- CONTAINER END -->
</div> <!-- MAIN END --> <div id="border-bottom"> - <div id="share"> - <a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_120_16.gif" width="120" height="16" alt="Share/Save/Bookmark"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl=location.href;a2a_onclick=1;a2a_prioritize=["delicious","stumbleupon","friendfeed","twitter","dzone","digg","reddit","slashdot","facebook","newsvine","sphere","ping"];</script> - <% if @item[:feed] then %> - <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> - <a class="a2a_dd" href="http://www.addtoany.com/subscribe?linkname=&linkurl=http%3A%2F%2Fwww.h3rald.com%2Frss%2F"><img src="http://static.addtoany.com/buttons/subscribe_120_16.gif" width="120" height="16" alt="Subscribe"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl="http://www.h3rald.com<%= @item[:feed] %>rss/";a2a_onclick=1;</script><script type="text/javascript" src="http://static.addtoany.com/menu/feed.js"></script> - <% end %> - </div> - <% if @item[:type] == 'article' then %> + <% if @item[:type] == 'article' then %> <%= render 'comments' %> <% else %> <%= render 'services' %>