-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
51 lines (50 loc) · 2.24 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Digital Bulletin Board</title>
<script src="scripts/jquery-3.3.1.min.js"></script>
</head>
<body>
<div id="scroll">auto-scroll: <span id="scroll-status">off <i class="fas fa-stop v-middle"></i></span></div>
<div id="touch"><span><i class="far fa-hand-pointer"></i></span><p><strong>This screen is touch sensitive!<br>Try it out!</strong></p></div>
<div id="seal-header" class="full-width align-center">
<img src="images/NYC_seal.png">
<h2 class="align-center"><u>NEW YORK CITY COUNCIL</u></h2>
<p class="align-right" id="today"></p>
</div>
<div id="agenda-container"></div>
<script>
const files = {
// 'scripts/jquery-3.3.1.min.js': {"placement": "body", "type": "js"},
'vendor/fontawesome-free-5.0.10/svg-with-js/js/fontawesome-all.min.js': {"placement": "head", "type":"js"},
'vendor/jquery.mobile.custom/jquery.mobile.custom.min.js': {"placement": "body", "type": "js"},
'images/favicon.ico': {"placement": "head", "type":"css", "rel": "icon"},
'css/style.css': {"placement": "head", "type":"css", "rel": "stylesheet"},
'scripts/script.js': {"placement": "body", "type": "js"},
'scripts/onLoad.js': {"placement": "body", "type": "js"},
};
for( let file of Object.keys(files)){
let fileObject = files[file];
let htmlTag;
if (fileObject["type"] === "css"){
htmlTag = document.createElement('link');
htmlTag.onerror = (e) => {console.log(`Could not load ${e.target.href}`);};
htmlTag.href = `${file}?v=${Date.now()}`;
htmlTag.rel = fileObject["rel"];
} else if (fileObject["type"] === "js"){
htmlTag = document.createElement('script');
htmlTag.onerror = (e) => {console.log(`Could not load ${e.target.src}`);};
htmlTag.src = `${file}?v=${Date.now()}`;
}
if (fileObject["placement"] === "body"){
document.body.appendChild(htmlTag)
} else if (fileObject["placement"] === "head"){
document.head.appendChild(htmlTag)
}
}
</script>
</body>
</html>