view sat_templates/templates/bulma/file/discover.html @ 230:0e69b5843c2f

theme: bulma theme first draft: This theme uses the Bulma CSS framework, Brython to handle the menu on touch devices, and Sass to customize Bulma. CSS default fallbacks are disabled as Bulma uses its own naming conventions, and default fallbacks would lead to hard to debug conflicts. `common.js` has been slightly improved to handle custom classed in `tab_select` The theme is not complete yet, but it is functional.
author Goffi <goffi@goffi.org>
date Tue, 19 May 2020 00:02:34 +0200
parents
children
line wrap: on
line source

{% extends 'base/base.html' %}
{% import 'components/block.html' as block with context %}
{% import 'components/images.html' as images with context %}
{% import 'input/form.html' as form with context %}
{% import 'input/field.html' as field with context %}

{% block body %}
{{ icon_defs('server', 'desktop', 'mobile', 'globe', 'terminal') }}
<section class="section">
    <article class="message has-text-centered">
        <div class="message-body">
            {% trans %}
            Please select the device you want to access
            {% endtrans %}
        </div>
    </article>
</section>
<section class="section disco_files">
    {% if disco_service_entities %}
        <div class="files__services">
            {{ block.separator(_("services")) }}
            <div class="columns is-centered">
                {% for entity,ident in disco_service_entities.items() %}
                    {% if disco_service_entities|count == 1 %}
                        {% set icon_label=_("your server") %}
                    {% else %}
                        {% set icon_label=(ident.values()|first).values()|first|first %}
                    {% endif %}
                    {{ block.icon_item('server', icon_label, entities_url[entity]) }}
                {% endfor %}
            </div>
        </div>
    {% endif %}
    {% if disco_own_entities %}
        <div class="files__own">
            {{ block.separator(_("your devices")) }}
            <div class="columns is-centered">
                {% for entity,ident in disco_own_entities.items() %}
                    {{ block.icon_item(
                           icon_from_client(ident.client),
                           (ident.values()|first).values()|first|first,
                           entities_url[entity],
                       )
                    }}
                {% endfor %}
            </div>
        </div>
    {% endif %}
    {% if disco_roster_entities %}
        <div class="files__roster">
            {{ block.separator(_("your contacts devices")) }}
            <div class="columns is-centered">
                {% for entity,ident in disco_roster_entities.items() %}
                    {{ block.icon_item(
                        icon_from_client(ident.client),
                        entity.userhost(),
                        entities_url[entity])
                    }}
                {% endfor %}
            </div>
        </div>
    {% endif %}
</section>

<section class="section">
    <p class="content">{% trans %}Or enter a full jid of a device{% endtrans %}</p>
    {% call form.form(class="form--single") %}
        {{ field.text("jid", _("device full jid"), required=true)}}
        {{ field.submit(_("Access")) }}
    {% endcall %}
</section>
{% endblock body %}