Remove partials from homepage

Tom Rutgers committed Aug 28, 2018
commit 464dafbca3581a6c9e27a71909904ad751822821
Showing 5 changed files with 32 additions and 33 deletions
source/index.html.slim +32 -4
@@ @@ -2,7 +2,35 @@
title: Kaldi - Middleman + Netlify CMS Example
---
- = partial 'partials/homepage/hero'
- = partial 'partials/homepage/story'
- = partial 'partials/homepage/products'
- = partial 'partials/homepage/news'
\ No newline at end of file
+ section.hero style=background_image(image_path(data.pages.home.hero.image))
+ .caption
+ .row
+ h1 = data.pages.home.hero.title
+
+ section.homepage-story
+ .container
+ .row
+ .story-content
+ markdown:
+ #{data.pages.home.story}
+
+ section.homepage-products.products
+ .container
+ h2
+ | Products
+ .row
+ //product is structured: ['filename', 'data']
+ //sort by newest product
+ - data.products.sort {|a,b| b[1].date <=> a[1].date}.first(3).each do | product |
+
+ //to get the actual data:
+ = partial 'partials/products/product', locals: {product: product[1]}
+
+ section.homepage-news.news
+ .container
+ h2
+ | News
+ .news-items
+ //get the first two most recent posts
+ - blog.articles.first(2).each do | article |
+ = partial 'partials/news/news_item', locals: {article: article}
\ No newline at end of file
source/partials/homepage/_hero.slim +0 -4
@@ @@ -1,4 +0,0 @@
- section.hero style=background_image(image_path(data.pages.home.hero.image))
- .caption
- .row
- h1 = data.pages.home.hero.title
source/partials/homepage/_news.slim +0 -8
@@ @@ -1,8 +0,0 @@
- section.homepage-news.news
- .container
- h2
- | News
- .news-items
- //get the first two most recent posts
- - blog.articles.first(2).each do | post |
- = partial 'partials/news/news_item', locals: {post: post}
\ No newline at end of file
source/partials/homepage/_products.slim +0 -11
@@ @@ -1,11 +0,0 @@
- section.homepage-products.products
- .container
- h2
- | Products
- .row
- //product is structured: ['filename', 'data']
- //sort by newest product
- - data.products.sort {|a,b| b[1].date <=> a[1].date}.first(3).each do | product |
-
- //to get the actual data:
- = partial 'partials/products/product', locals: {product: product[1]}
\ No newline at end of file
source/partials/homepage/_story.slim +0 -6
@@ @@ -1,6 +0,0 @@
- section.homepage-story
- .container
- .row
- .story-content
- markdown:
- #{data.pages.home.story}
\ No newline at end of file