-
Notifications
You must be signed in to change notification settings - Fork 16
/
sitebase.jinja2
130 lines (121 loc) · 5.6 KB
/
sitebase.jinja2
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>{{ _('Microsetta') }} {{page_title}}</title>
<link rel="stylesheet" href="/static/vendor/bootstrap-4.4.1-dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="/static/css/minimal_interface.css" />
<link rel="stylesheet" href="/static/css/ucsd_colors.css" />
<link rel="stylesheet" href="/static/css/tmi_colors.css" />
<style>
body {
padding-top: 50px;
margin: 2%;
}
.logo-co {
width: 200px;
height: 36px;
object-fit: contain;
}
.profile-png {
width: 36px;
height: 36px;
object-fit: contain;
}
</style>
<!-- jquery must be enabled before bootstrap for collapsible functionality -->
<script src="/static/vendor/js/jquery-3.4.1.min.js"></script>
<script src="/static/vendor/js/jquery.validate.min.js"></script>
<!-- Argh, bootstrap 4 requires an old version of popper. Should we update to bootstrap 5? -->
<script src="/static/vendor/popper-1.11.0/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"></script>
<script src="/static/vendor/bootstrap-4.4.1-dist/js/bootstrap.min.js"></script>
<script src="/static/input_util.js"></script>
{%block head%}
{%endblock%}
</head>
<body>
{% if admin_mode %}
<nav class="navbar fixed-top navbar-light bg-warning shadow">
{{ _('Administrator Toolbar') }}
<a class="btn btn-outline-success" href="/admin/system_message">{{ _('System Panel') }}</a>
<a class="btn btn-outline-success" href="/admin/emperor_playground">{{ _('Emperor Playground') }}</a>
<a class="btn btn-outline-success" href="{{authrocket_url}}/logout?redirect_uri={{endpoint}}/logout">{{ _('Log Out') }}</a>
<a class="btn btn-outline-success" href="/admin/activation">{{ _('Activation Codes') }}</a>
<form class="form-inline" action="/admin/account_search" method="get">
<input id="email_query" name="email_query" class="form-control mr-sm-2" type="search" placeholder="User Email" aria-label="Search"/>
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">{{ _('Find Account') }}</button>
</form>
</nav>
{% endif %}
{% if not admin_mode %}
<nav class="navbar fixed-top navbar-light bg-light shadow">
<a class="navbar-brand" href="https://microsetta.ucsd.edu" title="microsetta.ucsd.edu">
<img src="/static/img/logo-co.png" class="logo-co"/>
</a>
<div class="dropdown show">
<a class="btn dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if login_info %}
{% if login_info.email %}
<span class="tmi-normal">{{login_info.email |e}}</span>
{% else %}
<!-- <i>Awaiting Account Creation</i>-->
{% endif %}
{% else %}
<!-- <i>Not Signed In</i>-->
{% endif %}
<img src="/static/img/profile.png" class="profile-png"/>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink">
{% if login_info %}
{% if login_info.account_id %}
<a class="dropdown-item" href="/accounts/{{login_info.account_id |e}}/details">{{ _('Account Details') }}</a>
{% else %}
<a class="dropdown-item disabled" href="#">{{ _('Account Details') }}</a>
{% endif %}
<a class="dropdown-item" href="{{authrocket_url}}/logout?redirect_uri={{endpoint}}/logout">{{ _('Log Out') }}</a>
{% else %}
<a class="dropdown-item" href="{{authrocket_url}}/login?redirect_uri={{endpoint}}/authrocket_callback">{{ _('Log In') }}</a>
<a class="dropdown-item" href="{{authrocket_url}}/signup?redirect_uri={{endpoint}}/authrocket_callback">{{ _('Sign Up') }}</a>
{% endif %}
</div>
</div>
</nav>
{% endif %}
{% if system_msg_text %}
<div id="system_message" class="alert alert-{{system_msg_style|e}}" role="alert">
{{system_msg_dictionary[system_msg_text][_(EN_US_KEY)]}} {{ system_msg_time }}
</div>
{% endif %}
<div class="content">
{% if show_breadcrumbs %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb tmi-content">
<li class="breadcrumb-item"><a href="/home">{{ _('Home') }}</a></li>
{%block breadcrumb%}
{%endblock%}
</ol>
</nav>
{% endif %}
<!-- Vue Form Generator references a container named "app" -->
<div class="container-fluid" id="app">
{%block content%}
{%endblock%}
</div>
</div>
{%block footer%}
{%endblock%}
{% if not admin_mode and not hide_footer %}
<br />
<div class="tmi-footer">
<div class="container">
<div class="d-flex justify-content-center">
{% if not disable_faq %}
<a style="background-image: url('/static/img/icon-question-mark.svg')" href="https://microsetta.ucsd.edu/participant-resources/faqs/" target="_blank" class="tmi-icon m-3">{{ _('FAQs') }}</a>
{% endif %}
<a style="background-image: url('/static/img/icon-email.svg')" href="mailto:microsetta@ucsd.edu" class="tmi-icon m-3">{{ _('Email') }}</a>
{# <a style="background-image: url('/static/img/icon-phone.svg')" href="tel:858-246-5690" class="cta icon -phone">858-246-5690</a>#}
</div>
</div>
{% endif %}
</body>
</html>