diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-13 14:57:41 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-13 14:57:41 -0400 |
commit | 0022f3e1ce95b538315fa29fd654eb3a2d923b5d (patch) | |
tree | 611531f72f9bfa15b59ba13b5141f8b01a7fa8d8 /app/views | |
parent | 26a7339889929025495df59776d1a33ca19c77ae (diff) | |
download | thoughts-0022f3e1ce95b538315fa29fd654eb3a2d923b5d.tar.gz thoughts-0022f3e1ce95b538315fa29fd654eb3a2d923b5d.tar.bz2 thoughts-0022f3e1ce95b538315fa29fd654eb3a2d923b5d.zip |
Fixed display of draft blog posts
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/blogs/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/blogs/_blog.html.haml | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/admin/blogs/show.html.haml b/app/views/admin/blogs/show.html.haml index b9acd5d..f50f69d 100644 --- a/app/views/admin/blogs/show.html.haml +++ b/app/views/admin/blogs/show.html.haml | |||
@@ -1,5 +1,5 @@ | |||
1 | - title "Previewing #{@blog.title}" | 1 | - title "Previewing #{@blog.title}" |
2 | = render partial: "blogs/blog", object: @blog | 2 | = render "blogs/blog", blog: @blog, short: false |
3 | %footer#blog-footer | 3 | %footer#blog-footer |
4 | This draft was last updated on | 4 | This draft was last updated on |
5 | = succeed "." do | 5 | = succeed "." do |
diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index c607e63..5467683 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml | |||
@@ -1,8 +1,8 @@ | |||
1 | %article#blog-post | 1 | %article#blog-post |
2 | %header | 2 | %header |
3 | .post-calendar{ class: "post-date-#{(blog.published_at.year - 2007) % 4 + 1}" } | 3 | .post-calendar{ class: "post-date-#{(blog.visible_date.year - 2007) % 4 + 1}" } |
4 | %span.post-month= blog.published_at.strftime("%^b") | 4 | %span.post-month= blog.visible_date.strftime("%^b") |
5 | %span.post-day= blog.published_at.day | 5 | %span.post-day= blog.visible_date.day |
6 | .blog-title | 6 | .blog-title |
7 | %h2= link_to_unless_current blog.title, blog | 7 | %h2= link_to_unless_current blog.title, blog |
8 | .post-author Hatkirby | 8 | .post-author Hatkirby |
@@ -18,4 +18,4 @@ | |||
18 | %cite.bubble | 18 | %cite.bubble |
19 | %strong Hatkirby | 19 | %strong Hatkirby |
20 | on | 20 | on |
21 | = blog.published_at.strftime("%B #{blog.published_at.day.ordinalize}, %Y at %-I:%M:%S%P") | 21 | = blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P") |