{% extends "base.html" %}
{% load staticfiles %}{% load i18n %}{% get_current_language as LANGUAGE_CODE %}

{% block meta %}
    <meta name="description" content="Secure Free Chat - SFChat"  />
    <meta name="keywords" content="chat, security, free, SFChat" />
{% endblock %}
{% block title %} - Secure Free Chat{% endblock %}

{% block js %}
    <script src='{% static 'bower_components/requirejs/require.js' %}'></script>
    <script nonce="2726c7f26c">
        require(["{% static 'js/app/requirejs-config.js' %}"], function (config) { require(['base']); });
    </script>
{% endblock %}

{% block main %}
    <div id="chat-entry">
        <form method="POST" action="/create-chat/">{% csrf_token %}
            {{ form_create_chat }}
            <button id="create_chat" class="btn btn-green" type="submit" >
                {% trans "create chat" %}
            </button>
        </form>
        <div id='or'>{% trans "OR" %}</div>
        <form method="POST">{% csrf_token %}
            {{ form.as_p }}<button id="join_chat" class="btn btn-orange" type="submit">{% trans "join" %}</button>
        </form>
    </div>
    <hr>
    <div id="arrow-down"></div>    
    <article id="intro">
        {% blocktrans %}
            <h2>Chat:</h2>
            <ol>
                <li>Click to "create chat"</li>
                <li>Send code to friend</li>
                <li>Enjoy secure free chatting!</li>
            </ol>
            <h2>Secure because:</h2>
            <ol>
                <li>Use SSL</li>
                <li>Chat history is not saved on server</li>
            </ol>
            <h2>Free considering:</h2>
            <ol>
                <li>Open source</li>
                <li>BSD 3-Clause license</li>
            </ol>
        {% endblocktrans %}    
    </article>
{% endblock %}

{% block onload_js_options %}
    <select id="buttonTarget">
        <option value="createChat">#create_chat</option>
        <option value="joinChat">#join_chat</option>
    </select>
{% endblock %}
