{% load i18n %}
{% load staticfiles %}

<!DOCTYPE html>
<html>
<head>
    <title>{{ site_name }}: {% block title %}{% trans "New snippet" %}{% endblock %}</title>
    <link rel="stylesheet" href="{% static "dpaste/bootstrap/css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="{% static "dpaste/theme.css" %}">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	{% block extrahead %}{% endblock %}
</head>
<body>

<div class="container-fluid">
    <header>
        <ul class="nav nav-pills pull-right">
            <li class="{% block dpaste_nav_about %}{% endblock %}"><a href="{% url "dpaste_about" %}">{% trans "About" %}</a></li>
            <li class="{% block dpaste_nav_history %}{% endblock %}"><a href="{% url "snippet_history" %}">{% trans "History" %}</a></li>
            <li class="{% block dpaste_nav_new %}{% endblock %}"><a href="{% url "snippet_new" %}">{% trans "New snippet" %} &rarr;</a></li>
        </ul>
        <h3 class="headline"><a href="/">{% block headline %}{% endblock %}</a></h3>
    </header>
    {% block page %}
        PAGE MISSING
    {% endblock %}
</div>

{% block script_footer %}
<script src="{{ jquery_url }}"></script>
<script>
jQuery(function($) {
    $('.autofocus textarea:first').focus();
    $('.superenter textarea').on('keydown', function(e){
        var metaKey;
        if (navigator.appVersion.indexOf("Win")!=-1) {
            metaKey = e.ctrlKey;
        } else {
            metaKey = event.metaKey;
        }
        if (e.keyCode == 13 && metaKey) {
            $(this).closest('form').submit();
            return false;
        }
    });
});
</script>
{% endblock %}

</body>
</html>
