diff options
author | Adam Carpenter <gitlab@53hor.net> | 2019-06-15 21:10:45 -0400 |
---|---|---|
committer | Adam Carpenter <gitlab@53hor.net> | 2019-06-15 21:10:45 -0400 |
commit | 402decfde5390d1c84a0a5dd74635de3d7c634c2 (patch) | |
tree | 1732099dfe6f0dd3ab04749cd68bfb29e075d250 /_includes | |
parent | 6e06ad857b8fd93a3921c6f40dd8a8a04ccc4b9e (diff) | |
download | cobalt-site-402decfde5390d1c84a0a5dd74635de3d7c634c2.tar.xz cobalt-site-402decfde5390d1c84a0a5dd74635de3d7c634c2.zip |
Broke out single post card; updated index with latest post.
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/post-card.liquid | 30 | ||||
-rw-r--r-- | _includes/post-list.liquid | 41 | ||||
-rw-r--r-- | _includes/recent-posts.liquid | 10 |
3 files changed, 40 insertions, 41 deletions
diff --git a/_includes/post-card.liquid b/_includes/post-card.liquid new file mode 100644 index 0000000..558b227 --- /dev/null +++ b/_includes/post-card.liquid @@ -0,0 +1,30 @@ +<div class="card"> + <header class="card-header"> + <p class="card-header-title"> + {% if post.published_date %} + {{ post.published_date | date: "%A, %b %e, %Y" }} + {% endif %} + </p> + </header> + <div class="card-content"> + <p class="subtitle"> + {{ post.title }} + </p> + <div class="content"> + {{ post.content | truncatewords: 50 }} + </div> + </div> + <footer class="card-footer"> + <a class="card-footer-item" + href="{{ post.permalink }}" + > + Read more... + </a> + <a class="card-footer-item" + href="{{ post.permalink }}" + target="_blank" + > + Open in new tab... + </a> + </footer> +</div> diff --git a/_includes/post-list.liquid b/_includes/post-list.liquid deleted file mode 100644 index 2edc142..0000000 --- a/_includes/post-list.liquid +++ /dev/null @@ -1,41 +0,0 @@ -<div class="columns is-centered is-multiline"> - <p class="menu-label has-text-centered"> - Recent Posts - </p> - - {% assign posts = collections.posts.pages %} - {% for post in posts %} - <div class="column is-full"> - <div class="card"> - <header class="card-header"> - <p class="card-header-title"> - {% if post.published_date %} - {{ post.published_date | date: "%A, %b %e, %Y" }} - {% endif %} - </p> - </header> - <div class="card-content"> - <p class="subtitle"> - {{ post.title }} - </p> - <div class="content"> - {{ post.content | truncatewords: 50 }} - </div> - </div> - <footer class="card-footer"> - <a class="card-footer-item" - href="{{ post.permalink }}" - > - Read more... - </a> - <a class="card-footer-item" - href="{{ post.permalink }}" - target="_blank" - > - Open in new tab... - </a> - </footer> - </div> - </div> - {% endfor %} -</div> diff --git a/_includes/recent-posts.liquid b/_includes/recent-posts.liquid new file mode 100644 index 0000000..c93ce63 --- /dev/null +++ b/_includes/recent-posts.liquid @@ -0,0 +1,10 @@ +<div class="columns is-centered is-multiline"> + <p class="menu-label has-text-centered"> + Recent Posts + </p> + + {% assign posts = collections.posts.pages %} + {% for post in posts %} + {% include post-card.liquid %} + {% endfor %} +</div> |