diff options
Diffstat (limited to 'app/views/blogs/_blog.html.haml')
| -rw-r--r-- | app/views/blogs/_blog.html.haml | 31 |
1 files changed, 28 insertions, 3 deletions
| diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index 91b1d20..34b343f 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | %article#blog-post | 1 | %article.blog-post.h-entry |
| 2 | %h2#blog-title= blog.title | 2 | %data.u-url{ value: url_for(blog) } |
| 3 | %section#blog-content.entry-content= blog.body.html_safe | 3 | %header |
| 4 | .post-calendar{ class: "post-date-#{(blog.visible_date.year - 2007) % 4 + 1}" } | ||
| 5 | %span.post-month= blog.visible_date.strftime("%^b") | ||
| 6 | %span.post-day= blog.visible_date.day | ||
| 7 | .blog-title | ||
| 8 | %h2.p-name= link_to_unless_current blog.title, blog | ||
| 9 | .post-author= blog.user.login.capitalize | ||
| 10 | %ul.post-tag-3 | ||
| 11 | - blog.tags.each do |tag| | ||
| 12 | %li= link_to tag, tag_url(tag.name), class: "p-category" | ||
| 13 | %blockquote#blog-content.entry-content.bubble.rounded.bottom.e-content | ||
| 14 | - if short and blog.has_read_more | ||
| 15 | = markdown(blog.short_body) | ||
| 16 | = link_to "Read more...", blog | ||
| 17 | - else | ||
| 18 | = markdown(blog.body) | ||
| 19 | %cite.bubble.blog-cite | ||
| 20 | %span.p-author.h-card | ||
| 21 | %strong.p-name= blog.user.login.capitalize | ||
| 22 | %data.u-url{ value: root_url } | ||
| 23 | on | ||
| 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") | ||
| 25 | .post-vote{ id: "blog-vote-section-#{blog.id}" } | ||
| 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 | ||
| 27 | %span.post-rating{ id: "blog-rating-#{blog.id}" }= blog.upvotes | ||
| 28 | %span.vote-link{ id: "blog-downvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_downvoted?(request.remote_ip)), "👎", downvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-downvote-link", method: :post | ||
