contentdb/app/templates/index.html

39 lines
986 B
HTML
Raw Normal View History

2018-03-18 18:43:30 +01:00
{% extends "base.html" %}
{% block title %}
Dashboard
{% endblock %}
{% block content %}
2018-05-09 19:35:36 +02:00
<header>
<h1>Content DB</h1>
2018-03-21 21:10:11 +01:00
2018-05-09 19:35:36 +02:00
<p>Minetest's official content repository</p>
2018-03-21 21:10:11 +01:00
2018-05-09 19:35:36 +02:00
<form method="get" action="/packages/">
<input type="text" name="q" value="{{ query or ''}}" />
<input type="submit" value="Search" />
</form>
2018-03-18 18:43:30 +01:00
2018-05-09 19:35:36 +02:00
<p>
2018-03-18 18:43:30 +01:00
{% if current_user.is_authenticated %}
2018-05-09 19:35:36 +02:00
<a href="{{ url_for('user_profile_page', username=current_user.username) }}"
class="button button-primary">My Packages</a>
2018-03-18 18:43:30 +01:00
{% else %}
2018-05-09 19:35:36 +02:00
<a href="{{ url_for('user.login') }}" class="button button-primary">Join</a>
2018-03-18 18:43:30 +01:00
{% endif %}
2018-05-09 19:35:36 +02:00
</p>
</header>
2018-03-18 18:43:30 +01:00
2018-05-09 19:35:36 +02:00
<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>
2018-03-18 18:43:30 +01:00
{% endblock %}