2018-03-18 18:43:30 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2019-07-29 22:44:39 +02:00
|
|
|
{{ _("Welcome") }}
|
2018-03-18 18:43:30 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2019-02-02 18:05:18 +01:00
|
|
|
{% 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 %}
|
|
|
|
|
2018-12-22 22:03:01 +01:00
|
|
|
{% block content %}
|
2018-05-18 02:32:34 +02:00
|
|
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
2021-07-22 19:33:24 +02:00
|
|
|
<div id="featuredCarousel" class="carousel slide my-0" data-ride="carousel" data-interval="7500">
|
2021-07-22 13:13:16 +02:00
|
|
|
<ol class="carousel-indicators">
|
|
|
|
{% for package in featured %}
|
|
|
|
<li data-target="#featuredCarousel" data-slide-to="{{ loop.index - 1 }}" {% if loop.index == 1 %}class="active"{% endif %}></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
<div class="carousel-inner">
|
|
|
|
{% for package in featured %}
|
2022-10-25 02:57:38 +02:00
|
|
|
{% set cover_image = package.getCoverImageURL() %}
|
2021-07-22 13:13:16 +02:00
|
|
|
{% set tags = package.tags | sort(attribute="views", reverse=True) %}
|
|
|
|
<div class="carousel-item {% if loop.index == 1 %}active{% endif %}">
|
2021-07-24 05:30:14 +02:00
|
|
|
<a href="{{ package.getURL("packages.view") }}">
|
2021-07-22 13:13:16 +02:00
|
|
|
<div class="embed-responsive embed-responsive-16by9">
|
|
|
|
<img class="embed-responsive-item" src="{{ cover_image }}"
|
|
|
|
alt="{{ _('%(title)s by %(author)s', title=package.title, author=package.author.display_name) }}">
|
|
|
|
</div>
|
2021-07-22 19:33:24 +02:00
|
|
|
<div class="carousel-caption text-shadow">
|
|
|
|
<h3 class="mt-0 mb-3">
|
2021-11-23 01:58:53 +01:00
|
|
|
{% if package.author %}
|
|
|
|
{{ _('<strong>%(title)s</strong> by %(author)s', title=package.title, author=package.author.display_name) }}
|
|
|
|
{% else %}
|
|
|
|
<strong>{{ package.title }}</strong>
|
|
|
|
{% endif %}
|
2021-07-22 13:13:16 +02:00
|
|
|
</h3>
|
|
|
|
<p>
|
|
|
|
{{ package.short_desc }}
|
|
|
|
</p>
|
2021-11-23 01:58:53 +01:00
|
|
|
{% if package.author %}
|
|
|
|
<div class="d-none d-md-block">
|
|
|
|
<span class="mr-2">
|
2022-01-14 19:25:28 +01:00
|
|
|
{{ package.type.text }}
|
2021-07-22 13:13:16 +02:00
|
|
|
</span>
|
2021-11-23 01:58:53 +01:00
|
|
|
{% for warning in package.content_warnings %}
|
|
|
|
<span class="badge badge-warning" title="{{ warning.description }}">
|
|
|
|
<i class="fas fa-exclamation-circle" style="margin-right: 0.3em;"></i>
|
|
|
|
{{ warning.title }}
|
|
|
|
</span>
|
|
|
|
{% endfor %}
|
|
|
|
{% for t in tags[:3] %}
|
|
|
|
{% if t.name != "featured" %}
|
|
|
|
<span class="badge badge-primary" title="{{ t.description or '' }}">
|
|
|
|
{{ t.title }}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2022-01-07 21:58:32 +01:00
|
|
|
<span class="btn" title="{{ _('Reviews') }}">
|
2021-11-23 01:58:53 +01:00
|
|
|
<i class="fas fa-star-half-alt"></i>
|
|
|
|
<span class="count">
|
|
|
|
+{{ package.reviews | selectattr("recommends") | list | length }}
|
|
|
|
/
|
|
|
|
-{{ package.reviews | rejectattr("recommends") | list | length }}
|
2021-07-22 13:13:16 +02:00
|
|
|
</span>
|
|
|
|
</span>
|
2021-11-23 01:58:53 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-07-22 13:13:16 +02:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<a class="carousel-control-prev" href="#featuredCarousel" role="button" data-slide="prev">
|
|
|
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
|
|
|
<span class="sr-only">{{ _("Previous") }}</span>
|
|
|
|
</a>
|
|
|
|
<a class="carousel-control-next" href="#featuredCarousel" role="button" data-slide="next">
|
|
|
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
|
|
|
<span class="sr-only">{{ _("Next") }}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-07-22 19:33:24 +02:00
|
|
|
<div class="text-right mb-5 text-muted" style="opacity: 0.4;">
|
|
|
|
<a href="/help/featured/" class="btn">
|
|
|
|
<i class="fas fa-question-circle mr-1"></i>
|
2022-01-07 21:58:32 +01:00
|
|
|
{{ _("Featured") }}
|
2021-07-22 19:33:24 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
2018-12-22 22:03:01 +01:00
|
|
|
|
2020-07-18 02:48:21 +02:00
|
|
|
<a href="{{ url_for('packages.list_all', sort='approved_at', order='desc') }}" class="btn btn-secondary float-right">
|
2020-07-18 02:27:23 +02:00
|
|
|
{{ _("See more") }}
|
|
|
|
</a>
|
|
|
|
<h2 class="my-3">{{ _("Recently Added") }}</h2>
|
|
|
|
{{ render_pkggrid(new) }}
|
|
|
|
|
|
|
|
|
2020-07-18 02:22:52 +02:00
|
|
|
<a href="{{ url_for('packages.list_all', sort='last_release', order='desc') }}" class="btn btn-secondary float-right">
|
2019-07-29 22:44:39 +02:00
|
|
|
{{ _("See more") }}
|
2018-12-22 22:03:01 +01:00
|
|
|
</a>
|
2020-07-18 02:22:52 +02:00
|
|
|
<h2 class="my-3">{{ _("Recently Updated") }}</h2>
|
|
|
|
{{ render_pkggrid(updated) }}
|
2018-12-22 22:03:01 +01:00
|
|
|
|
|
|
|
|
2020-07-18 02:22:52 +02:00
|
|
|
<a href="{{ url_for('packages.list_all', type='game', sort='score', order='desc') }}" class="btn btn-secondary float-right">
|
2019-07-29 22:44:39 +02:00
|
|
|
{{ _("See more") }}
|
2018-12-22 22:03:01 +01:00
|
|
|
</a>
|
2020-07-18 02:22:52 +02:00
|
|
|
<h2 class="my-3">{{ _("Top Games") }}</h2>
|
|
|
|
{{ render_pkggrid(pop_gam) }}
|
2018-07-04 02:20:55 +02:00
|
|
|
|
|
|
|
|
2020-07-18 02:22:52 +02:00
|
|
|
<a href="{{ url_for('packages.list_all', type='mod', sort='score', order='desc') }}" class="btn btn-secondary float-right">
|
2019-07-29 22:44:39 +02:00
|
|
|
{{ _("See more") }}
|
2018-12-22 22:13:56 +01:00
|
|
|
</a>
|
2020-07-18 02:22:52 +02:00
|
|
|
<h2 class="my-3">{{ _("Top Mods") }}</h2>
|
|
|
|
{{ render_pkggrid(pop_mod) }}
|
2018-12-22 22:13:56 +01:00
|
|
|
|
|
|
|
|
2019-11-16 00:51:42 +01:00
|
|
|
<a href="{{ url_for('packages.list_all', type='txp', sort='score', order='desc') }}" class="btn btn-secondary float-right">
|
2019-07-29 22:44:39 +02:00
|
|
|
{{ _("See more") }}
|
2018-12-22 22:03:01 +01:00
|
|
|
</a>
|
2019-07-29 22:44:39 +02:00
|
|
|
<h2 class="my-3">{{ _("Top Texture Packs") }}</h2>
|
2018-12-22 22:03:01 +01:00
|
|
|
{{ render_pkggrid(pop_txp) }}
|
2018-07-04 02:20:55 +02:00
|
|
|
|
2020-07-09 06:22:58 +02:00
|
|
|
|
2020-07-18 03:48:22 +02:00
|
|
|
<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"
|
2020-07-18 03:54:40 +02:00
|
|
|
title="{{ tag.description or '' }}"
|
2020-07-18 03:48:22 +02:00
|
|
|
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>
|
|
|
|
|
|
|
|
|
2020-12-14 12:48:07 +01:00
|
|
|
<a href="{{ url_for('packages.list_all', sort='reviews', order='desc') }}" class="btn btn-secondary float-right">
|
|
|
|
{{ _("See more") }}
|
|
|
|
</a>
|
2021-07-22 13:13:16 +02:00
|
|
|
<h2 class="my-3">{{ _("Highest Reviewed") }}</h2>
|
2020-12-14 12:48:07 +01:00
|
|
|
{{ render_pkggrid(high_reviewed) }}
|
|
|
|
|
|
|
|
|
2020-07-10 21:30:31 +02:00
|
|
|
<a href="{{ url_for('packages.list_reviews') }}" class="btn btn-secondary float-right">
|
|
|
|
{{ _("See more") }}
|
|
|
|
</a>
|
2020-07-09 06:22:58 +02:00
|
|
|
<h2 class="my-3">{{ _("Recent Positive Reviews") }}</h2>
|
2021-08-18 23:09:41 +02:00
|
|
|
{% from "macros/reviews.html" import render_reviews with context %}
|
2020-07-10 20:01:58 +02:00
|
|
|
{{ render_reviews(reviews, current_user, True) }}
|
2020-07-09 06:22:58 +02:00
|
|
|
|
2020-07-18 02:27:23 +02:00
|
|
|
|
2020-07-09 06:34:25 +02:00
|
|
|
<div class="text-center mt-5">
|
2018-12-31 15:01:19 +01:00
|
|
|
<small>
|
2019-07-29 22:44:39 +02:00
|
|
|
{{ _("CDB has %(count)d packages, with a total of %(downloads)d downloads.", count=count, downloads=downloads) }}
|
2018-12-31 15:01:19 +01:00
|
|
|
</small>
|
|
|
|
</div>
|
2018-12-22 22:03:01 +01:00
|
|
|
<!-- </main> -->
|
2018-03-18 18:43:30 +01:00
|
|
|
{% endblock %}
|