mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Clean up various things
This commit is contained in:
parent
c7b215fcca
commit
a29345bd10
@ -135,8 +135,7 @@ from .utils import clear_notifications, is_safe_url, create_session
|
||||
|
||||
@app.before_request
|
||||
def check_for_notifications():
|
||||
if current_user.is_authenticated:
|
||||
clear_notifications(request.path)
|
||||
clear_notifications(request.path)
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
|
@ -98,9 +98,8 @@ def make_thumbnail(img, level):
|
||||
mkdir(output_dir)
|
||||
|
||||
cache_filepath = os.path.join(output_dir, img)
|
||||
source_filepath = find_source_file(img)
|
||||
|
||||
if not os.path.isfile(cache_filepath):
|
||||
source_filepath = find_source_file(img)
|
||||
resize_and_crop(source_filepath, cache_filepath, (w, h))
|
||||
|
||||
res = send_file(cache_filepath)
|
||||
|
@ -41,7 +41,7 @@
|
||||
<a href="{{ package.get_url('packages.view') }}" class="btn btn-sm btn-secondary me-1">
|
||||
{{ _("View package") }}
|
||||
</a>
|
||||
<a href="{{ package.donate_url_actual }}" class="btn btn-sm btn-primary" rel="nofollow">
|
||||
<a href="{{ package.donate_url_actual }}" class="btn btn-sm btn-primary" rel="ugc">
|
||||
<i class="fas fa-heart me-1"></i>
|
||||
{{ _("Donate") }}
|
||||
</a>
|
||||
|
@ -150,8 +150,7 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
{% for warning in package.content_warnings %}
|
||||
<a class="badge bg-warning" rel="nofollow" href="/help/content_flags/"
|
||||
title="{{ warning.description }}">
|
||||
<a class="badge bg-warning" href="/help/content_flags/" title="{{ warning.description }}">
|
||||
<i class="fas fa-exclamation-circle" style="margin-right: 0.3em;"></i>
|
||||
{{ warning.title }}
|
||||
</a>
|
||||
@ -425,7 +424,7 @@
|
||||
{% if package.donate_url_actual %}
|
||||
<div class="alert alert-secondary mb-4">
|
||||
<p>{{ _("Like this package? Help support its development by making a donation", display_name=package.author.display_name) }}</p>
|
||||
<a class="btn d-block btn-primary" href="{{ package.donate_url_actual }}" rel="nofollow">
|
||||
<a class="btn d-block btn-primary" href="{{ package.donate_url_actual }}" rel="ugc">
|
||||
<i class="fas fa-heart me-2"></i>
|
||||
{{ _("Donate now") }}
|
||||
</a>
|
||||
|
@ -89,7 +89,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if user.website_url %}
|
||||
<a class="btn" href="{{ user.website_url }}" rel="nofollow">
|
||||
<a class="btn" href="{{ user.website_url }}" rel="ugc">
|
||||
<i class="fas fa-globe-europe"></i>
|
||||
<span class="count">
|
||||
{{ _("Website") }}
|
||||
@ -98,7 +98,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if user.donate_url %}
|
||||
<a class="btn" href="{{ user.donate_url }}" rel="nofollow">
|
||||
<a class="btn" href="{{ user.donate_url }}" rel="ugc">
|
||||
<i class="fas fa-donate"></i>
|
||||
<span class="count">
|
||||
{{ _("Donate") }}
|
||||
|
Loading…
Reference in New Issue
Block a user