forked from TMSAProgrammers/cyberpatriots-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_include.js
39 lines (33 loc) · 997 Bytes
/
default_include.js
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
// Include stylesheet
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"CSS/default.css\">");
// Include navbar
document.write(
"<!-- Navbar -->" +
"<div id=\"navbar\">" +
"<a href=\"home.html\">" +
"<button>Home</button>" +
"</a>" +
"<a href=\"calendar.html\">" +
"<button>Calendar</button>" +
"</a>" +
"<a href=\"members.html\">" +
"<button>Members</button>" +
"</a>" +
"<a href=\"resources.html\">" +
"<button>Resources</button>" +
"</a>" +
"<a>" +
"<button onclick=\"snackbar()\">Blog</button>" +
"</a>" +
"<div id=\"snackbar\">This has yet to be completed</div>" +
"</div>");
function snackbar() {
// Get the snackbar DIV ew
var x = document.getElementById("snackbar");
// Add the "show" class to DIV
x.className = "show";
// After 3 seconds, remove the show class from DIV
setTimeout(function () {
x.className = x.className.replace("show", "");
}, 3000);
}