base.html 8.73 KB
Newer Older
1
{% load i18n static menu compress pick_header_image %}
Thom Wiggers's avatar
Thom Wiggers committed
2
{% get_current_language as LANGUAGE_CODE %}
Luuk Scholten's avatar
Luuk Scholten committed
3
<!DOCTYPE html>
4
<html lang="{{ LANGUAGE_CODE }}">
Luuk Scholten's avatar
Luuk Scholten committed
5
<head>
6
7
8
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

9
10
    <title>{% block title %}
        {% trans "Study Association Thalia" %}{% endblock %}</title>
11

12
13
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1">
14
    <meta name="theme-color" content="#E62272"/>
15
16
17
18
19
    {% if debug %}
        <link rel="icon" href="{% static "img/browser/icon-debug.png" %}">
    {% else %}
        <link rel="icon" href="{% static "img/browser/icon.png" %}">
    {% endif %}
20
    <link rel="apple-touch-icon" href="{% static "img/browser/icon.png" %}">
21
22
23
24
25
26
27
28
    <meta name="msapplication-square70x70logo"
          content="{% static "img/browser/icon-smalltile.png" %}">
    <meta name="msapplication-square150x150logo"
          content="{% static "img/browser/icon-mediumtile.png" %}">
    <meta name="msapplication-wide310x150logo"
          content="{% static "img/browser/icon-widetile.png" %}">
    <meta name="msapplication-square310x310logo"
          content="{% static "img/browser/icon-largetile.png" %}">
29
30
31
32
33

    <meta property="og:image"
          content="{% if request.is_secure %}https://{% else %}http://{% endif %}{{ request.get_host }}{% static "img/browser/icon-largetile.png" %}"/>
    <meta property="og:type" content="website"/>
    <meta property="og:title"
34
          content="{% block opengraph_title %}{% trans 'Study Association Thalia' %}{% endblock %}"/>
35
36
37
38
    {% block opengraph %}{% endblock %}

    {% block css_head %}
        {% compress css %}
39
40
            <link href="{% static "css/main.scss" %}" rel="stylesheet"
                  type="text/x-scss">
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
41
42
            <link href="{% static "css/main-dark.scss" %}" rel="stylesheet" media="(prefers-color-scheme: dark)"
                  type="text/x-scss">
43
44
        {% endcompress %}
    {% endblock %}
45

46
47
    {% block js_head %}
    {% endblock %}
Luuk Scholten's avatar
Luuk Scholten committed
48

49
50
    <!-- build commit: {{ SOURCE_COMMIT }} -->
</head>
51
<body class="{% block body_class %}{% endblock %}">
Luuk Scholten's avatar
Luuk Scholten committed
52

53
54
<section id="announcements-alerts">
    {% if request.member and request.member.current_membership is None %}
55
        <div class="announcement">
56
            <i class="fas fa-id-card"></i>
57
58
59
60
61
            <p>
                <a href="{% url 'registrations:renew' %}">
                    {% trans "You're currently not a member of Thalia. Renew your membership to get access to all parts of the website." %}
                </a>
            </p>
62
        </div>
63
    {% elif request.member.profile.event_permissions != "all" %}
64
65
66
67
68
69
70
71
        <div class="announcement">
            <p>
                {% blocktrans trimmed %}
                You're currently not allowed to go to certain events. Please contact Thalia's
                <a href="mailto:treasurer@thalia.nu">treasurer</a> for more information.
                {% endblocktrans %}
            </p>
        </div>
72
73
74
75
    {% endif %}
    {% include "announcements/announcement.html" with announcements=announcements %}
</section>

76
<div id="accentbar"></div>
77

78
<nav class="navbar navbar-expand-lg">
79
80
    <div class="container">
        <a class="navbar-brand" href="{% url 'index' %}">
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
81
82
83
84
85
86
87
88
89
90
            <picture>
                <source srcset="{% static 'img/logo-'|add:LANGUAGE_CODE|add:'-dark.svg' %}" media="(prefers-color-scheme: dark)">
                <source srcset="{% static 'img/logo-'|add:LANGUAGE_CODE|add:'.svg' %}" media="(prefers-color-scheme: light)">
                <img
                    src="{% static 'img/logo-'|add:LANGUAGE_CODE|add:'.svg' %}"
                    id="logo"
                    alt="{% trans 'Study Association Thalia' %}"
                    height="220px"
                >
            </picture>
91
92
93
        </a>
        <div class="flex-grow-1"></div>
        <div class="navbar-user order-1 d-flex">
94
95
            <a href="#lang"
               class="btn btn-link"
96
97
98
99
100
101
102
               id="language-switcher">
                {% if LANGUAGE_CODE == 'nl' %}
                    <img src="{% static 'img/flags/en.svg' %}"/>
                {% else %}
                    <img src="{% static 'img/flags/nl.svg' %}"/>
                {% endif %}
            </a>
103
104
            <div class="btn-group">
                {% if not user.is_authenticated %}
105
106
                    <a href="{% url 'login' %}" class="btn btn-primary"><i
                        class="fas fa-user"></i></a>
