index.html.j2 2.27 KB
Newer Older
1
{% extends '_layout.html.j2' %}
2

3
{% set doc_url = "https://doc.turris.cz/doc/%(lang)s/howto/https" % dict(lang=("cs" if lang() == "cs" else "en")) %}
4

5
{% block base %}
Jan Čermák's avatar
Jan Čermák committed
6
<div id="login-page">
Štěpán Henek's avatar
Štěpán Henek committed
7
    <div class="foris-version">
8
        {% include '_foris_version.html.j2' %}
Štěpán Henek's avatar
Štěpán Henek committed
9
    </div>
10
    <div class="language-switch">
11
      {% include '_lang_flat.html.j2' %}
12 13
    </div>

14
    <h1><img src="{{ static("img/logo-turris.svg") }}" alt="{% trans %}Project:Turris{% endtrans %}" width="295"></h1>
15

16
    {% include '_messages.html.j2' %}
17

18
    {% if user_authenticated() %}
19
        <a href="{{ url("logout") }}">{% trans %}Log out{% endtrans %}</a>
20
    {% else %}
21
        <form action="{{ request.fullpath }}{{ '?next=%s' % next if next else '' }}" method="POST">
22
            <input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}">
23
        {% if request.GET.get("next") %}
24
            <input type="hidden" name="next" value="{{ request.GET['next'] }}">
25
        {% endif %}
26 27 28
            <label for="field-password">{% trans %}Password{% endtrans %}</label>
            <input id="field-password" type="password" name="password" placeholder="{% trans %}Password{% endtrans %}" autofocus>
            <button class="button" type="submit">{% trans %}Log in{% endtrans %}</button>
Jan Čermák's avatar
Jan Čermák committed
29
        </form>
30
    {% endif %}
31
  <div class="footer">
32
    {% trans %}Foris Configuration Interface{% endtrans %}<br>
33
    {% if luci_path is defined %}
34
    <a href="{{ luci_path }}">{% trans %}Go to LuCI{% endtrans %}</a>
35
    {% endif %}
36
  </div>
37

38
  {% if request.urlparts.scheme == 'http' %}
39 40 41 42
  <div id="flashes">
      <input type="checkbox" hidden id="flash-1">
      <label for="flash-1" class="flash warning">
          <span>
43
              <img src="{{ static("img/icon-opened-lock.png") }}" alt="{% trans %}Opened lock{% endtrans %}" width="64" height="64">
44
          </span>
45
          <strong>{% trans %}Your connection is not encrypted{% endtrans %}</strong>
46 47
          <br>
          {{ trans("A secure connection is an important safety feature of the router and therefore the entire home network.") }}
48
          <a href="{{ doc_url }}">{% trans %}How to set an encrypted connection and why is it important{% endtrans %} &gt;</a>
49
          <br>
50
          <small>Turris OS</small>
51 52
      </label>
  </div>
53
  {% endif %}
54

55
</div>
56
{% endblock %}