chore: use bulma override for mobile dropdown instead of classes

This commit is contained in:
Dustin Steiner 2023-01-31 18:33:44 +00:00
parent f30a0ae714
commit 96097f3b58
No known key found for this signature in database
GPG key ID: 918D51522D8CB8F2
5 changed files with 75 additions and 69 deletions

View file

@ -109,3 +109,9 @@
max-height: 35em; max-height: 35em;
overflow: hidden; overflow: hidden;
} }
@include mobile {
.dropdown-menu .button {
font-size: $size-6;
}
}

View file

@ -31,7 +31,7 @@
</li> </li>
{% else%} {% else%}
{% comparison_bool shelf.identifier active_shelf.shelf.identifier as is_current %} {% comparison_bool shelf.identifier active_shelf.shelf.identifier as is_current %}
{% with button_class="is-fullwidth is-small is-size-6-mobile shelf-option is-radiusless has-background-body" %} {% with button_class="is-fullwidth is-small shelf-option is-radiusless has-background-body" %}
<li role="menuitem" class="dropdown-item p-0"> <li role="menuitem" class="dropdown-item p-0">
{% if shelf.identifier == 'reading' %} {% if shelf.identifier == 'reading' %}
@ -77,7 +77,7 @@
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}"> <input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{{ user_shelf.id }}"> <input type="hidden" name="shelf" value="{{ user_shelf.id }}">
<button class="button is-fullwidth is-small is-size-6-mobile is-radiusless is-danger is-light" type="submit"> <button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">
{% blocktrans with name=user_shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %} {% blocktrans with name=user_shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %}
</button> </button>
</form> </form>
@ -91,7 +91,7 @@
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}"> <input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{{ shelf.id }}"> <input type="hidden" name="shelf" value="{{ shelf.id }}">
<button class="button is-fullwidth is-small is-size-6-mobile is-radiusless is-danger is-light" type="submit">{% trans "Remove from" %} {{ shelf.name }}</button> <button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">{% trans "Remove from" %} {{ shelf.name }}</button>
</form> </form>
</li> </li>
{% endif %} {% endif %}

View file

@ -7,5 +7,5 @@
{% endblock %} {% endblock %}
{% block dropdown-list %} {% block dropdown-list %}
{% include 'snippets/shelve_button/shelve_button_dropdown_options.html' with active_shelf=active_shelf shelves=user_shelves dropdown=True class="shelf-option is-fullwidth is-small is-size-6-mobile is-radiusless has-background-body" %} {% include 'snippets/shelve_button/shelve_button_dropdown_options.html' with active_shelf=active_shelf shelves=user_shelves dropdown=True class="shelf-option is-fullwidth is-small is-radiusless has-background-body" %}
{% endblock %} {% endblock %}

View file

@ -13,7 +13,7 @@
<li role="menuitem" class="dropdown-item p-0"> <li role="menuitem" class="dropdown-item p-0">
<form name="delete-{{ status.id|uuid }}" action="/delete-status/{{ status.id }}" method="post"> <form name="delete-{{ status.id|uuid }}" action="/delete-status/{{ status.id }}" method="post">
{% csrf_token %} {% csrf_token %}
<button class="button is-radiusless is-danger is-light is-fullwidth is-small is-size-6-mobile" type="submit"> <button class="button is-radiusless is-danger is-light is-fullwidth is-small" type="submit">
{% trans "Delete status" %} {% trans "Delete status" %}
</button> </button>
</form> </form>
@ -21,7 +21,7 @@
{% if status.status_type != 'GeneratedNote' and status.status_type != 'Rating' %} {% if status.status_type != 'GeneratedNote' and status.status_type != 'Rating' %}
<li role="menuitem" class="dropdown-item p-0"> <li role="menuitem" class="dropdown-item p-0">
<span class="control"> <span class="control">
<a href="{% url 'edit-status' status.id %}" class="button is-radiusless is-fullwidth is-small is-size-6-mobile" type="submit"> <a href="{% url 'edit-status' status.id %}" class="button is-radiusless is-fullwidth is-small" type="submit">
{% trans "Edit" %} {% trans "Edit" %}
</a> </a>
</span> </span>
@ -31,16 +31,16 @@
{# things you can do to other people's statuses #} {# things you can do to other people's statuses #}
<li role="menuitem" class="dropdown-item p-0"> <li role="menuitem" class="dropdown-item p-0">
<span class="control"> <span class="control">
<a href="{% url 'direct-messages-user' status.user|username %}" class="button is-small has-background-body is-radiusless is-fullwidth is-size-6-mobile"> <a href="{% url 'direct-messages-user' status.user|username %}" class="button is-small has-background-body is-radiusless is-fullwidth">
{% trans "Send direct message" %} {% trans "Send direct message" %}
</a> </a>
</span> </span>
</li> </li>
<li role="menuitem" class="dropdown-item p-0"> <li role="menuitem" class="dropdown-item p-0">
{% include 'snippets/report_button.html' with user=status.user status=status class="is-size-6-mobile" %} {% include 'snippets/report_button.html' with user=status.user status=status %}
</li> </li>
<li role="menuitem" class="dropdown-item p-0"> <li role="menuitem" class="dropdown-item p-0">
{% include 'snippets/block_button.html' with user=status.user class="is-fullwidth is-size-6-mobile" blocks=False %} {% include 'snippets/block_button.html' with user=status.user class="is-fullwidth" blocks=False %}
</li> </li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -11,13 +11,13 @@
{% block dropdown-list %} {% block dropdown-list %}
<li role="menuitem"> <li role="menuitem">
<div class="control"> <div class="control">
<a href="{% url 'direct-messages-user' user|username %}" class="button is-fullwidth is-small is-size-6-mobile">{% trans "Send direct message" %}</a> <a href="{% url 'direct-messages-user' user|username %}" class="button is-fullwidth is-small">{% trans "Send direct message" %}</a>
</div> </div>
</li> </li>
<li role="menuitem"> <li role="menuitem">
{% include 'snippets/report_button.html' with user=user class="is-fullwidth is-size-6-mobile" %} {% include 'snippets/report_button.html' with user=user class="is-fullwidth" %}
</li> </li>
<li role="menuitem"> <li role="menuitem">
{% include 'snippets/block_button.html' with user=user class="is-fullwidth is-size-6-mobile" blocks=False %} {% include 'snippets/block_button.html' with user=user class="is-fullwidth" blocks=False %}
</li> </li>
{% endblock %} {% endblock %}