summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/all-posts.liquid21
-rw-r--r--_includes/mdi-git.html14
-rw-r--r--_includes/mdi-mail.html8
-rw-r--r--_includes/nav.liquid14
-rw-r--r--_includes/post-card.liquid30
-rw-r--r--_includes/post-link.liquid11
-rw-r--r--_includes/post-list.liquid41
-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
10 files changed, 103 insertions, 77 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/mdi-git.html b/_includes/mdi-git.html
new file mode 100644
index 0000000..dbd929f
--- /dev/null
+++ b/_includes/mdi-git.html
@@ -0,0 +1,14 @@
+<svg style="width:24px;height:24px" viewBox="0 0 24 24">
+ <title>
+ Git
+ </title>
+ <path fill="#ffffff" d="M2.6,10.59L8.38,4.8L10.07,6.5C9.83,7.35 10.22,8.28
+ 11,8.73V14.27C10.4,14.61 10,15.26 10,16A2,2 0 0,0 12,18A2,2 0 0,0
+ 14,16C14,15.26 13.6,14.61 13,14.27V9.41L15.07,11.5C15,11.65 15,11.82
+ 15,12A2,2 0 0,0 17,14A2,2 0 0,0 19,12A2,2 0 0,0 17,10C16.82,10 16.65,10
+ 16.5,10.07L13.93,7.5C14.19,6.57 13.71,5.55 12.78,5.16C12.35,5 11.9,4.96
+ 11.5,5.07L9.8,3.38L10.59,2.6C11.37,1.81 12.63,1.81
+ 13.41,2.6L21.4,10.59C22.19,11.37 22.19,12.63
+ 21.4,13.41L13.41,21.4C12.63,22.19 11.37,22.19
+ 10.59,21.4L2.6,13.41C1.81,12.63 1.81,11.37 2.6,10.59Z" />
+</svg>
diff --git a/_includes/mdi-mail.html b/_includes/mdi-mail.html
new file mode 100644
index 0000000..e162ec9
--- /dev/null
+++ b/_includes/mdi-mail.html
@@ -0,0 +1,8 @@
+<svg style="width:24px;height:24px" viewBox="0 0 24 24">
+ <title>
+ Email
+ </title>
+ <path fill="#ffffff" d="M12,13L2,6.76V6C2,4.89 2.89,4 4,4H20A2,2 0 0,1
+ 22,6V6.75L12,13M22,18A2,2 0 0,1 20,20H4C2.89,20 2,19.1
+ 2,18V9.11L4,10.36V18H20V10.36L22,9.11V18Z" />
+</svg>
diff --git a/_includes/nav.liquid b/_includes/nav.liquid
index c2cf848..a758392 100644
--- a/_includes/nav.liquid
+++ b/_includes/nav.liquid
@@ -8,7 +8,7 @@
</a>
<a class="navbar-item"
href="/rss.xml"
- target="_blank"
+ download="rss.xml"
>
<span class="icon">
{% include mdi-rss-box.html %}
@@ -16,11 +16,19 @@
</a>
<a class="navbar-item"
- href="https://gitlab.com/53hornet"
+ href="mailto:atc@53hor.net"
+ >
+ <span class="icon">
+ {% include mdi-mail.html %}
+ </span>
+ </a>
+
+ <a class="navbar-item"
+ href="https://git.53hor.net"
target="_blank"
>
<span class="icon">
- {% include mdi-gitlab.html %}
+ {% include mdi-git.html %}
</span>
</a>
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-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/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/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>