Skip to content
Snippets Groups Projects
base.html 2.81 KiB
Newer Older
  • Learn to ignore specific revisions
  • {% load static %}
    
    {% load i18n %}
    
    {% load bootstrap4 %}
    
    {% load fontawesome_5 %}
    
    {% load tags_AKModel %}
    
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
    
        <title>{% block title %}AK Planning{% endblock %}</title>
    
    
        {# Load Bootstrap CSS and JavaScript as well as font awesome #}
        {% bootstrap_css %}
        {% bootstrap_javascript jquery='slim' %}
    
        {% fontawesome_5_static %}
    
        <link rel="stylesheet" href="{% static 'common/css/custom.css' %}">
    
    
    </head>
    <body>
    
        {% block language-switcher %}
            <!-- language switcher -->
            <div class="container" style="margin-top:20px">
                <form   action="{% url 'set_language' %}"
                        method="post"
                        class="form-inline"
                        name="language-form"
                        style="flex-direction: column;">
                    {% csrf_token %}
    
                    <input name="next" type="hidden" value="{{ request.path }}" />
    
                    {% get_current_language as LANGUAGE_CODE %}
                    {% get_available_languages as LANGUAGES %}
                    {% get_language_info_list for LANGUAGES as languages %}
    
                    <div style="align-self: end;">
                        {% for language in languages %}
                            &nbsp;&nbsp;
                            <button type="submit"
                                    class="btn {% if language.code == LANGUAGE_CODE %}btn-info{% else %}btn-outline-info{% endif %}"
                                    name="language"
                                    value="{{ language.code }}"
                                    style="align-self: end;">
                                {{ language.code | upper }}
                            </button>
                        {% endfor %}
                    </div>
                </form>
            </div>
        {% endblock %}
    
        <div class="container" style="margin-top:15px;margin-bottom: 30px;">
    
            <ol class="breadcrumb">
                {% block breadcrumbs %}
                {% endblock %}
            </ol>
        </div>
    
        <div class="container">
            {% block content %}
            {% endblock %}
        </div>
    
    
        <div class="container" style="margin-top: 20px">
            <div id="footer" style="padding-top:10px;padding-bottom:10px;border-top:1px solid grey;">
                {% block footer_custom %}
                {% endblock %}
                {% footer_info as FI %}
                {% if FI.impress_text %}
                    {{ FI.impress_text }} &middot;
                {% endif %}
                {% if FI.impress_url %}
                    <a href="{{ FI.impress_url }}">{% trans "Impress" %}</a> &middot;
                {% endif %}
                {% if FI.repo_url %}
                    <a href="{{ FI.repo_url }}">{% trans "This software is open source" %}</a>
                {% endif %}
            </div>
        </div>
    
    
    </body>
    </html>