layout.html 5.15 KB
Newer Older
YSelf Tool's avatar
YSelf Tool committed
1 2 3 4 5 6
<!doctype html>
<html>
<head>
    {% block head %}
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
YSelf Tool's avatar
YSelf Tool committed
7
    <meta name="mobile-web-app-capable" content="yes">
8
    <meta name="description" content="moderation tool for handling speaking order">
9 10
    <link rel="stylesheet" href="{{ url_for('static', filename='css/material.red-blue.min.css') }}" /> 
    <link rel="stylesheet" href="{{ url_for('static', filename='font/icon-font.css') }}">
YSelf Tool's avatar
YSelf Tool committed
11
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" />
12 13
    <script src="{{ url_for('static', filename='js/material.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/sorttable.js') }}"></script>
14
    <script src="{{ url_for("update_time_js") }}" async></script>
YSelf Tool's avatar
YSelf Tool committed
15 16 17
    {% block additional_js %}
    <!-- Place to insert more .js-files -->
    {% endblock %}
18
    <title>{% block title %}Unknown Page{% endblock %} - Redeleitsystem</title>
YSelf Tool's avatar
YSelf Tool committed
19 20 21
    {% endblock %}
</head>
<body>
YSelf Tool's avatar
YSelf Tool committed
22 23
<div class="rede-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
    <header class="rede-header mdl-layout__header mdl-color--white mdl-color--grey-100 mdl-color-text--grey-600">
YSelf Tool's avatar
YSelf Tool committed
24
        <div class="mdl-layout__header-row">
YSelf Tool's avatar
YSelf Tool committed
25
            <a href="{{ url_for('index') }}"><span class="mdl-layout-title">Redeleitsystem</span></a>
YSelf Tool's avatar
YSelf Tool committed
26
            <div class="mdl-layout-spacer"></div>
27 28 29 30
            <span id="rede-time-div" class="mdl-layout-title">
                {% include "content_time.html" %}
            </span>
            <div class="mdl-layout-spacer"></div>
YSelf Tool's avatar
YSelf Tool committed
31 32 33 34
            <button class="mdl-button mdl-js-button mdl-js-ripple-effet mdl-button--icon" id="hdrbtn">
                <i class="material-icons">more_vert</i>
            </button>
            <ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
YSelf Tool's avatar
YSelf Tool committed
35
                {% block topnav %}
YSelf Tool's avatar
YSelf Tool committed
36 37 38 39 40 41 42 43 44 45
                    <li class="mdl-menu__item">Impressum</li>
                {% endblock %}
            </ul>
        </div>
    </header>
    <div class="rede-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50">
        <header class="rede-drawer-header">
            <div class="rede-account-dropdown">
                <span>
                {% if current_user.is_authenticated() %}
YSelf Tool's avatar
YSelf Tool committed
46 47 48 49 50 51 52 53 54 55 56
                    <p class="md-24">
                        <i class="material-icons md-48">
                            {% if "user" in current_user.roles and not "admin" in current_user.roles %}
                                person_outline
                            {% elif "admin" in current_user.roles %}
                                person
                            {% else %}
                                face
                            {% endif %}</i>
                        {{ current_user.fullname }}
                    </p>
YSelf Tool's avatar
YSelf Tool committed
57
                {% else %}
YSelf Tool's avatar
YSelf Tool committed
58 59 60 61
                    <p class="md-24">
                        <i class="material-icons md-48">face</i>
                        Guest
                    </p>
YSelf Tool's avatar
YSelf Tool committed
62 63 64 65 66 67
                {% endif %}
                <div class="mdl-layout-spacer"></div>
                <button id="accbtn" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
                    <i class="material-icons" role="presentation">arrow_drop_down</i>
                    <span class="visuallyhidden">Account</span>
                </button>
YSelf Tool's avatar
YSelf Tool committed
68
                </span>
YSelf Tool's avatar
YSelf Tool committed
69
                <ul class="mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effet" for="accbtn">
YSelf Tool's avatar
YSelf Tool committed
70
                    {% if current_user.is_authenticated() %}
YSelf Tool's avatar
YSelf Tool committed
71
                    <li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("logout") }}">Logout</a></li>
YSelf Tool's avatar
YSelf Tool committed
72
                    {% else %}
YSelf Tool's avatar
YSelf Tool committed
73 74
                    <li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("login") }}">Login</a></li>
                    <li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("register") }}">Register</a></li>
YSelf Tool's avatar
YSelf Tool committed
75 76 77 78
                    {% endif %}
                </ul>
            </div>
        </header>
YSelf Tool's avatar
YSelf Tool committed
79
        <nav class="rede-navigation mdl-navigation mdl-color--blue-grey-800">
YSelf Tool's avatar
YSelf Tool committed
80
            {% if current_user.is_authenticated() and "user" in current_user.roles %}
81
            <a class="mdl-navigation__link" href="{{ url_for("speech.index") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">build</i>Handle speakers</a>
YSelf Tool's avatar
YSelf Tool committed
82
            {% endif %}
83
            <a class="mdl-navigation__link" href="{{ url_for("speech.show") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">announcement</i>Pending speakers</a>
YSelf Tool's avatar
YSelf Tool committed
84 85 86 87
            {% if current_user.is_authenticated() and "admin" in current_user.roles %}
            <a class="mdl-navigation__link" href="{{ url_for("admin.index") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">computer</i>Administration</a>
            {% endif %}
        </nav>
YSelf Tool's avatar
YSelf Tool committed
88 89
    </div>
    <main class="mdl-layout__content mdl-color--grey-100">
YSelf Tool's avatar
YSelf Tool committed
90
        <div id="rede-content-div" class="mdl-grid rede-content">
YSelf Tool's avatar
YSelf Tool committed
91 92 93 94 95 96 97
        {% block content %}
        There is no content yet.
        {% endblock %}
        </div>
    </main>
</body>
</html>