summaryrefslogtreecommitdiff
path: root/_includes/post-list.liquid
diff options
context:
space:
mode:
authorAdam Carpenter <gitlab@53hor.net>2019-06-03 20:21:47 -0400
committerAdam Carpenter <gitlab@53hor.net>2019-06-03 20:21:47 -0400
commit775a6ea8ed0665bcb2a3de432aca80da57184424 (patch)
tree87c852cfbc4a434955d54bd6d4bcc00f3b994e9e /_includes/post-list.liquid
parent5f6af7ba761eef57adc2d45634fadcdd6108bb34 (diff)
parenta2a168223078198e72dbcfa6c4d755819fe07b83 (diff)
downloadcobalt-site-775a6ea8ed0665bcb2a3de432aca80da57184424.tar.xz
cobalt-site-775a6ea8ed0665bcb2a3de432aca80da57184424.zip
Merge branch 'master' into posts
Diffstat (limited to '_includes/post-list.liquid')
-rw-r--r--_includes/post-list.liquid37
1 files changed, 37 insertions, 0 deletions
diff --git a/_includes/post-list.liquid b/_includes/post-list.liquid
new file mode 100644
index 0000000..e62fd63
--- /dev/null
+++ b/_includes/post-list.liquid
@@ -0,0 +1,37 @@
+<div class="columns is-centered is-multiline">
+ {% assign posts = collections.posts.pages | reverse %}
+ {% 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>