-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlegacy.html
More file actions
220 lines (174 loc) · 6.18 KB
/
legacy.html
File metadata and controls
220 lines (174 loc) · 6.18 KB
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta property="og:type" content="summary">
<meta property="og:site_name" content="MattTheTekie presents">
<meta property="og:title" content="The Veltron Network">
<meta property="og:description" content="The Veltron Network is a worldwide technology community.">
<meta property="og:image" content="images/favicon/banner.png">
<meta property="og:image:alt" content="Veltron Network">
<meta property="og:url" content="http://www.veltron.net/">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta property="author" content="MattTheTekie + Veltron">
<title>Home - Veltron Network</title>
<link rel="stylesheet" href="css/legacy.css">
<link rel="icon" type="image/png" href="images/favicon/banner.png">
<link rel="apple-touch-icon" sizes="180x180" href="images/favicon/banner.png">
<meta name="apple-mobile-web-app-title" content="VELTRON">
<link rel="canonical" href="index.html">
</head>
<body class="console-3ds">
<div id="console">
<!-- TOP SCREEN -->
<div class="screen top-screen">
<div id="header">
<h1>
<img src="http://www.veltron.net/images/site-banner.png" width="100%" height="100%">
</h1>
</div>
</div>
<!-- HINGE -->
<div class="hinge"></div>
<!-- BOTTOM SCREEN -->
<div class="screen bottom-screen">
<!-- NAV -->
<div class="nav-categories">
<span>Veltron Legacy Portal</span>
<div class="nav-grid">
<a href="#" onclick="showHome(event)">Home</a>
<a href="#" onclick="showMembers(event)">Members</a>
<a href="#" onclick="showAbout(event)">About</a>
<a href="#" onclick="showCode(event)">Easter Egg</a>
</div>
</div>
<!-- CONTENT -->
<div id="content" class="text-containers-main-bg content-box">
<img
src="images/digimon_thkh.1200-2533722281.jpg"
alt="Welcome image"
height="80%"
width="100%"
/>
<center>
<p>
<img
src="images/gifs/kirby19.gif"
class="home-img-1"
align="left"
alt="Kirby holding Hi!! sign"
/>
</p>
<p>
Welcome to the Veltron Network!<br>
Our corner of the internet is a unique and inclusive space to explore technology and much more.
We are pioneers in the world of FOSS.<br><br>Notice: The legacy browser service is based on the Nintendo DSi browser format. <br> Come and check us out on PC!
</p>
</center>
</div>
<!-- COUNTER -->
<center>
<span>You are visitor number:</span>
<span id="visitorCounter"></span>
</center>
</div>
</div>
<script src="javascript/view-counter-legacy.js"></script>
<!-- PAGE SYSTEM -->
<script>
/* -------------------------
SAFE HELPER (no querySelector)
-------------------------- */
function getElementByIdSafe(root, id) {
var all = root.getElementsByTagName("*");
for (var i = 0; i < all.length; i++) {
if (all[i].id === id) return all[i];
}
return null;
}
/* -------------------------
HOME
-------------------------- */
function showHome(event) {
if (event) event.preventDefault();
document.getElementById("content").innerHTML =
'<img src="images/digimon_thkh.1200-2533722281.jpg" width="100%" height="80%">' +
'<center>' +
'<p><img src="images/gifs/kirby19.gif" class="home-img-1" align="left" alt="Kirby"></p>' +
'<p>' +
'Welcome to the Veltron Network!<br>' +
'Our corner of the internet is a unique and inclusive space to explore technology and much more.<br>' +
'We are pioneers in the world of FOSS.' +
'</p>' +
'</center>';
}
/* -------------------------
MEMBERS (XHR SAFE)
-------------------------- */
function showMembers(event) {
if (event) event.preventDefault();
var target = document.getElementById("content");
target.innerHTML = "<center><h2>Loading Members...</h2></center>";
var xhr = new XMLHttpRequest();
xhr.open("GET", "members.html", true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var temp = document.createElement("div");
temp.innerHTML = xhr.responseText;
var section = getElementByIdSafe(temp, "homeSection");
if (!section) {
target.innerHTML = "<h2>Members</h2><p>Missing section</p>";
return;
}
target.innerHTML = section.innerHTML;
} else {
target.innerHTML = "<h2>Members</h2><p>Error loading page</p>";
}
}
};
xhr.send(null);
}
/* -------------------------
ABOUT (XHR SAFE)
-------------------------- */
function showAbout(event) {
if (event) event.preventDefault();
var target = document.getElementById("content");
target.innerHTML = "<center><h2>Loading About...</h2></center>";
var xhr = new XMLHttpRequest();
xhr.open("GET", "about.html", true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var temp = document.createElement("div");
temp.innerHTML = xhr.responseText;
var section = getElementByIdSafe(temp, "aboutSection");
if (!section) {
target.innerHTML = "<h2>About</h2><p>Missing section</p>";
return;
}
/* SAFE: no image filtering, just render */
target.innerHTML = section.innerHTML;
} else {
target.innerHTML = "<h2>About</h2><p>Error loading page</p>";
}
}
};
xhr.send(null);
}
/* -------------------------
EASTER EGG
-------------------------- */
function showCode(event) {
if (event) event.preventDefault();
document.getElementById("content").innerHTML =
'<div class="text-containers-main-bg content-box">' +
'<center><h2>Easter Egg</h2></center>' +
'<center><a href="http://cdn.veltron.net/rickroll.gif">click me</a></center>' +
'<center><a href="http://cdn.veltron.net/rickroll3ds.mp4">click me (new 3ds users only)</a></center>' +
'</div>';
}
</script>
</body>
</html>