archives: add posts count for each yr and month

* misc(css): rm unused
This commit is contained in:
Aditya Telange 2020-09-29 15:54:39 +05:30
parent d46c0ed82d
commit 94070f4cd9
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 10 additions and 7 deletions

View File

@ -9,12 +9,8 @@
margin-top: 40px; margin-top: 40px;
} }
.archive-year-header:not(:last-of-type) {
border-bottom: 1px solid var(--border);
}
.archive-year:not(:last-of-type) { .archive-year:not(:last-of-type) {
border-bottom: 1px solid var(--border); border-bottom: 2px solid var(--border);
} }
.archive-month { .archive-month {
@ -48,6 +44,11 @@
font-size: 14px; font-size: 14px;
} }
.archive-count {
color: var(--secondary);
font-size: 14px;
}
@media (max-width: 800px) { @media (max-width: 800px) {
.archive-month { .archive-month {
flex-direction: column; flex-direction: column;

View File

@ -8,10 +8,12 @@
{{- range $pages.GroupByPublishDate "2006" }} {{- range $pages.GroupByPublishDate "2006" }}
{{- if ne .Key "0001" }} {{- if ne .Key "0001" }}
<div class="archive-year"> <div class="archive-year">
<h2 class="archive-year-header">{{- replace .Key "0001" "" }}</h2> <h2 class="archive-year-header">
{{- replace .Key "0001" "" }}<sup class="archive-count">&nbsp;&nbsp;{{ len .Pages }}</sup>
</h2>
{{- range .Pages.GroupByDate "January" }} {{- range .Pages.GroupByDate "January" }}
<div class="archive-month"> <div class="archive-month">
<h3 class="archive-month-header">{{- .Key }}</h3> <h3 class="archive-month-header">{{- .Key }}<sup class="archive-count">&nbsp;&nbsp;{{ len .Pages }}</h3>
<div class="archive-posts"> <div class="archive-posts">
{{- range .Pages }} {{- range .Pages }}
{{- if eq .Kind "page" }} {{- if eq .Kind "page" }}