jae-blog/templates/index.html

47 lines
1.5 KiB
HTML
Raw Normal View History

2024-05-01 23:12:52 +03:00
{%- import "macros.askama" as macros -%}
2024-04-18 04:05:38 +03:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="{{ title }}" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ description }}" />
<title>{{ title }}</title>
<link rel="stylesheet" href="/static/style.css" />
2024-05-26 20:23:40 +03:00
{% if rss %}
<link rel="alternate" type="application/rss+xml" title="{{ title }}" href="/feed.xml" />
{% endif %}
2024-04-18 04:05:38 +03:00
</head>
<body>
<main>
<h1>{{ title }}</h1>
<p>{{ description }}</p>
<h2>posts</h2>
<!-- prettier-ignore -->
<div>
2024-05-04 00:24:29 +03:00
{% if posts.is_empty() %}
there are no posts right now. check back later!
{% endif %}<!-- prettier-br -->
2024-05-01 23:12:52 +03:00
{% for post in posts %}
<div class="post">
2024-04-18 04:05:38 +03:00
<a href="/posts/{{ post.name }}"><b>{{ post.title }}</b></a>
<span class="post-author">- by {{ post.author }}</span>
<br />
{{ post.description }}<br />
2024-05-01 23:12:52 +03:00
{% call macros::table(post) %}
</div>
{% endfor %}
2024-04-18 04:05:38 +03:00
</div>
2024-05-01 23:12:52 +03:00
{% let tags = posts|collect_tags %}<!-- prettier-br -->
{% if !tags.is_empty() %}
<h2>tags</h2>
{% endif %}<!-- prettier-br -->
{% for tag in tags %}
<a href="/?tag={{ tag.0 }}" title="view all posts with this tag">{{ tag.0 }}</a>
<span class="post-author">- {{ tag.1 }} post{% if tag.1 != 1 %}s{%endif %}</span><br />
{% endfor %}
2024-04-18 04:05:38 +03:00
</main>
</body>
</html>