Skip to content

Commit f58a3a6

Browse files
committed
Update header links color for improved visibility and enhance archive and tags pages with better styling and structure
1 parent 027d5ea commit f58a3a6

3 files changed

Lines changed: 101 additions & 14 deletions

File tree

_includes/header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
</span>
1313
<br style="clear: both;">
1414
<div style="margin-top: 0.5em; padding-top: 0.75em;">
15-
<a href="/about/" style="display: inline-block; margin-right: 2em; color: #ffa7c4; text-decoration: none; font-size: 1em;">About</a>
16-
<a href="/archive/" style="display: inline-block; margin-right: 2em; color: #ffa7c4; text-decoration: none; font-size: 1em;">Archive</a>
17-
<a href="/tags/" style="display: inline-block; margin-right: 2em; color: #ffa7c4; text-decoration: none; font-size: 1em;">Tags</a>
15+
<a href="/about/" style="display: inline-block; margin-right: 2em; color: #de5684; text-decoration: none; font-size: 1em;">About</a>
16+
<a href="/archive/" style="display: inline-block; margin-right: 2em; color: #de5684; text-decoration: none; font-size: 1em;">Archive</a>
17+
<a href="/tags/" style="display: inline-block; margin-right: 2em; color: #de5684; text-decoration: none; font-size: 1em;">Tags</a>
1818
</div>
1919
</div>
2020
</div>

archive.md

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,56 @@ permalink: /archive/
66

77
# Post Archive
88

9-
{% for post in site.posts %}
10-
{% assign currentdate = post.date | date: "%Y" %}
11-
{% if currentdate != date %}
12-
{% unless forloop.first %}</ul>{% endunless %}
13-
<h2>{{ currentdate }}</h2>
14-
<ul>
15-
{% assign date = currentdate %}
16-
{% endif %}
17-
<li><a href="{{ post.url }}">{{ post.title }}</a> - <time>{{ post.date | date: site.dash.date_format }}</time></li>
18-
{% if forloop.last %}</ul>{% endif %}
9+
{% assign posts_by_year = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
10+
{% for year_group in posts_by_year %}
11+
<h2>{{ year_group.name }}</h2>
12+
<ul class="archive-list">
13+
{% for post in year_group.items %}
14+
<li class="archive-item">
15+
<a href="{{ post.url }}" class="archive-link">{{ post.title }}</a>
16+
<time class="archive-date">{{ post.date | date: site.dash.date_format }}</time>
17+
</li>
18+
{% endfor %}
19+
</ul>
1920
{% endfor %}
21+
22+
<style>
23+
.archive-list {
24+
list-style: none;
25+
padding: 0;
26+
margin: 0 0 2rem 0;
27+
}
28+
29+
.archive-item {
30+
margin: 0.75rem 0;
31+
padding: 0.75rem;
32+
background-color: #f8f9fa;
33+
border-radius: 0.25rem;
34+
border-left: 3px solid #de5684;
35+
}
36+
37+
.archive-link {
38+
color: #de5684;
39+
text-decoration: none;
40+
font-weight: 500;
41+
font-size: 1.1rem;
42+
}
43+
44+
.archive-link:hover {
45+
text-decoration: underline;
46+
}
47+
48+
.archive-date {
49+
color: #5f6368;
50+
font-size: 0.9rem;
51+
display: block;
52+
margin-top: 0.25rem;
53+
}
54+
55+
h2 {
56+
color: #de5684;
57+
border-bottom: 2px solid #de5684;
58+
padding-bottom: 0.5rem;
59+
margin: 2rem 0 1rem 0;
60+
}
61+
</style>

tags.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permalink: /tags/
1212
{% assign tagname = tag[0] %}
1313
{% assign posts = tag[1] %}
1414
<span class="tag-item">
15-
<a href="#{{ tagname | slugify }}" class="tag-link" data-count="{{ posts.size }}">
15+
<a href="#{{ tagname | slugify }}" class="tag" data-count="{{ posts.size }}">
1616
{{ tagname }} ({{ posts.size }})
1717
</a>
1818
</span>
@@ -49,6 +49,51 @@ permalink: /tags/
4949
margin: 5px;
5050
}
5151

52+
.tag-cloud .tag {
53+
display: inline-block;
54+
background-color: #f1f3f4;
55+
color: #5f6368;
56+
padding: 0.2rem 0.5rem;
57+
margin: 0.1rem 0.2rem 0.1rem 0;
58+
border-radius: 0.25rem;
59+
font-size: 0.8rem;
60+
text-decoration: none;
61+
}
62+
63+
.tag-cloud .tag:hover {
64+
background-color: #e8eaed;
65+
color: #202124;
66+
}
67+
68+
.tag-posts {
69+
list-style: none;
70+
padding: 0;
71+
}
72+
73+
.tag-posts li {
74+
margin: 0.5rem 0;
75+
padding: 0.5rem;
76+
background-color: #f8f9fa;
77+
border-radius: 0.25rem;
78+
}
79+
80+
.tag-posts li a {
81+
color: #de5684;
82+
text-decoration: none;
83+
font-weight: 500;
84+
}
85+
86+
.tag-posts li a:hover {
87+
text-decoration: underline;
88+
}
89+
90+
.post-date {
91+
color: #5f6368;
92+
font-size: 0.9rem;
93+
margin-left: 1rem;
94+
}
95+
</style>
96+
5297
.tag-link {
5398
background: #f0f0f0;
5499
padding: 4px 8px;

0 commit comments

Comments
 (0)