diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-06 22:32:52 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-06 22:32:52 -0500 |
commit | 1eef37953908b8695b19cfcd249afa83bb4f8a3a (patch) | |
tree | bb4a313ab6142a628a15b90d57e23734e4493733 /app/views | |
parent | 4e5cc58697477ff393cc176214f4fb51a66f50a7 (diff) | |
download | thoughts-1eef37953908b8695b19cfcd249afa83bb4f8a3a.tar.gz thoughts-1eef37953908b8695b19cfcd249afa83bb4f8a3a.tar.bz2 thoughts-1eef37953908b8695b19cfcd249afa83bb4f8a3a.zip |
Add h-entry annotations for blog posts
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/blogs/_blog.html.haml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index 1f86ae8..d0b81d1 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml | |||
@@ -1,24 +1,27 @@ | |||
1 | %article#blog-post | 1 | %article.blog-post.h-entry |
2 | %data.u-url{ value: url_for(blog) } | ||
2 | %header | 3 | %header |
3 | .post-calendar{ class: "post-date-#{(blog.visible_date.year - 2007) % 4 + 1}" } | 4 | .post-calendar{ class: "post-date-#{(blog.visible_date.year - 2007) % 4 + 1}" } |
4 | %span.post-month= blog.visible_date.strftime("%^b") | 5 | %span.post-month= blog.visible_date.strftime("%^b") |
5 | %span.post-day= blog.visible_date.day | 6 | %span.post-day= blog.visible_date.day |
6 | .blog-title | 7 | .blog-title |
7 | %h2= link_to_unless_current blog.title, blog | 8 | %h2.p-name= link_to_unless_current blog.title, blog |
8 | .post-author= blog.user.login.capitalize | 9 | .post-author= blog.user.login.capitalize |
9 | %ul.post-tag-3 | 10 | %ul.post-tag-3 |
10 | - blog.tags.each do |tag| | 11 | - blog.tags.each do |tag| |
11 | %li= link_to tag, tag_url(tag.name) | 12 | %li= link_to tag, tag_url(tag.name), class: "p-category" |
12 | %blockquote#blog-content.entry-content.bubble.rounded.bottom | 13 | %blockquote#blog-content.entry-content.bubble.rounded.bottom.e-content |
13 | - if short and blog.has_read_more | 14 | - if short and blog.has_read_more |
14 | = markdown(blog.short_body) | 15 | = markdown(blog.short_body) |
15 | = link_to "Read more...", blog | 16 | = link_to "Read more...", blog |
16 | - else | 17 | - else |
17 | = markdown(blog.body) | 18 | = markdown(blog.body) |
18 | %cite.bubble | 19 | %cite.bubble.blog-cite |
19 | %strong= blog.user.login.capitalize | 20 | %span.p-author.h-card |
21 | %strong.p-name= blog.user.login.capitalize | ||
22 | %data.u-url{ value: "/" } | ||
20 | on | 23 | on |
21 | = blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P") | 24 | %time.dt-published{ datetime: blog.visible_date.strftime("%Y-%m-%dT%H:%M:%SZ%z") }= blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P") |
22 | .post-vote{ id: "blog-vote-section-#{blog.id}" } | 25 | .post-vote{ id: "blog-vote-section-#{blog.id}" } |
23 | %span.vote-link{ id: "blog-upvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_upvoted?(request.remote_ip)), "👍", upvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-upvote-link", method: :post | 26 | %span.vote-link{ id: "blog-upvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_upvoted?(request.remote_ip)), "👍", upvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-upvote-link", method: :post |
24 | %span.post-rating{ id: "blog-rating-#{blog.id}" }= blog.upvotes - blog.downvotes | 27 | %span.post-rating{ id: "blog-rating-#{blog.id}" }= blog.upvotes - blog.downvotes |