forked from HackAssistant/registration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.html
222 lines (195 loc) · 9.32 KB
/
base.html
1
2
3
4
5
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
{% load static %}
{% load bootstrap3 %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="theme-color" content="#f8f8f8">
<meta name="author" content="{{ h_name }}">
<link rel="icon" href="{% static 'favicon.png' %}" type="image/png">
<link rel="icon" href="{% static 'favicon.ico' %}" type="image/x-icon">
<meta name="description" content="{{ h_description }}">
<!--FACEBOOK DESCRIPTION -->
<meta property="og:title" content="{{ h_app_name }}"/>
<meta property="og:site_name" content="{{ h_app_name }}"/>
<meta property="og:description" content="{{ h_description }}"/>
{% if h_og_image %}
<meta property="og:image" content="{{ h_og_image }}">
<meta property="og:image:secure_url" content="{{ h_og_image }}">
{% endif %}
<meta property="og:url" content="https://{{ h_domain }}/">
<!--TWITTER DESCRIPTION -->
<meta name="twitter:card" content="summary">
{% if h_tw %}
<meta name="twitter:site" content="@{{ h_tw }}">
<meta name="twitter:creator" content="@{{ h_tw }}">
{% endif %}
<meta name="twitter:title" content="{{ h_app_name }}">
<meta name="twitter:description" content="{{ h_description }}">
{% if h_og_image %}
<meta name="twitter:image" content="{{ h_og_image }}">
{% endif %}
<link rel="stylesheet" href="{% static 'css/reset.css' %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{% static 'css/main.css' %}">
<link rel="stylesheet" href="{% static 'lib/snackbar.min.css' %}">
<link rel="stylesheet" href="{% static 'lib/material.css' %}">
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<script src="{% static 'lib/snackbar.min.js' %}"></script>
{% block head %}
{% endblock %}
<title>{% block title %}{% block head_title %}{% endblock %} | {% endblock %}{{ h_app_name }}</title>
</head>
<body>
{% if messages %}
<script>
$(function () {
// {% for message in messages %}
$.snackbar({
content: "{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}Important: {% endif %}{{ message }}",
timeout: 3000
});
// {% endfor %}
})
</script>
{% endif %}
{% block navbar %}
<nav class="navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand white-text" style="margin: 0; padding: 0;" href="/">
<img style="margin: 5px; padding: 0;" src="{% static 'img/logo_white.png' %}" alt="{{ h_app_name }}" height="40" width="114">
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right ">
{% if request.user.is_authenticated %}
{% if request.user.is_admin %}
<li class="{% if request.resolver_match.url_name == "admin:index" %}active{% endif %}"><a
href="{% url 'admin:index' %}">Admin</a></li>
{% endif %}
{% if request.user.email_verified and request.user.has_usable_password %}
{% if request.user.is_organizer %}
<li class="{% if 'stats' in request.build_absolute_uri %}active{% endif %}"><a
href="{% url 'app_stats' %}">Stats</a></li>
<li class="{% if 'applications' in request.build_absolute_uri %}active{% endif %}"><a
href="{% url 'app_list' %}">Applications</a></li>
{% if h_r_enabled %}
<li class="{% if 'reimbursement' in request.build_absolute_uri %}active{% endif %}">
<a href="{% url 'reimbursement_list' %}">Reimbursements</a></li>
{% endif %}
{% endif %}
{% if h_hw_enabled %}
{% include 'include/hardware_tab.html' %}
{% endif %}
{% if request.user.is_organizer or request.user.is_volunteer %}
<li class="{% if 'checkin' in request.build_absolute_uri %}active{% endif %}">
<a href="{% url 'check_in_list' %}">Check-in</a></li>
{% endif %}
{% endif %}
<li><a href="{% url 'account_logout' %}">Logout</a></li>
{% else %}
<li><a href="{% url 'account_login' %}">Sign In</a></li>
<li><a href="{% url 'account_signup' %}">Sign Up</a></li>
{% endif %}
</ul>
</div>
</div>
</nav>
{% endblock %}
<div class="content container">
<div class="content-inside">
{% block body %}
<div class="margin-top">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-body">
{% block content %}
{% endblock %}
</div>
</div>
</div>
</div>
{% block extra_body %}
{% endblock %}
{% endblock %}
</div>
</div>
<footer class="footer navbar-fixed-bottom">
<div class="container">
<div class="row">
<div class="col-sm-6">
<p>Have a question? We're here for you! {{ h_contact_email | urlize }}</p>
</div>
<div class="social-icons col-sm-6 text-right text-center-xs">
{% if h_tw %}
<a class="btns" target="_blank" href="https://twitter.com/{{ h_tw }}">
<i aria-hidden="true" class="fa fa-twitter fa-lg"></i>
</a>
{% endif %}
{% if h_instagram %}
<a class="btns" target="_blank" href="https://instagram.com/{{ h_instagram }}">
<i aria-hidden="true" class="fa fa-instagram fa-lg"></i>
</a>
{% endif %}
{% if h_fb %}
<a class="btns" target="_blank" href="https://fb.com/{{ h_fb }}">
<i aria-hidden="true" class="fa fa-facebook fa-lg"></i>
</a>
{% endif %}
{% if h_contact_email %}
<a class="btns" target="_blank" href="mailto:{{ h_contact_email }}">
<i aria-hidden="true" class="fa fa-envelope-o fa-lg"></i>
</a>
{% endif %}
{% if h_repo %}
<a class="btns" target="_blank" href="{{ h_repo }}">
<i aria-hidden="true" class="fa fa-github fa-lg"></i>
</a>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<small>Made with <i class="fa fa-heart" aria-hidden="true"></i> by {{ h_name }} </small>
{# OH NO YOU FOUND ME! This is just an internal joke that appeared at the first edition of HackUPC. #}
{# You can remove it, but if you dont care, please keep it. I'm a sentimental - Gerard Casas [email protected] #}
<span style="display: none">BIENE {{ h_name }}</span>
</div>
</div>
</div>
</footer>
{% block extra_scripts %}
{% endblock %}
{% if h_ga %}
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', '{{ h_ga }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>