samey/templates/pages/index.html
2025-04-14 23:12:14 -03:00

60 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ application_name }}</title>
<meta property="og:site_name" content="{{ application_name }}" />
{% include "fragments/common_headers.html" %}
</head>
<body>
{% if age_confirmation %}{% include "fragments/age_restricted_check.html"
%}{% endif %}
<main>
<h1>{{ application_name }}</h1>
<article>
<h2>Search</h2>
<form method="get" action="/posts/1">
{% let tags_value = "" %} {% include "fragments/tags_input.html" %}
<div
hx-trigger="keyup[key=='Escape'] from:previous .tags"
hx-target="next .tags-autocomplete"
hx-swap="innerHTML"
hx-delete="/remove"
hidden
></div>
<ul class="reset tags-autocomplete" id="search-autocomplete"></ul>
<button type="submit">Search</button>
</form>
</article>
<nav>
<ul class="reset flex">
<li>
<a href="/posts/1">Posts</a>
</li>
<li>
<a href="/pools/1">Pools</a>
</li>
{% if let Some(user) = user %}
<li>
<a href="/upload">Upload media</a>
</li>
<li>
<a href="/create_pool">Create pool</a>
</li>
{% if user.is_admin %}
<li>
<a href="/settings">Settings</a>
</li>
{% endif %}
<li>
<a href="/logout">Log out ({{ user.username }})</a>
</li>
{% else %}
<li>
<a href="/login">Login</a>
</li>
{% endif %}
</ul>
</nav>
</main>
</body>
</html>