contentdb/app/templates/donate/index.html

97 lines
2.7 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
2023-04-30 01:27:10 +02:00
{% block title -%}
{{ _("Support Creators") }}
2023-04-30 01:27:10 +02:00
{%- endblock %}
2023-04-30 01:33:20 +02:00
{% block description -%}
{{ _("Some content creators are accepting donations for their work.") }}
{{ _("Donations are a great way to support your favorite modders, artists, and game developers.") }}
{% endblock %}
{% macro authorlink(author) %}
<a href="{{ url_for('users.profile', username=author.username) }}">
{{ author.display_name }}
</a>
{% endmacro %}
{% macro render_packages(packages) %}
<ul class="list-group">
{% for package in packages %}
<li class="list-group-item">
<div class="row">
<div class="col-sm-auto text-muted" style="min-width: 250px;">
<a href="{{ package.get_url('packages.view') }}">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
src="{{ package.get_thumb_or_placeholder() }}" />
2023-08-22 20:58:43 +02:00
<span class="ps-2">
{{ package.title }}
</span>
</a>
</div>
<div class="col-sm">
{{ _("by %(author)s", author=authorlink(package.author)) }}
</div>
<div class="col-sm-auto">
2023-08-22 20:58:43 +02:00
<a href="{{ package.get_url('packages.view') }}" class="btn btn-sm btn-secondary me-1">
{{ _("View package") }}
</a>
2023-12-15 16:57:54 +01:00
<a href="{{ package.donate_url_actual }}" class="btn btn-sm btn-primary" rel="ugc">
2023-08-22 20:58:43 +02:00
<i class="fas fa-heart me-1"></i>
{{ _("Donate") }}
</a>
</div>
</div>
</li>
{% endfor %}
</ul>
{% endmacro %}
{% block content %}
<h1>{{ self.title() }}</h1>
2023-03-09 19:19:19 +01:00
<p class="lead">
2023-04-30 01:33:20 +02:00
{{ self.description() }}
2023-03-09 19:19:19 +01:00
</p>
<h2 id="contentdb">{{ _("Support ContentDB") }}</h2>
<p>
{{ _("You can donate to rubenwardy to cover ContentDB's costs and support future development.") }}
</p>
<p>
{{ _("For more information about what the cost of ContentDB and what rubenwardy does, see his donation page:") }}
</p>
<p>
<a href="https://rubenwardy.com/donate/" class="btn btn-primary me-1">{{ _("Donate") }}</a>
</p>
2023-08-14 22:48:50 +02:00
<h2>{{ _("Based on your reviews / favorites") }}</h2>
{% if reviewed_packages %}
{{ render_packages(reviewed_packages) }}
{% elif current_user.is_authenticated %}
<p class="text-muted">
2023-06-13 18:46:04 +02:00
{{ _("No reviewed packages accepting donations. Consider reviewing your favourite packages") }}
</p>
{% else %}
<p>
{{ _("Sign in to see recommendations based on the packages you've reviewed") }}
</p>
<p>
<a class="btn btn-primary" href="{{ url_for('users.login') }}">{{ _("Sign in") }}</a>
</p>
{% endif %}
<h2>{{ _("Top packages") }}</h2>
{{ render_packages(top_packages) }}
<p class="text-center mt-5">
<small>
{{ _("%(count)d packages are looking for donations", count=packages_count) }}
</small>
</p>
{% endblock %}