clients: Fix distortion of the client apps buttons

After adding the card layout to the setup and service pages, the client apps
button started showing up in two lines. This puts them in a span so that the
icon and the text of the button appear next to each other on the same line.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-11-26 18:09:15 +05:30 committed by James Valleroy
parent 0106877eff
commit f25c2963af
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -68,16 +68,18 @@
{% for platform in client.platforms %}
{% if platform.type == 'download' %}
<a class="btn btn-default" href="{{ platform.url }}" role="button">
{% with 'theme/icons/'|add:platform.os|add:'.png' as icon %}
<img class="client-icon" src="{% static icon %}" />
{% if platform.os == 'gnu-linux' %}
{% trans 'GNU/Linux' %}
{% elif platform.os == 'windows' %}
{% trans 'Windows' %}
{% elif platform.os == 'macos' %}
{% trans 'macOS' %}
{% endif %}
{% endwith %}
<span>
{% with 'theme/icons/'|add:platform.os|add:'.png' as icon %}
<img class="client-icon" src="{% static icon %}" />
{% if platform.os == 'gnu-linux' %}
{% trans 'GNU/Linux' %}
{% elif platform.os == 'windows' %}
{% trans 'Windows' %}
{% elif platform.os == 'macos' %}
{% trans 'macOS' %}
{% endif %}
{% endwith %}
</span>
</a>
{% endif %}
{% endfor %}
@ -97,16 +99,18 @@
{% for platform in client.platforms %}
{% if platform.type == 'store' and platform.os == 'android' or platform.os == 'ios' %}
<a class="btn btn-default" href="{{ platform.url }}" role="button">
{% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %}
<img class="client-icon" src="{% static icon %}" />
{% if platform.store_name == 'google-play' %}
{% trans 'Play Store' %}
{% elif platform.store_name == 'f-droid' %}
{% trans 'F-Droid' %}
{% elif platform.store_name == 'app-store' %}
{% trans 'App Store' %}
{% endif %}
{% endwith %}
<span>
{% with 'theme/icons/'|add:platform.store_name|add:'.png' as icon %}
<img class="client-icon" src="{% static icon %}" />
{% if platform.store_name == 'google-play' %}
{% trans 'Play Store' %}
{% elif platform.store_name == 'f-droid' %}
{% trans 'F-Droid' %}
{% elif platform.store_name == 'app-store' %}
{% trans 'App Store' %}
{% endif %}
{% endwith %}
</span>
</a>
{% endif %}
{% endfor %}