[profile] Updates for PR:

- Fix duplicated IDs between modals for the same status.
- Remove redundant button (https://github.com/mouse-reeve/bookwyrm/pull/680#discussion_r586743844).
- Remove redundant `role="navigation"` on `<nav>`.
- Add `dir="auto"` back for titles (https://github.com/mouse-reeve/bookwyrm/pull/680#discussion_r586715693).
- Use `exists` instead of `all` for conditional statement (https://github.com/mouse-reeve/bookwyrm/pull/680#discussion_r586716299).
- Fix missing spacing between avatar and username (https://github.com/mouse-reeve/bookwyrm/pull/680#discussion_r586740902).
This commit is contained in:
Fabien Basmaison 2021-03-03 22:58:01 +01:00
parent a05b14c338
commit 8c26d8a514
4 changed files with 8 additions and 9 deletions

View file

@ -2,12 +2,12 @@
role="dialog" role="dialog"
class="modal hidden" class="modal hidden"
id="{{ controls_text }}-{{ controls_uid }}" id="{{ controls_text }}-{{ controls_uid }}"
aria-labelledby="modal-card-title-{{ controls_uid }}" aria-labelledby="modal-card-title-{{ controls_text }}-{{ controls_uid }}"
> >
<div class="modal-background"></div> <div class="modal-background"></div>
<div class="modal-card"> <div class="modal-card">
<header class="modal-card-head" tabindex="0" id="modal-title-{{ controls_text }}-{{ controls_uid }}"> <header class="modal-card-head" tabindex="0" id="modal-title-{{ controls_text }}-{{ controls_uid }}">
<h2 class="modal-card-title" id="modal-card-title-{{ controls_uid }}"> <h2 class="modal-card-title" id="modal-card-title-{{ controls_text }}-{{ controls_uid }}">
{% block modal-title %}{% endblock %} {% block modal-title %}{% endblock %}
</h2> </h2>
{% include 'snippets/toggle/toggle_button.html' with label="close" class="delete" nonbutton=True %} {% include 'snippets/toggle/toggle_button.html' with label="close" class="delete" nonbutton=True %}
@ -23,7 +23,6 @@
</footer> </footer>
{% block modal-form-close %}{% endblock %} {% block modal-form-close %}{% endblock %}
</div> </div>
<button class="modal-close is-large" aria-label="close"></button>
{% include 'snippets/toggle/toggle_button.html' with label="close" class="modal-close is-large" nonbutton=True %} {% include 'snippets/toggle/toggle_button.html' with label="close" class="modal-close is-large" nonbutton=True %}
</div> </div>

View file

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
<nav class="pagination" role="navigation" aria-label="pagination"> <nav class="pagination" aria-label="pagination">
{% if page.has_previous %} {% if page.has_previous %}
<p class="pagination-previous"> <p class="pagination-previous">
<a href="{{ path }}?page={{ page.previous_page_number }}{{ anchor }}"> <a href="{{ path }}?page={{ page.previous_page_number }}{{ anchor }}">

View file

@ -4,8 +4,8 @@
{% if status.status_type == 'Review' %} {% if status.status_type == 'Review' %}
<div> <div>
{% if status.name %} {% if status.name %}
<h3 class="title is-5 has-subtitle"> <h3 class="title is-5 has-subtitle" dir="auto">
{{ status.name | escape }} {{ status.name|escape }}
</h3> </h3>
{% endif %} {% endif %}
{% include 'snippets/stars.html' with rating=status.rating %} {% include 'snippets/stars.html' with rating=status.rating %}
@ -37,7 +37,7 @@
{% if status.content and status.status_type != 'GeneratedNote' and status.status_type != 'Boost' %} {% if status.content and status.status_type != 'GeneratedNote' and status.status_type != 'Boost' %}
{% include 'snippets/trimmed_text.html' with full=status.content|safe %} {% include 'snippets/trimmed_text.html' with full=status.content|safe %}
{% endif %} {% endif %}
{% if status.attachments.all %} {% if status.attachments.exists %}
<div class="block"> <div class="block">
<div class="columns"> <div class="columns">
{% for attachment in status.attachments.all %} {% for attachment in status.attachments.all %}

View file

@ -1,8 +1,8 @@
{% spaceless %} {% spaceless %}
{% load bookwyrm_tags %} {% load bookwyrm_tags %}
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %}
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %} class="user" class="user ml-1"
> >
{{ user.name|default:user|username }} {{ user.name|default:user|username }}
</a> </a>