From 65808633a2e0259b54cefb268ebf79418b49e67c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 5 Nov 2023 20:32:13 -0500 Subject: Added forward and back links to blog posts --- app/views/blogs/show.html.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/views/blogs') diff --git a/app/views/blogs/show.html.haml b/app/views/blogs/show.html.haml index 0c549ac..7558257 100644 --- a/app/views/blogs/show.html.haml +++ b/app/views/blogs/show.html.haml @@ -1,4 +1,8 @@ - title @blog.title -.breadcrumb= link_to "← Back to home page", root_path +- unless @prev.nil? + .back-post= link_to "← #{@prev.title}", @prev +- unless @next.nil? + .next-post= link_to "#{@next.title} →", @next +.clear = render @blog, short: false = show_comments(@blog) -- cgit 1.4.1