summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/all-posts.liquid21
-rw-r--r--_includes/post-link.liquid11
-rw-r--r--_includes/posts-all.liquid12
-rw-r--r--_includes/posts-recent.liquid15
-rw-r--r--_includes/posts-similar.liquid (renamed from _includes/similar-posts.liquid)14
-rw-r--r--_includes/recent-posts.liquid10
6 files changed, 40 insertions, 43 deletions
diff --git a/_includes/all-posts.liquid b/_includes/all-posts.liquid
deleted file mode 100644
index a681bfb..0000000
--- a/_includes/all-posts.liquid
+++ /dev/null
@@ -1,21 +0,0 @@
-<aside class="menu">
- <p class="menu-label has-text-centered">
- All Posts
- </p>
-
- <ul class="menu-list">
- {% assign posts = collections.posts.pages %}
- {% for post in posts %}
- <li>
- <a href="/{{ post.permalink }}">
- {% if post.published_date %}
- <span class="tag">
- {{ post.published_date | date: "%e %b %Y" }}
- </span>
- {% endif %}
- {{ post.title }}
- </a>
- </li>
- {% endfor %}
- </ul>
-</aside>
diff --git a/_includes/post-link.liquid b/_includes/post-link.liquid
new file mode 100644
index 0000000..92548cf
--- /dev/null
+++ b/_includes/post-link.liquid
@@ -0,0 +1,11 @@
+<li>
+ <a href="/{{ post.permalink }}">
+ {% if post.published_date %}
+ <span class="tag">
+ {{ post.published_date | date: "%e %b %Y" }}
+ </span>
+ {% endif %}
+
+ {{ post.title }}
+ </a>
+</li>
diff --git a/_includes/posts-all.liquid b/_includes/posts-all.liquid
new file mode 100644
index 0000000..8088e82
--- /dev/null
+++ b/_includes/posts-all.liquid
@@ -0,0 +1,12 @@
+<aside class="menu">
+ <p class="menu-label has-text-centered">
+ All Posts
+ </p>
+
+ <ul class="menu-list">
+ {% assign posts = collections.posts.pages %}
+ {% for post in posts %}
+ {% include post-link.liquid %}
+ {% endfor %}
+ </ul>
+</aside>
diff --git a/_includes/posts-recent.liquid b/_includes/posts-recent.liquid
new file mode 100644
index 0000000..8aae606
--- /dev/null
+++ b/_includes/posts-recent.liquid
@@ -0,0 +1,15 @@
+<div class="columns is-centered is-multiline">
+ <p class="menu-label has-text-centered">
+ Recent Posts
+ </p>
+
+ <!-- Basically limit length of posts array to the max number of recent
+ posts to include. To start with all posts are shown since it isn't really a
+ performance concern. -->
+ {% assign posts = collections.posts.pages %}
+ {% for post in posts %}
+ <div class="column is-full">
+ {% include post-card.liquid %}
+ </div>
+ {% endfor %}
+</div>
diff --git a/_includes/similar-posts.liquid b/_includes/posts-similar.liquid
index 9a7e33a..6879d3b 100644
--- a/_includes/similar-posts.liquid
+++ b/_includes/posts-similar.liquid
@@ -1,5 +1,5 @@
<aside class="menu">
- <p class="menu-label">
+ <p class="menu-label has-text-centered">
Similar Posts
</p>
@@ -12,17 +12,7 @@
and page.categories.first
and post.categories contains page.categories.first
%}
- <li>
- <a href="/{{ post.permalink }}">
- {% if post.published_date %}
- <span class="tag is-rounded">
- {{ post.published_date | date: "%e %b %Y" }}
- </span>
- {% endif %}
-
- {{ post.title }}
- </a>
- </li>
+ {% include post-link.liquid %}
{% endif %}
{% endfor %}
</ul>
diff --git a/_includes/recent-posts.liquid b/_includes/recent-posts.liquid
deleted file mode 100644
index c93ce63..0000000
--- a/_includes/recent-posts.liquid
+++ /dev/null
@@ -1,10 +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 %}
- {% include post-card.liquid %}
- {% endfor %}
-</div>