contentdb/app/templates/index.html
2018-05-09 18:35:36 +01:00

39 lines
986 B
HTML

{% extends "base.html" %}
{% block title %}
Dashboard
{% endblock %}
{% block content %}
<header>
<h1>Content DB</h1>
<p>Minetest's official content repository</p>
<form method="get" action="/packages/">
<input type="text" name="q" value="{{ query or ''}}" />
<input type="submit" value="Search" />
</form>
<p>
{% if current_user.is_authenticated %}
<a href="{{ url_for('user_profile_page', username=current_user.username) }}"
class="button button-primary">My Packages</a>
{% else %}
<a href="{{ url_for('user.login') }}" class="button button-primary">Join</a>
{% endif %}
</p>
</header>
<ul class="packagegrid">
{% for p in packages %}
<li><a href="{{ p.getDetailsURL() }}"
style="background-image: url({{ p.getMainScreenshotURL() or '/static/screenshot.png' }});">
<span>{{ p.title }} by {{ p.author.display_name }}</span>
</a></li>
{% else %}
<li><i>No packages available</i></ul>
{% endfor %}
</ul>
{% endblock %}