From 1eef37953908b8695b19cfcd249afa83bb4f8a3a Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Fri, 6 Dec 2024 22:32:52 -0500
Subject: Add h-entry annotations for blog posts

---
 app/views/blogs/_blog.html.haml | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

(limited to 'app/views')

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 @@
-%article#blog-post
+%article.blog-post.h-entry
+  %data.u-url{ value: url_for(blog) }
   %header
     .post-calendar{ class: "post-date-#{(blog.visible_date.year - 2007) % 4 + 1}" }
       %span.post-month= blog.visible_date.strftime("%^b")
       %span.post-day= blog.visible_date.day
     .blog-title
-      %h2= link_to_unless_current blog.title, blog
+      %h2.p-name= link_to_unless_current blog.title, blog
       .post-author= blog.user.login.capitalize
       %ul.post-tag-3
         - blog.tags.each do |tag|
-          %li= link_to tag, tag_url(tag.name)
-  %blockquote#blog-content.entry-content.bubble.rounded.bottom
+          %li= link_to tag, tag_url(tag.name), class: "p-category"
+  %blockquote#blog-content.entry-content.bubble.rounded.bottom.e-content
     - if short and blog.has_read_more
       = markdown(blog.short_body)
       = link_to "Read more...", blog
     - else
       = markdown(blog.body)
-  %cite.bubble
-    %strong= blog.user.login.capitalize
+  %cite.bubble.blog-cite
+    %span.p-author.h-card
+      %strong.p-name= blog.user.login.capitalize
+      %data.u-url{ value: "/" }
     on
-    = blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P")
+    %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")
   .post-vote{ id: "blog-vote-section-#{blog.id}" }
     %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
     %span.post-rating{ id: "blog-rating-#{blog.id}" }= blog.upvotes - blog.downvotes
-- 
cgit 1.4.1