Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 24c1fa09ed2bc5b4dc8492d0437e45b90c999680 1 parent 40bdc2c
@chadoh authored
View
7 partials.rb
@@ -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
2  views/_label.haml
@@ -0,0 +1,2 @@
+%a{ :rel => "tag", :href => "http://lisayoder.blogspot.com/search/label/#{label.term}" }><
+ =label.term.strip
View
4 views/_post.haml
@@ -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
14 views/styles.sass
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.