{% extends 'portal/base.html' %}
{% load static %}
{% load i18n %}
{% load app_tags %}

{% block title %}Code for Life - Rapid Router{% endblock %}

{% block head %}
    {% include 'game/crowdin.html' %}
    <link rel="manifest" href="{% static "manifest.json" %}">
{% endblock head %}

{% block subNav %}
{{ block.super }}
<div class="banner banner--teacher row">
    <div class="col-sm-5 col-sm-offset-2">
        <h1 class="banner__text--primary">Rapid Router</h1>
        <h4>Rapid router has been created to teach the first principles of computer programming.</h4>
    </div>
    <div class="col-sm-5">
        <div class="banner--picture"><div class="banner--picture__inside1"><div class="banner--picture__inside2 banner--picture--play"></div></div></div>
    </div>
</div>
<div class="sticky-subnav sub-nav sub-nav--teacher">
    {% block nav_ocargo_levels %}
        <a class="button button--secondary button--secondary--light" href="{% url 'levels' %}">{% trans "Levels" %}</a>
    {% endblock nav_ocargo_levels %}
    {% block nav_ocargo_create %}
        <a class="button button--secondary button--secondary--light" href="{% url 'level_editor' %}">{% trans "Create" %}</a>
    {% endblock nav_ocargo_create %}
    {% if user|is_logged_in_as_school_user %}
        {% block nav_ocargo_scoreboard %}
            <a class="button button--secondary button--secondary--light" href="{% url 'scoreboard' %}">{% trans "Scoreboard" %}</a>
        {% endblock nav_ocargo_scoreboard %}
    {% endif %}
    {% if user|is_logged_in_as_teacher %}
        {% block nav_ocargo_moderate %}
            <a class="button button--secondary button--secondary--light" href="{% url 'level_moderation' %}">{% trans "Moderate" %}</a>
        {% endblock nav_ocargo_moderate %}
    {% endif %}
</div>

<script type="text/javascript">
    $(document).ready(function(){
        if($(window).width() > 760) {
            toggleStickySubnav($('.banner').outerHeight() + $('.menu').outerHeight());
        }
    });
</script>
{% endblock subNav %}

{% block content %}{% endblock %}

{% block scripts %}
  {{block.super}}
  <script type='text/javascript' src='{% static 'game/js/foundation/vendor/js.cookie.min.js' %}'></script>
  <script type='text/javascript' src='{% url 'js-reverse' %}'></script>
  <script type='text/javascript' src='{% url 'rapid-router/javascript-catalog' %}'></script>
  <script type='text/javascript' src='{% static 'game/js/jquery.touchy.min.js' %}'></script>
{% endblock %}
