-
Notifications
You must be signed in to change notification settings - Fork 6
/
404.html
199 lines (167 loc) · 4.81 KB
/
404.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
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
---
permalink: /404/
title: Oops! 404 Page Not Found
---
<!DOCTYPE html>
<html ng-app="port">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>404 | Mukil Elango</title>
<meta name="description" content="{{ site.description }}">
<!--Resoure Hints-->
<!--Preload and Render the homepage in the background-->
<link rel='prerender' href="/" pr='0.9'>
<!-- Angular Material Dependencies-->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.min.css">
<!--Fonts - Roboto and Material Icons-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:400,500">
<!--Web App Manifest-->
<link rel="manifest" href="/manifest.json">
<!--Theme Color-->
<meta name="theme-color" content="#FAFAFA">
</head>
<body ng-controller="main" layout="column" id="ctrl">
<md-content id="main" style="height: 100%">
<main id='content'>
<div class="container">
<a href="/" class="md-headline" style="text-decoration: none; color: rgba(0,0,0,0.54)">Mukil Elango</a>
<span class="md-display-1 title">Oops! Page not found</span>
<md-card class="image md-whiteframe-z3" alt="Mars Curiosity Rover"></md-card>
<span class="md-subhead" style="opacity: 0.54; padding: 8px 0;">Still searching for life on Mars</span>
</div>
</main>
<style type="text/css">
body {
background: #FAFAFA;
}
md-toolbar {
display: none !important;
}
#main {
height: 100%;
}
#content {
height: 100%;
width: 100%;
overflow: hidden;
margin: 0;
}
.container {
width: ;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height:100%;
}
.image {
width: 30vw;
min-width: 360px;
min-height: 360px;
height: 30vw;
max-width: 450px;
max-height: 450px;
border-radius: 50%;
background: url(/assets/rover.jpg) 50%;
background-size: cover;
}
.title {
padding: 8px 0 32px 0;
color: rgba(0,0,0,0.54);
}
#canvas {
position: absolute;
top: 0;
z-index: -1;
}
</style>
<canvas id="canvas"></canvas>
<script type="text/javascript">
// Source code : https://codepen.io/LeonGr/pen/yginI
var canvas = document.getElementById("canvas"),
ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
var stars = [], // Array that contains the stars
FPS = 60, // Frames per second
x = 100, // Number of stars
mouse = {
x: 0,
y: 0
}; // mouse location
// Push stars to array
for (var i = 0; i < x; i++) {
stars.push({
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
radius: Math.random() * 1 + 1,
vx: Math.floor(Math.random() * 50) - 25,
vy: Math.floor(Math.random() * 50) - 25
});
}
// Draw the scene
function draw() {
ctx.clearRect(0,0,canvas.width,canvas.height);
ctx.globalCompositeOperation = "lighter";
for (var i = 0, x = stars.length; i < x; i++) {
var s = stars[i];
ctx.fillStyle = "#999";
ctx.beginPath();
ctx.arc(s.x, s.y, s.radius, 0, 2 * Math.PI);
ctx.fill();
ctx.fillStyle = 'white';
ctx.stroke();
}
ctx.beginPath();
for (var i = 0, x = stars.length; i < x; i++) {
var starI = stars[i];
ctx.moveTo(starI.x,starI.y);
if(distance(mouse, starI) < 150) ctx.lineTo(mouse.x, mouse.y);
for (var j = 0, x = stars.length; j < x; j++) {
var starII = stars[j];
if(distance(starI, starII) < 150) {
//ctx.globalAlpha = (1 / 150 * distance(starI, starII).toFixed(1));
ctx.lineTo(starII.x,starII.y);
}
}
}
ctx.lineWidth = 0.05;
ctx.strokeStyle = 'grey';
ctx.stroke();
}
function distance( point1, point2 ){
var xs = 0;
var ys = 0;
xs = point2.x - point1.x;
xs = xs * xs;
ys = point2.y - point1.y;
ys = ys * ys;
return Math.sqrt( xs + ys );
}
// Update star locations
function update() {
for (var i = 0, x = stars.length; i < x; i++) {
var s = stars[i];
s.x += s.vx / FPS;
s.y += s.vy / FPS;
if (s.x < 0 || s.x > canvas.width) s.vx = -s.vx;
if (s.y < 0 || s.y > canvas.height) s.vy = -s.vy;
}
}
canvas.addEventListener('mousemove', function(e){
mouse.x = e.clientX;
mouse.y = e.clientY;
});
// Update and draw
function tick() {
draw();
update();
requestAnimationFrame(tick);
}
tick();
</script>
</md-content>
</body>
</html>