summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
authorAdam Carpenter <53hornet@gmail.com>2019-05-03 18:54:32 -0400
committerAdam Carpenter <53hornet@gmail.com>2019-05-03 18:54:32 -0400
commit689e85e78c106cefb6c83bcdbeae565d021d2e96 (patch)
tree2f96878c867040192f2722d94b9fe65aace1d1f1 /_includes
parent77458c3f87eafc1d17f9ef47f9926e0a5a98ceac (diff)
downloadcobalt-site-689e85e78c106cefb6c83bcdbeae565d021d2e96.tar.xz
cobalt-site-689e85e78c106cefb6c83bcdbeae565d021d2e96.zip
Broke apart journal page elements, restored favicon.
Diffstat (limited to '_includes')
-rw-r--r--_includes/all-posts.liquid20
-rw-r--r--_includes/post-list.liquid36
-rw-r--r--_includes/similar-posts.liquid23
-rw-r--r--_includes/toc.liquid23
4 files changed, 79 insertions, 23 deletions
diff --git a/_includes/all-posts.liquid b/_includes/all-posts.liquid
new file mode 100644
index 0000000..f8377b1
--- /dev/null
+++ b/_includes/all-posts.liquid
@@ -0,0 +1,20 @@
+<aside class="menu">
+ <p class="menu-label">
+ All Posts
+ </p>
+
+ <ul class="menu-list">
+ {% for post in collections.posts.pages %}
+ <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-list.liquid b/_includes/post-list.liquid
new file mode 100644
index 0000000..7f6d55d
--- /dev/null
+++ b/_includes/post-list.liquid
@@ -0,0 +1,36 @@
+<div class="columns is-centered is-multiline">
+ {% for post in collections.posts.pages %}
+ <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/similar-posts.liquid b/_includes/similar-posts.liquid
new file mode 100644
index 0000000..be5ef52
--- /dev/null
+++ b/_includes/similar-posts.liquid
@@ -0,0 +1,23 @@
+<aside class="menu">
+ <p class="menu-label">
+ Similar Posts
+ </p>
+
+ <ul class="menu-list">
+ {% for post in collections.posts.pages %}
+ {% if 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>
+ {% endif %}
+ {% endfor %}
+ </ul>
+</aside>
diff --git a/_includes/toc.liquid b/_includes/toc.liquid
deleted file mode 100644
index 58f1815..0000000
--- a/_includes/toc.liquid
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- begin TOC -->
-<div class="box">
- <aside class="menu">
- <p class="menu-label">
- All Posts in {{ page.title }}
- </p>
-
- <ul class="menu-list">
- {% assign title = page.title | downcase %}
-
- {% for post in collections.posts.pages %}
- {% if post.categories contains title%}
- <li>
- <a href="{{ post.permalink }}">
- {{ post.title }}
- </a>
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- </aside>
-</div>
-<!-- end TOC -->