Skip to content

Commit

Permalink
add time to section list if relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Nov 5, 2023
1 parent b590758 commit dbbf8d0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion templates/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ <h1 class="text-4xl font-semibold">{{ section.title }}</h1>
<h2 class="mt-4 col-span-2 text-sm text-gray-400">{{ year }}</h2>

{% for page in pages %}
<p class="text-gray-500 leading-7">{{ page.date | date(format="%b %-d") }}</p>
<p class="text-gray-400 leading-7 text-sm">
{% set date = page.date | date(format="%b %-d") %}
{% set time = page.date | date(format="%-I:%M %p") %}

{% if time == "12:00 AM" %}
<span class="text-gray-500 text-base">{{ date }}</span>
{% else %}
<span class="text-gray-500 text-base">{{ date }}</span>, {{ time }}
{% endif %}
</p>

<p class="text-xl">
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
</p>
Expand Down

0 comments on commit dbbf8d0

Please sign in to comment.