mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-30 03:50:40 +00:00
Fix buttons styles
This commit is contained in:
parent
b1fea98458
commit
0b0a283e64
5 changed files with 41 additions and 17 deletions
|
@ -30,6 +30,30 @@ body {
|
|||
min-width: 75% !important;
|
||||
}
|
||||
|
||||
/** Utils
|
||||
******************************************************************************/
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
.is-sr-only-mobile {
|
||||
border: none !important;
|
||||
clip: rect(0,0,0,0) !important;
|
||||
height: .01em !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
white-space: nowrap !important;
|
||||
width: .01em !important;
|
||||
}
|
||||
|
||||
.m-0-mobile {
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.button.is-transparent {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/** Shelving
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
{% with status.id|uuid as uuid %}
|
||||
<form name="boost" action="/boost/{{ status.id }}" method="post" class="interaction boost-{{ status.id }}-{{ uuid }} {% if request.user|boosted:status %}is-hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-small is-white" type="submit" {% if not status.boostable %}disabled{% endif %}>
|
||||
<span class="icon icon-boost" title="{% trans 'Boost status' %}"></span>
|
||||
<span>{% trans "Boost status" %}</span>
|
||||
<button class="button is-small is-light is-transparent" type="submit" {% if not status.boostable %}disabled{% endif %}>
|
||||
<span class="icon icon-boost m-0-mobile" title="{% trans 'Boost' %}"></span>
|
||||
<span class="is-sr-only-mobile">{% trans "Boost" %}</span>
|
||||
</button>
|
||||
</form>
|
||||
<form name="unboost" action="/unboost/{{ status.id }}" method="post" class="interaction boost-{{ status.id }}-{{ uuid }} active {% if not request.user|boosted:status %}is-hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-small is-white" type="submit">
|
||||
<span class="icon icon-boost has-text-primary" title="{% trans 'Un-boost status' %}"></span>
|
||||
<span>{% trans "Un-boost status" %}</span>
|
||||
<button class="button is-small is-light is-transparent" type="submit">
|
||||
<span class="icon icon-boost has-text-primary m-0-mobile" title="{% trans 'Un-boost' %}"></span>
|
||||
<span class="is-sr-only-mobile">{% trans "Un-boost" %}</span>
|
||||
</button>
|
||||
</form>
|
||||
{% endwith %}
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
{% with status.id|uuid as uuid %}
|
||||
<form name="favorite" action="/favorite/{{ status.id }}" method="POST" class="interaction fav-{{ status.id }}-{{ uuid }} {% if request.user|liked:status %}is-hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-small is-white" type="submit">
|
||||
<span class="icon icon-heart" title="{% trans 'Like status' %}">
|
||||
<button class="button is-small is-light is-transparent" type="submit">
|
||||
<span class="icon icon-heart m-0-mobile" title="{% trans 'Like' %}">
|
||||
</span>
|
||||
<span>{% trans "Like status" %}</span>
|
||||
<span class="is-sr-only-mobile">{% trans "Like" %}</span>
|
||||
</button>
|
||||
</form>
|
||||
<form name="unfavorite" action="/unfavorite/{{ status.id }}" method="POST" class="interaction fav-{{ status.id }}-{{ uuid }} active {% if not request.user|liked:status %}is-hidden{% endif %}" data-id="fav-{{ status.id }}-{{ uuid }}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-white is-small" type="submit">
|
||||
<span class="icon icon-heart has-text-primary" title="{% trans 'Un-like status' %}"></span>
|
||||
<span>{% trans "Un-like status" %}</span>
|
||||
<button class="button is-light is-transparent is-small" type="submit">
|
||||
<span class="icon icon-heart has-text-primary m-0-mobile" title="{% trans 'Un-like' %}"></span>
|
||||
<span class="is-sr-only-mobile">{% trans "Un-like" %}</span>
|
||||
</button>
|
||||
</form>
|
||||
{% endwith %}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
{% load bookwyrm_tags %}
|
||||
|
||||
{% block dropdown-trigger %}
|
||||
<span class="icon icon-dots-three"></span>
|
||||
<span>{% trans "More options" %}</span>
|
||||
<span class="icon icon-dots-three m-0-mobile"></span>
|
||||
<span class="is-sr-only-mobile">{% trans "More options" %}</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block dropdown-list %}
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
>
|
||||
|
||||
{% if icon %}
|
||||
<span class="icon icon-{{ icon }}" title="{{ text }}">
|
||||
<span class="icon icon-{{ icon }} m-0-mobile" title="{{ text }}">
|
||||
<span class="is-sr-only">{{ text }}</span>
|
||||
</span>
|
||||
{% elif icon_with_text %}
|
||||
<span class="icon icon-{{ icon_with_text }}" aria-hidden></span>
|
||||
<span>{{ text }}</span>
|
||||
<span class="icon icon-{{ icon_with_text }} m-0-mobile" title="{{ text }}"></span>
|
||||
<span class="is-sr-only-mobile">{{ text }}</span>
|
||||
{% else %}
|
||||
<span>{{ text }}</span>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue