Merge pull request #1094 from bookwyrm-social/button-text

Show text with buttons in most places
This commit is contained in:
Mouse Reeve 2021-05-18 11:33:06 -07:00 committed by GitHub
commit 7dab48bc69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 77 additions and 76 deletions

View file

@ -14,9 +14,8 @@
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<div class="column is-narrow"> <div class="column is-narrow">
<a href="{{ author.local_path }}/edit"> <a href="{{ author.local_path }}/edit">
<span class="icon icon-pencil" title="{% trans 'Edit Author' %}"> <span class="icon icon-pencil" title="{% trans 'Edit Author' %}" aria-hidden="True"></span>
<span class="is-sr-only">{% trans "Edit Author" %}</span> <span>{% trans "Edit Author" %}</span>
</span>
</a> </a>
</div> </div>
{% endif %} {% endif %}

View file

@ -38,9 +38,8 @@
{% if user_authenticated and can_edit_book %} {% if user_authenticated and can_edit_book %}
<div class="column is-narrow"> <div class="column is-narrow">
<a href="{{ book.id }}/edit"> <a href="{{ book.id }}/edit">
<span class="icon icon-pencil" title="{% trans "Edit Book" %}"> <span class="icon icon-pencil" title="{% trans "Edit Book" %}" aria-hidden=True></span>
<span class="is-sr-only">{% trans "Edit Book" %}</span> <span>{% trans "Edit Book" %}</span>
</span>
</a> </a>
</div> </div>
{% endif %} {% endif %}
@ -163,7 +162,7 @@
</div> </div>
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Add read dates" as button_text %} {% trans "Add read dates" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="plus" class="is-small" controls_text="add-readthrough" focus="add-readthrough-focus" %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="plus" class="is-small" controls_text="add-readthrough" focus="add-readthrough-focus" %}
</div> </div>
</header> </header>
<section class="is-hidden box" id="add-readthrough"> <section class="is-hidden box" id="add-readthrough">

View file

@ -9,7 +9,7 @@
{% if is_self and goal %} {% if is_self and goal %}
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Edit Goal" as button_text %} {% trans "Edit Goal" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="show-edit-goal" focus="edit-form-header" %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="show-edit-goal" focus="edit-form-header" %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

View file

@ -15,7 +15,7 @@
{% if request.user == list.user %} {% if request.user == list.user %}
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Edit List" as button_text %} {% trans "Edit List" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="edit-list" focus="edit-list-header" %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit-list" focus="edit-list-header" %}
</div> </div>
{% endif %} {% endif %}
</header> </header>

View file

@ -18,7 +18,7 @@
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Create List" as button_text %} {% trans "Create List" as button_text %}
{% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon="plus" text=button_text focus="create-list-header" %} {% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon_with_text="plus" text=button_text focus="create-list-header" %}
</div> </div>
{% endif %} {% endif %}
</header> </header>

View file

@ -15,60 +15,64 @@
{% block panel %} {% block panel %}
<div class="columns"> <div class="columns">
<section class="column is-half content"> <section class="column is-half is-flex is-flex-direction-column">
<h2 class="title is-4">{% trans "Details" %}</h2> <h2 class="title is-4">{% trans "Details" %}</h2>
<dl> <div class="box is-flex-grow-1 content">
<div class="is-flex"> <dl>
<dt>{% trans "Software:" %}</dt> <div class="is-flex">
<dd>{{ server.application_type }}</dd> <dt>{% trans "Software:" %}</dt>
</div> <dd>{{ server.application_type }}</dd>
<div class="is-flex"> </div>
<dt>{% trans "Version:" %}</dt> <div class="is-flex">
<dd>{{ server.application_version }}</dd> <dt>{% trans "Version:" %}</dt>
</div> <dd>{{ server.application_version }}</dd>
<div class="is-flex"> </div>
<dt>{% trans "Status:" %}</dt> <div class="is-flex">
<dd>{{ server.status }}</dd> <dt>{% trans "Status:" %}</dt>
</div> <dd>{{ server.status }}</dd>
</dl> </div>
</dl>
</div>
</section> </section>
<section class="column is-half content"> <section class="column is-half is-flex is-flex-direction-column">
<h2 class="title is-4">{% trans "Activity" %}</h2> <h2 class="title is-4">{% trans "Activity" %}</h2>
<dl> <div class="box is-flex-grow-1 content">
<div class="is-flex"> <dl>
<dt>{% trans "Users:" %}</dt> <div class="is-flex">
<dd> <dt>{% trans "Users:" %}</dt>
{{ users.count }} <dd>
{% if server.user_set.count %}(<a href="{% url 'settings-users' %}?server={{ server.server_name }}">{% trans "View all" %}</a>){% endif %} {{ users.count }}
</dd> {% if server.user_set.count %}(<a href="{% url 'settings-users' %}?server={{ server.server_name }}">{% trans "View all" %}</a>){% endif %}
</div> </dd>
<div class="is-flex"> </div>
<dt>{% trans "Reports:" %}</dt> <div class="is-flex">
<dd> <dt>{% trans "Reports:" %}</dt>
{{ reports.count }} <dd>
{% if reports.count %}(<a href="{% url 'settings-reports' %}?server={{ server.server_name }}">{% trans "View all" %}</a>){% endif %} {{ reports.count }}
</dd> {% if reports.count %}(<a href="{% url 'settings-reports' %}?server={{ server.server_name }}">{% trans "View all" %}</a>){% endif %}
</div> </dd>
<div class="is-flex"> </div>
<dt>{% trans "Followed by us:" %}</dt> <div class="is-flex">
<dd> <dt>{% trans "Followed by us:" %}</dt>
{{ followed_by_us.count }} <dd>
</dd> {{ followed_by_us.count }}
</div> </dd>
<div class="is-flex"> </div>
<dt>{% trans "Followed by them:" %}</dt> <div class="is-flex">
<dd> <dt>{% trans "Followed by them:" %}</dt>
{{ followed_by_them.count }} <dd>
</dd> {{ followed_by_them.count }}
</div> </dd>
<div class="is-flex"> </div>
<dt>{% trans "Blocked by us:" %}</dt> <div class="is-flex">
<dd> <dt>{% trans "Blocked by us:" %}</dt>
{{ blocked_by_us.count }} <dd>
</dd> {{ blocked_by_us.count }}
</div> </dd>
</dl> </div>
</dl>
</div>
</section> </section>
</div> </div>
@ -79,11 +83,11 @@
</div> </div>
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Edit" as button_text %} {% trans "Edit" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="edit-notes" %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit-notes" %}
</div> </div>
</header> </header>
{% if server.notes %} {% if server.notes %}
<p id="hide-edit-notes">{{ server.notes|to_markdown|safe }}</p> <div class="box" id="hide-edit-notes">{{ server.notes|to_markdown|safe }}</div>
{% endif %} {% endif %}
<form class="box is-hidden" method="POST" action="{% url 'settings-federated-server' server.id %}" id="edit-notes"> <form class="box is-hidden" method="POST" action="{% url 'settings-federated-server' server.id %}" id="edit-notes">
{% csrf_token %} {% csrf_token %}

