base.html 6.93 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="en">
Luuk Scholten's avatar
Luuk Scholten committed
5
<head>
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

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

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="theme-color" content="#E62272"/>

    <link rel="icon" href="{% static "img/browser/favicon.ico" %}" type="image/png">
    <link rel="icon" sizes="192x192" href="{% static "img/browser/icon.png" %}">
    <link rel="apple-touch-icon" href="{% static "img/browser/icon.png" %}">
    <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" %}">

    <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"
          content="{% block opengraph_title %}{% trans 'Study Association Thalia' %}{% endblock %}"/>
    {% block opengraph %}{% endblock %}

    {% block css_head %}
        {% compress css %}
            <link href="{% static "css/main.scss" %}" rel="stylesheet" type="text/x-scss">
        {% endcompress %}
    {% endblock %}
34

35
36
    {% block js_head %}
    {% endblock %}
Luuk Scholten's avatar
Luuk Scholten committed
37

38
39
40
    <!-- build commit: {{ SOURCE_COMMIT }} -->
</head>
<body>
Luuk Scholten's avatar
Luuk Scholten committed
41

42
43
<section id="announcements-alerts">
    {% if request.member and request.member.current_membership is None %}
44
        <div class="announcement">
45
            <i class="fas fa-id-card"></i>
46
47
48
49
50
            <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>
51
        </div>
52
53
54
55
    {% endif %}
    {% include "announcements/announcement.html" with announcements=announcements %}
</section>

56
<div id="accentbar" class="sticky-top"></div>
57

58
<nav class="navbar navbar-expand-lg sticky-top">
59
60
61
62
63
64
65
66
67
68
69
70
71
    <div class="container">
        <a class="navbar-brand" href="{% url 'index' %}">
            <img
                src="{% static 'img/logo-'|add:LANGUAGE_CODE|add:'.png' %}"
                id="logo"
                alt="{% trans 'Study Association Thalia' %}"
            >
        </a>
        <div class="flex-grow-1"></div>
        <div class="navbar-user order-1 d-flex">
            {% if LANGUAGE_CODE == 'nl' %}
                <a href="#lang" data-next="{{ redirect_to }}" data-lang="en" data-href="{% url 'set_language' %}"
                   class="btn btn-link" id="language-switcher"><img src="{% static 'img/flags/gb.svg' %}"/></a>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
72
            {% else %}
73
74
                <a href="#lang" data-next="{{ redirect_to }}" data-lang="nl" data-href="{% url 'set_language' %}"
                   class="btn btn-link" id="language-switcher"><img src="{% static 'img/flags/nl.svg' %}"/></a>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
75
            {% endif %}
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
            <div class="btn-group">
                {% if not user.is_authenticated %}
                    <a href="{% url 'login' %}" class="btn btn-primary"><i class="fas fa-user"></i></a>
                {% else %}
                    <a href="{% url 'account' %}" class="btn btn-primary"><i 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>
                    <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>
                        <a class="dropdown-item" href="{% url 'admin:index' %}">{% trans "Site administration" %}</a>
                        <a class="dropdown-item" href="{% url 'logout' %}">{% trans "Log Out" %}</a>
                    </div>
92
                {% endif %}
Luuk Scholten's avatar
Luuk Scholten committed
93
            </div>
94
95
96
97
98
99
        </div>
        <button class="navbar-toggler order-0 justify-content-end" type="button" data-toggle="collapse"
                data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false"
                aria-label="Toggle navigation"><i class="fa fa-bars"></i>
        </button>
        <div class="collapse navbar-collapse justify-content-end order-lg-0 order-2" id="navbarCollapse">
100
            {% render_main_menu %}
Luuk Scholten's avatar
Luuk Scholten committed
101
        </div>
102
103
104
105
106
    </div>
</nav>

<header id="page-header">
    {% block header_image_container %}
107
        <img src="{% block header_image %}{% pick_header_image %}{% endblock header_image %}" class="image" />
108
109
    {% endblock header_image_container %}
</header>
Luuk Scholten's avatar
Luuk Scholten committed
110

111
{% block pre-body %}{% endblock pre-body %}
Luuk Scholten's avatar
Luuk Scholten committed
112

113
114
115
116
117
118
119
120
121
122
123
124
<div id="page-content" class="clearfix">
    {% block body %}{% endblock body %}
</div>

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

<footer>
    <div class="container d-flex justify-content-md-between align-items-center flex-md-row flex-column">
        <div class="copyright">
            <strong>Copyright {% now "Y" %} {% trans 'Study Association Thalia' %}</strong>
            <span class="divider">&#9679;</span>
            <a href="{% url 'privacy-policy' %}">{% trans "privacy policy"|capfirst %}</a>
Luuk Scholten's avatar
Luuk Scholten committed
125
        </div>
126
127
128
129
130
131
        <div class="social float-right">
            <a target="_blank" href="https://www.facebook.com/svThalia"><i class="fab fa-facebook"></i></a>
            <a target="_blank" href="https://twitter.com/svThalia"><i class="fab fa-twitter"></i></a>
            <a target="_blank" href="http://www.linkedin.com/groups?gid=54887"><i
                class="fab fa-linkedin"></i></a>
            <a target="_blank" href="https://gitlab.science.ru.nl/thalia/"><i class="fab fa-gitlab"></i></a>
Luuk Scholten's avatar
Luuk Scholten committed
132
133
        </div>
    </div>
134
135
136
137
138
139
140
141
</footer>

{% block js_body %}
    <script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
    {% compress js %}
        <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>
142
        <script type="text/javascript" src="{% static "js/jquery.fancybox.js" %}"></script>
143
144
145
        <script type="text/javascript" src="{% static "js/main.js" %}"></script>
    {% endcompress %}
{% endblock %}
Luuk Scholten's avatar
Luuk Scholten committed
146
</body>
Thom Wiggers's avatar
Thom Wiggers committed
147
</html>