From e09aa803cf3905c82c29dbaa9101cc4a4639cc5a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 11 Oct 2023 12:12:25 -0400 Subject: We're on Markdown now --- app/views/blogs/_blog.html.haml | 7 ++++++- app/views/blogs/index.html.haml | 2 +- app/views/blogs/show.html.haml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'app/views/blogs') diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index 317ef1f..389f961 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml @@ -6,4 +6,9 @@ .blog-title %h2= blog.title .post-author Hatkirby - %blockquote#blog-content.entry-content.bubble.rounded.bottom= blog.body.html_safe + %blockquote#blog-content.entry-content.bubble.rounded.bottom + - if short and blog.has_read_more + = markdown(blog.short_body) + = link_to "Read more...", blog + - else + = markdown(blog.body) diff --git a/app/views/blogs/index.html.haml b/app/views/blogs/index.html.haml index a1ad64c..e9639ca 100644 --- a/app/views/blogs/index.html.haml +++ b/app/views/blogs/index.html.haml @@ -1,3 +1,3 @@ - @blogs.each do |blog| - = render blog + = render blog, short: true = will_paginate @blogs diff --git a/app/views/blogs/show.html.haml b/app/views/blogs/show.html.haml index f915e64..9bff12b 100644 --- a/app/views/blogs/show.html.haml +++ b/app/views/blogs/show.html.haml @@ -1,6 +1,6 @@ - title @blog.title .breadcrumb= link_to "← Back to home page", root_path -= render @blog += render @blog, short: false %footer#blog-footer This entry was posted on = succeed "." do -- cgit 1.4.1