{% extends "example_base.html" %}

{% block content %}
<h1>
    <a href="/">{{ _('Hello world') }}</a>
</h1>

{% if request.user.is_active %}
    <p>{{ _('You are logged in as {username}')|f(username=request.user) }}.
    <a href="{{ url('examples.logout') }}">{{ _('Log out') }}</a></p>
{% else %}
    <p><a id="browserid" href="#">{{ _('Log in with BrowserID') }}</a></p>
    <form method="POST" action="{{ url('browserid_verify') }}">
        {{ csrf() }}
        {{ browserid_form.as_p() }}
    </form>
{% endif %}

{# L10n: This is a localizer comment #}
{% if request.MOBILE %}
  <p>{{ _('This is a <em>test view</em> for mobile browsers.') }}</p>
{% else %}
  <p>{{ _('This is a <em>test view</em> for desktop browsers.') }}</p>
{% endif %}
<p>
  {% trans docs_url='http://playdoh.rtfd.org/' %}
  <a href="{{ docs_url }}">Learn you some Playdoh</a> and then go build
  something <strong>awesome</strong>.
  {% endtrans %}
</p>
<p>
  {% trans langs=LANGUAGES.items() %}
    Current locale: {{ LANG }}.<br>
    Available locales: {{ langs }}.
  {% endtrans %}
</p>
<p>Some more examples:</p>
<ul>
  <li><a href="{{ url('examples.bleach') }}">Input sanitization with Bleach</a></li>
</ul>
{% endblock %}
{% block site_js %}
    {% compress js %}
    <script src="{{ static('examples/js/libs/jquery-1.4.4.min.js') }}"></script>
    <script src="{{ static('examples/js/libs/jquery.cookie.js') }}"></script>
    <script src="{{ static('examples/js/init.js') }}"></script>
    {% endcompress %}
    {% if not request.user.is_active %}
        {{ browserid_form.media }}
    {% endif %}
{% endblock %}
