From 5f860c66d300654934848aee1abe8e5c0d41836e Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 11 Oct 2023 16:25:37 -0400 Subject: Added blog archive The path to blog posts is now "blog" instead of "says", btw. --- app/views/blogs/index.html.haml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'app/views/blogs/index.html.haml') diff --git a/app/views/blogs/index.html.haml b/app/views/blogs/index.html.haml index e9639ca..75bf92f 100644 --- a/app/views/blogs/index.html.haml +++ b/app/views/blogs/index.html.haml @@ -1,3 +1,9 @@ -- @blogs.each do |blog| - = render blog, short: true -= will_paginate @blogs +#blog-archive + %h2 Blog Archive + .bubble.rounded + - @blogs.chunk {|blog| blog.published_at.strftime("%B %Y") }.each do |chunk| + %h3= chunk[0] + - chunk[1].each do |blog| + %p.archive-link + = link_to blog.title, blog + %small= blog.published_at.strftime("%-d %b %Y") -- cgit 1.4.1