Permalink
Browse files

The labels now show up and link to blogger! Styles are more consisten…

…t between blogger and this site now, too.
  • Loading branch information...
1 parent 40bdc2c commit 24c1fa09ed2bc5b4dc8492d0437e45b90c999680 @chadoh committed May 6, 2010
Showing with 24 additions and 3 deletions.
  1. +6 −1 partials.rb
  2. +2 −0 views/_label.haml
  3. +4 −0 views/_post.haml
  4. +12 −2 views/styles.sass
View
@@ -9,9 +9,14 @@ def partial(template, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
options.merge!(:layout => false)
if collection = options.delete(:collection) then
+ spacer_string = options.delete(:spacer_string)
collection.inject([]) do |buffer, member|
- buffer << haml(:"#{template}", options.merge(:layout =>
+ rendered = haml(:"#{template}", options.merge(:layout =>
false, :locals => {template_array[-1].to_sym => member}))
+ if spacer_string
+ rendered << spacer_string if member != collection.last
+ end
+ buffer << rendered
end.join("\n")
else
haml(:"#{template}", options)
View
@@ -0,0 +1,2 @@
+%a{ :rel => "tag", :href => "http://lisayoder.blogspot.com/search/label/#{label.term}" }><
+ =label.term.strip
View
@@ -7,6 +7,10 @@
%div
%div(style="clear:both;")
= post.content
+ %div(style="clear:both; padding-bottom:0.25em")
+ %p.blogger-labels
+ Labels:
+ =partial :label, :collection => post.category, :spacer_string => ", "
%p.post-footer
%em
posted by Lisa at
View
@@ -154,13 +154,23 @@ p
.post
border-bottom: 1px dotted #aaa
- margin: 0.5em 0
- padding-bottom: 1.5em
+ margin: 0.5em 0 1.5em
+ padding-bottom: 0.5em
img
border: 1px solid #ddd
padding: 4px
div.blogger-post-footer
display: none
+ div
+ line-height: 1.6em
+ margin: 0 0 0.75em
+ ul
+ -webkit-padding-start: 40px
+ display: block
+ list-style-type: disc
+ margin: 1em 0
+ li
+ display: list-item
.post-title
color: #c60

0 comments on commit 24c1fa0

Please sign in to comment.