Skip to content

Commit

Permalink
add: daattali#3
Browse files Browse the repository at this point in the history
sjpark2free committed Nov 2, 2024
1 parent ff00707 commit 6994fd7
Showing 2 changed files with 35 additions and 84 deletions.
84 changes: 0 additions & 84 deletions README.md

This file was deleted.

35 changes: 35 additions & 0 deletions _layouts/archives.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: page
# The Archives of posts.
---

{% include lang.html %}

{% assign df_strftime_m = site.data.locales[lang].df.archives.strftime | default: '/ %m' %}
{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %}

<div id="archives" class="pl-xl-3">
{% for post in site.posts %}
{% assign cur_year = post.date | date: '%Y' %}

{% if cur_year != last_year %}
{% unless forloop.first %}</ul>{% endunless %}

<time class="year lead d-block">{{ cur_year }}</time>
{{ '<ul class="list-unstyled">' }}

{% assign last_year = cur_year %}
{% endif %}

<li>
{% assign ts = post.date | date: '%s' %}
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: '%d' }}</span>
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
{{ post.date | date: df_strftime_m }}
</span>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
</li>

{% if forloop.last %}</ul>{% endif %}
{% endfor %}
</div>

0 comments on commit 6994fd7

Please sign in to comment.