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 | |
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')
-rw-r--r-- | app/assets/stylesheets/main/entries.scss | 2 | ||||
-rw-r--r-- | app/views/blogs/_blog.html.haml | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/app/assets/stylesheets/main/entries.scss b/app/assets/stylesheets/main/entries.scss index fd03de9..37b0a49 100644 --- a/app/assets/stylesheets/main/entries.scss +++ b/app/assets/stylesheets/main/entries.scss | |||
@@ -2,7 +2,7 @@ | |||
2 | // They will automatically be included in application.css. | 2 | // They will automatically be included in application.css. |
3 | // You can use Sass (SCSS) here: http://sass-lang.com/ | 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ |
4 | 4 | ||
5 | #blog-post { | 5 | .blog-post { |
6 | font-size: 16px; | 6 | font-size: 16px; |
7 | line-height: 24px; | 7 | line-height: 24px; |
8 | margin: 0 1em 1em; | 8 | margin: 0 1em 1em; |
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 |