-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (80 loc) · 2.83 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
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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-162153937-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-162153937-1');
</script>
<title>WEB1 - Welcome</title>
<link rel="stylesheet" href="./style.css">
<meta charset="utf-8">
<script src="./colors.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<input id="night_day" type="button" value="night" onclick="nightDayHandler(this)">
<h1>
<a href="#!welcome" onclick="fetchPage('welcome')">WEB</a>
</h1>
<div id="grid">
<ol id="nav">
</ol>
<div id="article">
<article>
</article>
<p>
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://web-basic.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</p>
</div>
</div>
<script type="text/javascript">
function fetchPage(name) {
fetch(name).then((response) => {
response.text().then((text) => {
document.querySelector('article').innerHTML = text;
});
});
}
if (location.hash) {
fetchPage(location.hash.substr(2));
} else {
fetchPage('welcome');
}
fetch('list').then((response) => {
response.text().then((text) => {
// <li><a href="#!html" onclick="fetchPage('html')">HTML</a></li>
text = text.trim();
var items = text.split(',');
var tags = '';
for (var i=0; i<items.length; i++) {
var tag = '<li><a href="#!' + items[i] + '" onclick="fetchPage(\'' + items[i] + '\')">' + items[i] + '</a></li>'
tags = tags + tag;
}
document.querySelector('#nav').innerHTML = tags;
});
});
</script>
</body>
</html>