salvi/templates/home.jinja2

48 lines
1.4 KiB
Text
Raw Normal View History

2023-03-16 14:24:29 +01:00
{% extends "base.jinja2" %}
{% block title %}{{ T('homepage') }} - {{ app_name }}{% endblock %}
{% block content %}
2023-04-06 23:02:07 +02:00
<article class="homepage">
<h1 id="firstHeading">{{ T('welcome').format(app_name) }}</h1>
2023-04-06 23:02:07 +02:00
<div class="nl-new">
<a href="/create/">
<button class="submit-primary"><span class="material-icons">create</span> {{ T('new-note') }}</button>
</a>
2023-04-06 23:02:07 +02:00
</div>
2021-07-27 21:41:41 +02:00
2023-04-06 23:02:07 +02:00
<h2>{{ T('latest-notes') }}</h2>
2023-04-06 23:02:07 +02:00
<br style="clear:both">
<ul class="nl-list">
{% for n in new_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">
<span class="material-icons">tag</span>
{{ 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>
<a href="/calendar/{{ n.calendar.year }}/{{ n.calendar.month }}">
<time datetime="{{ n.calendar.isoformat() }}">{{ n.calendar.strftime('%B %-d, %Y') }}</time>
</a>
</p>
{% endif %}
</li>
{% endfor %}
<li><a href="/p/most_recent/">{{ T('show-all') }}</a></li>
</ul>
</article>
{% endblock %}