CSS + HTML change

This commit is contained in:
Yusur 2023-12-12 19:29:43 +01:00
parent acf918f656
commit 14e69ac291
20 changed files with 292 additions and 248 deletions

View file

@ -3,61 +3,48 @@
{% block title %}{{ d.strftime("%B %Y") }} {{ app_name }}{% endblock %}
{% block content %}
<article>
<main>
<h1 id="firstHeading">{{ d.strftime("%B %Y") }}</h1>
{% if total_count > 0 %}
<p class="nl-pagination">Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> of <strong>{{ total_count }}</strong> total.</p>
<div class="inner-content">
{% if total_count > 0 %}
{% from "macros/nl.jinja2" import nl_list with context %}
{{ nl_list(notes, total_count=total_count, page_n=page_n, hl_calendar=d) }}
{% else %}
<p class="nl-placeholder">{{ T('notes-month-empty') }}</p>
{% endif %}
<ul class="nl-list">
{% for n in notes %}
<li>
<a href="{{ n.get_url() }}" class="nl-title">{{ n.title }}</a>
<p class="nl-desc">{{ n.short_desc() }}</p>
{% if n.tags %}
<p class="nl-tags">{{ T('tags') }}:
{% for tag in n.tags %}
{% set tn = tag.name %}
<a href="/tags/{{ tn }}/" class="nl-tag">#{{ tn }}</a>
{% endfor %}
</p>
{% endif %}
{% if n.calendar %}
<p class="nl-calendar">
<span class="material-icons">calendar_today</span>
{% if n.calendar.year == d.year and n.calendar.month == d.month %}
<strong>
<time datetime="{{ n.calendar.isoformat() }}">{{ n.calendar.strftime('%B %-d, %Y') }}</time>
</strong>
{% else %}
<a href="/calendar/{{ n.calendar.year }}/{{ n.calendar.month }}">
<time datetime="{{ n.calendar.isoformat() }}">{{ n.calendar.strftime('%B %-d, %Y') }}</time>
</a>
{% endif %}
</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<p class="nl-placeholder">{{ T('notes-month-empty') }}</p>
{% endif %}
{% set past_year = advance_calendar(d, -2) %}
{% set past_month = advance_calendar(d, -1) %}
{% set next_month = advance_calendar(d, 1) %}
{% set next_year = advance_calendar(d, 2) %}
<div class="calendar-navigation">
<ul class="inline">
<li>&laquo; <a href="/calendar/{{ past_year.year }}/{{ past_year.month }}">{{ past_year.strftime("%B %Y") }}</a></li>
<li><a href="/calendar/{{ past_month.year }}/{{ past_month.month }}">{{ past_month.strftime("%B %Y") }}</a></li>
<li><strong>{{ d.strftime("%B %Y") }}</strong></li>
<li><a href="/calendar/{{ next_month.year }}/{{ next_month.month }}">{{ next_month.strftime("%B %Y") }}</a></li>
<li><a href="/calendar/{{ next_year.year }}/{{ next_year.month }}">{{ next_year.strftime("%B %Y") }}</a> &raquo;</li>
</ul>
</div>
{% set past_year = advance_calendar(d, -2) %}
{% set past_month = advance_calendar(d, -1) %}
{% set next_month = advance_calendar(d, 1) %}
{% set next_year = advance_calendar(d, 2) %}
<div class="calendar-navigation">
<ul class="inline">
<li>&laquo; <a href="/calendar/{{ past_year.year }}/{{ past_year.month }}">{{ past_year.strftime("%B %Y") }}</a></li>
<li><a href="/calendar/{{ past_month.year }}/{{ past_month.month }}">{{ past_month.strftime("%B %Y") }}</a></li>
<li><strong>{{ d.strftime("%B %Y") }}</strong></li>
<li><a href="/calendar/{{ next_month.year }}/{{ next_month.month }}">{{ next_month.strftime("%B %Y") }}</a></li>
<li><a href="/calendar/{{ next_year.year }}/{{ next_year.month }}">{{ next_year.strftime("%B %Y") }}</a> &raquo;</li>
</ul>
<p>{{ T('back-to') }} <a href="/calendar">{{ T('calendar') }}</a></p>
</div>
</main>
{% endblock %}
<p>{{ T('back-to') }} <a href="/calendar">{{ T('calendar') }}</a></p>
</article>
{% block toc %}
<nav class="toc">
<h3>{{ d.year }}</h3>
<ul>
{#% for i in range(1, 13) %}
<li>
<a href="/calendar/{{ d.year }}/{{ i }}">{{ nd.strftime("%B") }}</a>
<strong>({{ toc[i] }})</strong>
</li>
{% endfor %#}
</ul>
</nav>
{% endblock %}