Upgrade to Bootstrap v5 (#457)

This commit is contained in:
rubenwardy
2023-08-22 19:58:43 +01:00
committed by GitHub
parent 70362ff7a6
commit 9df80d212e
92 changed files with 505 additions and 477 deletions

View File

@@ -15,7 +15,7 @@
<div class="card-body">
<p>{{ _("Deleting is permanent") }}</p>
<a class="btn btn-secondary mr-3" href="{{ thread.get_view_url() }}">{{ _("Cancel") }}</a>
<a class="btn btn-secondary me-3" href="{{ thread.get_view_url() }}">{{ _("Cancel") }}</a>
<input type="submit" value="{{ _('Delete') }}" class="btn btn-danger" />
</div>
</form>

View File

@@ -15,7 +15,7 @@
<div class="card-body">
<p>{{ _("Deleting is permanent") }}</p>
<a class="btn btn-secondary mr-3" href="{{ thread.get_view_url() }}">{{ _("Cancel") }}</a>
<a class="btn btn-secondary me-3" href="{{ thread.get_view_url() }}">{{ _("Cancel") }}</a>
<input type="submit" value="{{ _('Delete') }}" class="btn btn-danger" />
</div>
</form>

View File

@@ -9,7 +9,7 @@
{% block content %}
{% if current_user.is_authenticated and package %}
<a href="{{ url_for('threads.new', pid=package and package.id) }}" class="btn btn-primary float-right">{{ _("New Thread") }}</a>
<a href="{{ url_for('threads.new', pid=package and package.id) }}" class="btn btn-primary float-end">{{ _("New Thread") }}</a>
{% endif %}
<h1>{{ self.title() }}</h1>

View File

@@ -25,29 +25,29 @@
<div class="card">
<div class="card-header">
<a class="author {{ r.author.rank.name }} mr-3"
<a class="author {{ r.author.rank.name }} me-3"
href="{{ url_for('users.profile', username=r.author.username) }}">
{{ r.author.display_name }}
</a>
{% if r.author.username != r.author.display_name %}
<span class="text-muted small mr-2">
<span class="text-muted small me-2">
({{ r.author.username }})
</span>
{% endif %}
{% if r == r.thread.first_reply %}
<a class="badge badge-primary" href="{{ r.thread.get_view_url() }}">
<a class="badge bg-primary" href="{{ r.thread.get_view_url() }}">
{{ r.thread.title }}
</a>
{% else %}
<i class="fas fa-reply mr-2"></i>
<a class="badge badge-dark" href="{{ r.thread.get_view_url() }}">
<i class="fas fa-reply me-2"></i>
<a class="badge bg-dark" href="{{ r.thread.get_view_url() }}">
{{ _("Reply to <b>%(title)s</b>", title=r.thread.title) }}
</a>
{% endif %}
<a name="reply-{{ r.id }}" class="text-muted float-right"
<a name="reply-{{ r.id }}" class="text-muted float-end"
href="{{ url_for('threads.view', id=r.thread.id) }}#reply-{{ r.id }}">
{{ r.created_at | datetime }}
</a>

View File

@@ -27,40 +27,40 @@
{% block scriptextra %}
{% if current_user.is_authenticated %}
<script src="/static/quick_review_voting.js"></script>
<script src="/static/quick_review_voting.js?v=2"></script>
{% endif %}
{% endblock %}
{% block content %}
{% if current_user.is_authenticated %}
{% if current_user in thread.watchers %}
<form method="post" action="{{ thread.get_unsubscribe_url() }}" class="float-right">
<form method="post" action="{{ thread.get_unsubscribe_url() }}" class="float-end">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="btn btn-primary" value="{{ _('Unsubscribe') }}" />
</form>
{% else %}
<form method="post" action="{{ thread.get_subscribe_url() }}" class="float-right">
<form method="post" action="{{ thread.get_subscribe_url() }}" class="float-end">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="btn btn-primary" value="{{ _('Subscribe') }}" />
</form>
{% endif %}
{% if thread.check_perm(current_user, "DELETE_THREAD") %}
<a href="{{ url_for('threads.delete_thread', id=thread.id) }}" class="float-right mr-2 btn btn-danger">{{ _('Delete') }}</a>
<a href="{{ url_for('threads.delete_thread', id=thread.id) }}" class="float-end me-2 btn btn-danger">{{ _('Delete') }}</a>
{% endif %}
{% if thread.review and thread.review.check_perm(current_user, "DELETE_REVIEW") and current_user.username != thread.review.author.username %}
<form method="post" action="{{ thread.review.get_delete_url() }}" class="float-right mr-2">
<form method="post" action="{{ thread.review.get_delete_url() }}" class="float-end me-2">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="btn btn-danger" value="{{ _('Convert to Thread') }}" />
</form>
{% endif %}
{% if thread.check_perm(current_user, "LOCK_THREAD") %}
{% if thread.locked %}
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=0) }}" class="float-right mr-2">
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=0) }}" class="float-end me-2">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="btn btn-secondary" value="{{ _('Unlock') }}" />
</form>
{% else %}
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=1) }}" class="float-right mr-2">
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=1) }}" class="float-end me-2">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="btn btn-secondary" value="{{ _('Lock') }}" />
</form>
@@ -69,7 +69,7 @@
{% endif %}
{% if current_user == thread.author and thread.review %}
<a class="btn btn-primary ml-1 float-right mr-2"
<a class="btn btn-primary ms-1 float-end me-2"
href="{{ thread.review.package.get_url('packages.review') }}">
<i class="fas fa-pen"></i>
{{ _("Edit Review") }}
@@ -79,11 +79,11 @@
<h1>
{% if thread.review %}
{% if thread.review.rating > 3 %}
<i class="fas fa-thumbs-up mr-2" style="color:#6f6;"></i>
<i class="fas fa-thumbs-up me-2" style="color:#6f6;"></i>
{% elif thread.review.rating < 3 %}
<i class="fas fa-thumbs-down mr-2" style="color:#f66;"></i>
<i class="fas fa-thumbs-down me-2" style="color:#f66;"></i>
{% else %}
<i class="fas fa-minus mr-2" style="color:#999"></i>
<i class="fas fa-minus me-2" style="color:#999"></i>
{% endif %}
{% endif %}
{% if thread.private %}&#x1f512; {% endif %}{{ thread.title }}
@@ -104,7 +104,7 @@
</div>
<div class="col-md-3">
<div class="d-flex flex-row justify-content-end flex-wrap align-items-center" style="gap: 0.5em;">
<span class="text-muted mr-2" title="{{ _('This thread is visible to the following users') }}">
<span class="text-muted me-2" title="{{ _('This thread is visible to the following users') }}">
{{ _("Visible to:") }}
</span>
{% for viewer in thread.get_visible_to() %}