107
                {% else %}
108
                    <a href="{% url 'members:user' %}" class="btn btn-primary"><i
109
110
111
112
113
                        class="fas fa-user"></i></a>
                    <button type="button"
                            class="btn btn-primary dropdown-toggle dropdown-toggle-split"
                            data-toggle="dropdown" aria-haspopup="true"
                            aria-expanded="false"></button>
114
115
116
117
118
119
                    <div class="dropdown-menu">
                        <a class="dropdown-item"
                           href="{% url 'members:edit-profile' %}">{% trans "edit profile"|capfirst %}</a>
                        <a class="dropdown-item"
                           href="{% url 'password_change' %}">{% trans "change password"|capfirst %}</a>
                        <div class="dropdown-divider"></div>
120
121
122
123
                        <a class="dropdown-item"
                           href="{% url 'admin:index' %}">{% trans "Site administration" %}</a>
                        <a class="dropdown-item"
                           href="{% url 'logout' %}">{% trans "Log Out" %}</a>
124
                    </div>
125
                {% endif %}
Luuk Scholten's avatar
Luuk Scholten committed
126
            </div>
127
        </div>
128
129
130
131
        <button class="navbar-toggler order-0 justify-content-end"
                type="button" data-toggle="collapse"
                data-target="#navbarCollapse" aria-controls="navbarCollapse"
                aria-expanded="false"
132
133
                aria-label="Toggle navigation"><i class="fa fa-bars"></i>
        </button>
134
135
136
        <div
            class="collapse navbar-collapse justify-content-end order-lg-0 order-2"
            id="navbarCollapse">
137
            {% render_main_menu %}
Luuk Scholten's avatar
Luuk Scholten committed
138
        </div>
139
140
141
142
143
    </div>
</nav>

<header id="page-header">
    {% block header_image_container %}
144
145
146
147
        <img src="

            {% block header_image %}{% pick_header_image %}{% endblock header_image %}"
             class="image"/>
148
149
    {% endblock header_image_container %}
</header>
Luuk Scholten's avatar
Luuk Scholten committed
150

151
{% block pre-body %}{% endblock pre-body %}
Luuk Scholten's avatar
Luuk Scholten committed
152

153
154
155
156
157
158
159
<div id="page-content" class="clearfix">
    {% block body %}{% endblock body %}
</div>

{% block post-body %}{% endblock post-body %}

<footer>
160
161
    <div
        class="container d-flex justify-content-md-between align-items-center flex-md-row flex-column">
162
163
164
        <div class="copyright">
            <strong>Copyright {% now "Y" %} {% trans 'Study Association Thalia' %}</strong>
            <span class="divider">&#9679;</span>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
165
            <a href="{% url 'singlepages:privacy-policy' %}">{% trans "privacy policy"|capfirst %}</a>
Luuk Scholten's avatar
Luuk Scholten committed
166
        </div>
167
        <div class="social float-right">
168
169
170
171
172
173
174
175
176
177
178
179
            <a target="_blank" rel="noopener" href="https://www.facebook.com/svThalia">
                <i class="fab fa-facebook"></i>
            </a>
            <a target="_blank" rel="noopener" href="https://twitter.com/svThalia">
                <i class="fab fa-twitter"></i>
            </a>
            <a target="_blank" rel="noopener" href="http://www.linkedin.com/groups?gid=54887">
                <i class="fab fa-linkedin"></i>
            </a>
            <a target="_blank" rel="noopener" href="https://gitlab.science.ru.nl/thalia/">
                <i class="fab fa-gitlab"></i>
            </a>
Luuk Scholten's avatar
Luuk Scholten committed
180
181
        </div>
    </div>
182
183
</footer>

184
185
186
<form method="post" action="{% url 'set_language' %}" class="d-none"
      id="change-language-form">
    {% csrf_token %}
187
    <input type="hidden" value="{{ request.get_full_path }}" name="next"/>
188
189
190
191
192
    <input type="hidden"
           value="{% if LANGUAGE_CODE == 'nl' %}en{% else %}nl{% endif %}"
           name="language"/>
</form>

193
{% block js_body %}
194
195
    <script type="text/javascript"
            src="{% url 'javascript-catalog' %}"></script>
196
    {% compress js %}
197
198
199
200
201
202
203
        <script type="text/javascript"
                src="{% static "js/jquery.min.js" %}"></script>
        <script type="text/javascript"
                src="{% static "js/js.cookie.min.js" %}"></script>
        <script type="text/javascript"
                src="{% static "js/bootstrap.bundle.min.js" %}"></script>
        <script type="text/javascript"
204
                src="{% static "js/jquery.fancybox.min.js" %}"></script>
205
206
207
208
        <script type="text/javascript"
                src="{% static "js/main.js" %}"></script>
        <script type="text/javascript"
                src="{% static "announcements/js/announcements.js" %}"></script>
209
210
    {% endcompress %}
{% endblock %}
Luuk Scholten's avatar
Luuk Scholten committed
211
</body>
Thom Wiggers's avatar
Thom Wiggers committed
212
</html>