aboutsummaryrefslogtreecommitdiff
path: root/app/templates/index.html
blob: 2f0b8759c9cf02dc969146d88e98916c1248a244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{% extends "base.html" %}

{% block title %}
{{ _("Welcome") }}
{% endblock %}

{% block scriptextra %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "url": "https://content.minetest.net/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://content.minetest.net/packages?q={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>
{% endblock %}

{% block content %}
	{% from "macros/packagegridtile.html" import render_pkggrid %}


	<a href="{{ url_for('packages.list_all', sort='approved_at', order='desc') }}" class="btn btn-secondary float-right">
		{{ _("See more") }}
	</a>
	<h2 class="my-3">{{ _("Recently Added") }}</h2>
	{{ render_pkggrid(new) }}


	<a href="{{ url_for('packages.list_all', sort='last_release', order='desc') }}" class="btn btn-secondary float-right">
		{{ _("See more") }}
	</a>
	<h2 class="my-3">{{ _("Recently Updated") }}</h2>
	{{ render_pkggrid(updated) }}

	<!--
	<a href="{{ url_for('packages.list_all', type='game', sort='score', order='desc') }}" class="btn btn-secondary float-right">
		{{ _("See more") }}
	</a>
	<h2 class="my-3">{{ _("Top Games") }}</h2>
	{{ render_pkggrid(pop_gam) }}
	-->

	<a href="{{ url_for('packages.list_all', type='mod', sort='score', order='desc') }}" class="btn btn-secondary float-right">
		{{ _("See more") }}
	</a>
	<h2 class="my-3">{{ _("Top Clientmods") }}</h2>
	{{ render_pkggrid(pop_mod) }}


	<a href="{{ url_for('packages.list_all', type='txp', sort='score', order='desc') }}" class="btn btn-secondary float-right">
		{{ _("See more") }}
	</a>
	<h2 class="my-3">{{ _("Top Texture Packs") }}</h2>
	{{ render_pkggrid(pop_txp) }}


	<h2 class="my-3">{{ _("Search by Tags") }}</h2>
	{% for pair in tags %}
		{% set count = pair[0] %}
		{% set tag = pair[1] %}

		<a class="btn btn-sm btn-secondary m-1" rel="nofollow"
				title="{{ tag.description or '' }}"
				href="{{ url_for('packages.list_all', tag=tag.name) }}">
			{{ tag.title }}
			<span class="badge badge-pill badge-light ml-1">{{ count }}</span>
		</a>
	{% endfor %}
	<div class="clearfix mb-4"></div>


	<a href="{{ url_for('packages.list_reviews') }}" class="btn btn-secondary float-right">
		{{ _("See more") }}
	</a>
	<h2 class="my-3">{{ _("Recent Positive Reviews") }}</h2>
	{% from "macros/reviews.html" import render_reviews %}
	{{ render_reviews(reviews, current_user, True) }}


	<div class="text-center mt-5">
		<small>
			{{ _("CDB has %(count)d packages, with a total of %(downloads)d downloads.", count=count, downloads=downloads) }}
		</small>
	</div>
<!-- </main> -->
{% endblock %}