-
Notifications
You must be signed in to change notification settings - Fork 30
/
base.layout.tmpl
172 lines (144 loc) · 6.37 KB
/
base.layout.tmpl
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
{{define "base"}}
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Fort Smythe Bed and Breakfast</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/vanillajs-datepicker@1.0/dist/css/datepicker-bs4.min.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/notie/dist/notie.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/styles.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#"> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Rooms
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/generals-quarters">General's Quarters</a></li>
<li><a class="dropdown-item" href="/majors-suite">Major's Suite</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="/search-availability">Search Availability</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/contact">Contact</a>
</li>
<li class="nav-item">
{{if eq .IsAuthenticated 1}}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-bs-toggle="dropdown"
aria-expanded="false">
Admin
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/admin/dashboard">Dashboard</a></li>
<li><a class="dropdown-item" href="/user/logout">Logout</a></li>
</ul>
</li>
{{else}}
<a class="nav-link" href="/user/login" tabindex="-1" aria-disabled="true">Login</a>
{{end}}
</li>
</ul>
</div>
</div>
</nav>
{{block "content" .}}
{{end}}
<footer class="row my-footer">
<div class="row">
<div class="col text-center">
<strong>Fort Smythe Bed & Breakfast</strong><br>
100 Rocky Road<br>
Northbrook, Ontario<br>
Canada<br>
(416) 555-1212<br>
<a href="mailto:info@fsbb.ca">info@fsbb.ca</a>
</div>
<div class="col">
</div>
<div class="col text-center">
<strong>Your home away<br>from home</strong>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/vanillajs-datepicker@1.0/dist/js/datepicker-full.min.js"></script>
<script src="https://unpkg.com/notie"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script src="/static/js/app.js"></script>
{{block "js" .}}
{{end}}
<script>
let attention = Prompt();
(function () {
'use strict';
window.addEventListener('load', function () {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
let forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
Array.prototype.filter.call(forms, function (form) {
form.addEventListener('submit', function (event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
function notify(msg, msgType) {
notie.alert({
type: msgType,
text: msg,
})
}
function notifyModal(title, text, icon, confirmationButtonText) {
Swal.fire({
title: title,
html: text,
icon: icon,
confirmButtonText: confirmationButtonText
})
}
{{with .Error}}
notify("{{.}}", "error")
{{end}}
{{with .Flash}}
notify("{{.}}", "success")
{{end}}
{{with .Warning}}
notify("{{.}}", "warning")
{{end}}
</script>
</body>
</html>
{{end}}