{% extends "base_min.html" %}

{% block rel_alternate %}<link rel="alternate" href="{{ uri }}">{% endblock %}

{% block qr_button %}
        <div id="qr-button-container" class="float-right w-25 border border-info p-3 d-none">
          {% trans "<strong>Tip:</strong> You can open this invite on your mobile device by scanning a barcode with your camera." %}
          <button id="qr-modal-show" class="mt-2 d-block btn btn-info" title="{% trans "Send this invite to your device" %}"
              data-toggle="modal" data-target="#qr-modal">
            {% trans "Scan with mobile device" %}
          </button>
        </div>
{% endblock %}

{% block qr_code %}
    <div class="modal" tabindex="-1" role="dialog" id="qr-modal">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h2 class="modal-title h5">{% trans "Scan invite code" %}</h2>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <p>{% trans "You can transfer this invite to your mobile device by scanning a code with your camera." %}</p>
            <div id="qr-info-url" class="tab-pane show active">
              <p>{% trans "Use a <em>QR code</em> scanner on your mobile device to scan the code below:" %}</p>
              <div id="qr-invite-page" style="width: 256px;" class="bg-light mx-auto"></div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-primary" data-dismiss="modal">{% trans "Close" %}</button>
          </div>
        </div>
      </div>
    </div>
{% endblock %}

{% block extra_scripts %}
    <script src="{{ static }}/qrcode.min.js"></script>
    <script src="{{ static }}/platform.min.js"></script>
    <script src="{{ static }}/invite.js"></script>
{% endblock %}