View file

@ -6,9 +6,8 @@
{% block edit-button %} {% block edit-button %}
<a href="{% url 'settings-import-blocklist' %}"> <a href="{% url 'settings-import-blocklist' %}">
<span class="icon icon-plus" title="{% trans 'Add server' %}"> <span class="icon icon-plus" title="{% trans 'Add server' %}" aria-hidden="True"></span>
<span class="is-sr-only">{% trans "Add server" %}</span> <span>{% trans "Add server" %}</span>
</span>
</a> </a>
{% endblock %} {% endblock %}

View file

@ -103,7 +103,7 @@
{# bottom bar #} {# bottom bar #}
<input type="checkbox" class="is-hidden" name="sensitive" id="id_show_spoilers-{{ uuid }}" {% if draft.content_warning or status.content_warning %}checked{% endif %} aria-hidden="true"> <input type="checkbox" class="is-hidden" name="sensitive" id="id_show_spoilers-{{ uuid }}" {% if draft.content_warning or status.content_warning %}checked{% endif %} aria-hidden="true">
<div class="columns mt-1"> <div class="columns mt-1">
<div class="field has-addons column"> <div class="field has-addons column">
<div class="control"> <div class="control">

View file

@ -5,9 +5,9 @@
<span class="column is-narrow pb-0"> <span class="column is-narrow pb-0">
{% trans "Show filters" as text %} {% trans "Show filters" as text %}
{% include 'snippets/toggle/open_button.html' with text=text controls_text="filters" icon="arrow-down" class="is-small" focus="filters" %} {% include 'snippets/toggle/open_button.html' with text=text controls_text="filters" icon_with_text="arrow-down" class="is-small" focus="filters" %}
{% trans "Hide filters" as text %} {% trans "Hide filters" as text %}
{% include 'snippets/toggle/close_button.html' with text=text controls_text="filters" icon="x" class="is-small" %} {% include 'snippets/toggle/close_button.html' with text=text controls_text="filters" icon_with_text="arrow-up" class="is-small" %}
</span> </span>
</h2> </h2>

View file

@ -15,7 +15,7 @@
{% if is_self %} {% if is_self %}
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Create list" as button_text %} {% trans "Create list" as button_text %}
{% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon="plus" text=button_text %} {% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon_with_text="plus" text=button_text %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

View file

@ -36,7 +36,7 @@
{% if is_self %} {% if is_self %}
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Create shelf" as button_text %} {% trans "Create shelf" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
@ -59,7 +59,7 @@
{% if is_self and shelf.id %} {% if is_self and shelf.id %}
<div class="column is-narrow"> <div class="column is-narrow">
{% trans "Edit shelf" as button_text %} {% trans "Edit shelf" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="edit-shelf-form" focus="edit-shelf-form-header" %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit-shelf-form" focus="edit-shelf-form-header" %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

View file

@ -12,9 +12,8 @@
{% if is_self %} {% if is_self %}
<div class="column is-narrow"> <div class="column is-narrow">
<a href="{% url 'prefs-profile' %}"> <a href="{% url 'prefs-profile' %}">
<span class="icon icon-pencil" title="Edit profile"> <span class="icon icon-pencil" title="Edit profile" aria-hidden="true"></span>
<span class="is-sr-only">{% trans "Edit profile" %}</span> <span>{% trans "Edit profile" %}</span>
</span>
</a> </a>
</div> </div>
{% endif %} {% endif %}
@ -59,8 +58,9 @@
<div class="columns is-mobile"> <div class="columns is-mobile">
<h2 class="title column">{% trans "User Activity" %}</h2> <h2 class="title column">{% trans "User Activity" %}</h2>
<div class="column is-narrow"> <div class="column is-narrow">
<a class="icon icon-rss" target="_blank" href="{{ user.local_path }}/rss"> <a target="_blank" href="{{ user.local_path }}/rss">
<span class="is-sr-only">{% trans "RSS feed" %}</span> <span class="icon icon-rss" aria-hidden="true"></span>
<span>{% trans "RSS feed" %}</span>
</a> </a>
</div> </div>
</div> </div>