summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/post-card.liquid30
-rw-r--r--_includes/post-list.liquid41
-rw-r--r--_includes/recent-posts.liquid10
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>