aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-09 18:35:36 +0100
committerrubenwardy <rw@rubenwardy.com>2018-05-09 18:35:36 +0100
commit1b0dfb2acc9b2f971cf1e2102e6d4faefbc389f4 (patch)
tree24e37cad8d66abfcb2011288af3fc3e89d63309a /app/templates
parent552e35f6aaa4bbbb680aa8fae89fd0904dd5f5f4 (diff)
downloadcheatdb-1b0dfb2acc9b2f971cf1e2102e6d4faefbc389f4.tar.xz
Add scss, improve homepage
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/base.html2
-rw-r--r--app/templates/index.html49
2 files changed, 24 insertions, 27 deletions
diff --git a/app/templates/base.html b/app/templates/base.html
index f4baef4..07131de 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
- <link rel="stylesheet" type="text/css" href="/static/style.css">
+ <link rel="stylesheet" type="text/css" href="/static/main.css">
</head>
<body>
diff --git a/app/templates/index.html b/app/templates/index.html
index 42b02df..4dd1dd8 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -5,37 +5,34 @@ Dashboard
{% endblock %}
{% block content %}
+ <header>
+ <h1>Content DB</h1>
- <form method="get" action="/packages/">
- <input type="text" name="q" value="{{ query or ''}}" />
- <input type="submit" value="Search" />
- </form>
+ <p>Minetest's official content repository</p>
- <div class="box box_grey">
- <h2>{{ self.title() }}</h2>
+ <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 %}
- <p>
- Hello user!
- </p>
+ <a href="{{ url_for('user_profile_page', username=current_user.username) }}"
+ class="button button-primary">My Packages</a>
{% else %}
- <p>
- Please login!
- </p>
+ <a href="{{ url_for('user.login') }}" class="button button-primary">Join</a>
{% endif %}
- </div>
+ </p>
+ </header>
- <div class="2box">
- <div class="box box_grey">
- <h2>Top Mods</h2>
- </div>
- <div class="box box_grey">
- <h2>Statistics</h2>
- <ul>
- <li>Total mods: 543</li>
- <li>Missing mods: 1020</li>
- <li>Downloads/day: 200</li>
- </ul>
- </div>
- </div>
+ <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 %}