-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlayout.html
70 lines (68 loc) · 2.63 KB
/
layout.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}{%- if title %}{{ title }}{% endif -%}{% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="{{ url_for('static', filename='js/lib/jquery.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/lib/bootstrap.min.js') }}"></script>
<script>
$(document).ready(function() {
// get current URL path and assign 'active' class
var pathname = window.location.pathname;
$('.navbar-nav > li > a[href="'+pathname+'"]').parent().addClass('active');
})
</script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/lib/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand mb-0 h1" href="http://re-cite.org">re-cite.org</a>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="{{ url_for('index') }}">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('about') }}">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="http://github.com/recite/re-cite.org">GitHub</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('contact') }}">Contact Us</a>
</li>
</ul>
</div>
</nav>
<div class="container main-container">
{%- with messages = get_flashed_messages(with_categories=true) -%}
{%- if messages -%}
{%- for category, message in messages -%}
{%- if category == 'failed' -%}
{%- set class = 'danger' -%}
{%- else -%}
{%- set class = 'success' -%}
{%- endif -%}
<div class="alert alert-{{ class }} alert-dismissible">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ message|safe }}
</div>
{%- endfor -%}
{%- endif -%}
{%- endwith -%}
<div class="mb-5 page-header">
<br>
<h4>{% block header %}{%- if header %}{{ header }}{% endif -%}{% endblock %}</h4>
</div>
{%- block body %}{% endblock -%}
<footer class="mt-5 page-footer">
Unsure about how to use the site? Here's a <a href="{{ url_for('how_to') }}">short video</a> to help you get started.<br><br>
<div class="text-center">
© 2018 Copyright: <a href="http://re-cite.org">re-cite.org</a>
</div>
</footer>
</div>
</body>
</html>