improve news semantics

Tom Rutgers committed Aug 28, 2018
commit 149c9e09cdae18bef1e77e476d4b152ba9bc891d
Showing 2 changed files with 12 additions and 12 deletions
source/news.html.slim +2 -2
@@ @@ -4,5 +4,5 @@ section.homepage-news.news
| News
.news-items
//get the first two most recent posts
- - blog.articles.each do | post |
- = partial 'partials/news/news_item', locals: {post: post}
\ No newline at end of file
+ - blog.articles.each do | article |
+ = partial 'partials/news/news_item', locals: {article: article}
\ No newline at end of file
source/partials/news/_news_item.slim +10 -10
@@ @@ -1,20 +1,20 @@
- .news-item
+ article.news-item
.row
.image
- - if post.data.image
- = link_to post
- = image_tag post.data.image
+ - if article.data.image
+ = link_to article
+ = image_tag article.data.image
.date
- //make sure the post date is actually a date
- - date = Date.parse post.data.date.to_s
+ //make sure the article date is actually a date
+ - date = Date.parse article.data.date.to_s
span = date.strftime("%d-%m-%Y")
.content
.wrapper
- = link_to post
- h3 = post.data.title
+ = link_to article
+ h3 = article.data.title
- p = post.data.description
+ p = article.data.description
- = link_to 'Read the story', post, class: 'cta'
+ = link_to 'Read the story', article, class: 'cta'