aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/blog_posts_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb
index e690a51..53bdb75 100644
--- a/app/helpers/blog_posts_helper.rb
+++ b/app/helpers/blog_posts_helper.rb
@@ -2,7 +2,7 @@ module BlogPostsHelper
def blog_archive_list
posts = BlogPost.select('published_at').all_previous
return nil if posts.blank?
- html = '<section id="blog_archive_list"><h1>Archives</h1><nav>'
+ html = '<section id="blog_archive_list"><h2>Archives</h2><nav><ul>'
links = []
posts.each do |e|
@@ -14,9 +14,11 @@ module BlogPostsHelper
month = l.split('/')[0]
count = BlogPost.by_archive(Time.parse(l)).size
text = "#{Date::MONTHNAMES[month.to_i]} #{year} (#{count})"
+ html += "<li>"
html += link_to(text, archive_blog_posts_path(:year => year, :month => month))
+ html += "</li>"
end
- html += '</nav></section>'
+ html += '</ul></nav></section>'
html.html_safe
end