Skip to content

Commit 43d004b

Browse files
committed
Update side bar
1 parent 1c4f1dc commit 43d004b

File tree

8 files changed

+483
-9
lines changed

8 files changed

+483
-9
lines changed

_layouts/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
<body>
102102
<!-- Blog Navigation -->
103103
<nav class="blog-nav">
104-
<a href="/blog/" class="blog-link">
104+
<a href="/posts/" class="blog-link">
105105
<i class="fas fa-blog"></i>
106106
Blog Posts
107107
</a>

_layouts/posts.html

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,74 @@
33
# The Posts page layout
44
---
55

6+
<!-- Page Header -->
7+
<div class="page-header">
8+
<h1>{{ page.title | default: "Blog Posts" }}</h1>
9+
<p>Thoughts, experiences, and insights in technology and engineering</p>
10+
</div>
11+
612
<div id="post-list">
7-
{% for post in site.posts %}
13+
14+
{% assign pinned_posts = site.posts | where: "pin", true %}
15+
{% assign regular_posts = site.posts | where_exp: "item", "item.pin != true" %}
16+
17+
{% for post in pinned_posts %}
18+
<div class="post-preview">
19+
<h1>
20+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
21+
</h1>
22+
23+
<div class="post-content">
24+
<p>{{ post.content | markdownify | strip_html | truncate: 200 }}</p>
25+
</div>
26+
27+
<div class="post-meta">
28+
<div>
29+
<i class="far fa-calendar"></i>
30+
{{ post.date | date: "%Y-%m-%d" }}
31+
32+
<i class="far fa-clock"></i>
33+
{% capture words %}{{ post.content | number_of_words }}{% endcapture %}
34+
{% if words contains '-' %}
35+
1 min read
36+
{% else %}
37+
{{ words | plus: 250 | divided_by: 250 | append: ' min read' }}
38+
{% endif %}
39+
</div>
40+
41+
<div class="pin">
42+
<i class="fas fa-thumbtack"></i>
43+
<span>Pinned</span>
44+
</div>
45+
</div>
46+
</div>
47+
{% endfor %}
48+
49+
{% for post in regular_posts %}
850
<div class="post-preview">
951
<h1>
1052
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
1153
</h1>
54+
1255
<div class="post-content">
1356
<p>{{ post.content | markdownify | strip_html | truncate: 200 }}</p>
1457
</div>
15-
<div class="post-meta text-muted">
16-
<i class="far fa-calendar fa-fw"></i>
17-
{{ post.date | date: "%Y-%m-%d" }}
58+
59+
<div class="post-meta">
60+
<div>
61+
<i class="far fa-calendar"></i>
62+
{{ post.date | date: "%Y-%m-%d" }}
63+
64+
<i class="far fa-clock"></i>
65+
{% capture words %}{{ post.content | number_of_words }}{% endcapture %}
66+
{% if words contains '-' %}
67+
1 min read
68+
{% else %}
69+
{{ words | plus: 250 | divided_by: 250 | append: ' min read' }}
70+
{% endif %}
71+
</div>
1872
</div>
1973
</div>
2074
{% endfor %}
21-
</div>
75+
76+
</div> <!-- #post-list -->

_tabs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: About
33
layout: about
44
icon: fas fa-info-circle
5-
order: 4
5+
order: 5
66
---
77

88
<style>

_tabs/archives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
layout: archives
33
title: Archives
44
icon: fas fa-archive
5-
order: 3
5+
order: 4
66
---
77

_tabs/posts.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: posts
3+
title: Posts
4+
icon: fas fa-blog
5+
order: 2
6+
permalink: /all-posts/
7+
---

_tabs/tags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
layout: tags
33
title: Tags
44
icon: fas fa-tag
5-
order: 2
5+
order: 3
66
---

0 commit comments

Comments
 (0)