-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
251 lines (211 loc) · 8.85 KB
/
index.html
File metadata and controls
251 lines (211 loc) · 8.85 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="height=device-height, initial-scale=1, user-scalable=no">
<link rel="StyleSheet" href="style/main.css">
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
<script src="js/clock.js"></script>
<script src="js/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.7/dat.gui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.7.1/gsap.min.js"></script>
<script id="js-vertex-shader" type="x-shader/x-vertex">
attribute vec3 position; void main() { gl_Position = vec4(position, 1.0); }
</script>
<!-- fragmentShader -->
<script id="js-fragment-shader" type="x-shader/x-fragment">
precision highp float; uniform vec2 resolution; uniform float time; uniform float xScale; uniform float yScale; uniform float distortion; void main() { vec2 p = (gl_FragCoord.xy * 2.0 - resolution) / min(resolution.x, resolution.y); float d = length(p)
* distortion; float rx = p.x * (1.0 + d); float gx = p.x; float bx = p.x * (1.0 - d); float r = 0.05 / abs(p.y + sin((rx + time) * xScale) * yScale); float g = 0.05 / abs(p.y + sin((gx + time) * xScale) * yScale); float b = 0.05 / abs(p.y + sin((bx
+ time) * xScale) * yScale); gl_FragColor = vec4(r, g, b, 1.0); }
</script>
<link href="https://fonts.googleapis.com/css?family=Poppins:400,600,700&display=swap" rel="stylesheet">
</head>
<body>
<div class="background">
<canvas id="canvas" width="500" height="500"></canvas>
<iframe src="https://calendar.google.com/calendar/embed?height=90&wkst=1&bgcolor=%23ffffff&ctz=UTC&title=Genislab%20Technologies&src=dXNlcjQwMjgyMDBAZ21haWwuY29t&src=ZW4ucGsjaG9saWRheUBncm91cC52LmNhbGVuZGFyLmdvb2dsZS5jb20&color=%23039BE5&color=%230B8043" style="border:solid 1px #777" width="800" height="600" frameborder="0" scrolling="no"></iframe>
</div>
<span id="measureWidth"></span>
<div class="intro-box">
<h1 class="title"></h1>
<h2 class="oneliner"></h2>
<h2 class="title"></h2>
</div>
<legend>
<ul></ul>
</legend>
<div class="chart">
<div class="skills"></div>
</div>
<div class="skillbars-container">
<div class="skillbars"></div>
</div>
<div class="social-icons"></div>
<div id="scroll-left">‹</div>
<div id="scroll-right">›</div>
<script src="js/render.js"></script>
<script>
new Renderer('mfarhan.json');
</script>
<style>
.libutton {
display: flex;
flex-direction: column;
justify-content: center;
padding: 7px;
text-align: center;
outline: none;
text-decoration: none !important;
color: blue !important;
width: 200px;
height: 32px;
border-radius: 16px;
background-color: #0A66C2;
font-family: "SF Pro Text", Helvetica, sans-serif;
}
</style>
<script>
/* clock */
const hours = document.querySelector('.hours');
const minutes = document.querySelector('.minutes');
const seconds = document.querySelector('.seconds');
/* play button */
const play = document.querySelector('.play');
const pause = document.querySelector('.pause');
const playBtn = document.querySelector('.circle__btn');
const wave1 = document.querySelector('.circle__back-1');
const wave2 = document.querySelector('.circle__back-2');
/* rate slider */
const container = document.querySelector('.slider__box');
const btn = document.querySelector('.slider__btn');
const color = document.querySelector('.slider__color');
const tooltip = document.querySelector('.slider__tooltip');
clock = () => {
let today = new Date();
let h = (today.getHours() % 12) + today.getMinutes() / 59; // 22 % 12 = 10pm
let m = today.getMinutes(); // 0 - 59
let s = today.getSeconds(); // 0 - 59
h *= 30; // 12 * 30 = 360deg
m *= 6;
s *= 6; // 60 * 6 = 360deg
rotation(hours, h);
rotation(minutes, m);
rotation(seconds, s);
// call every second
setTimeout(clock, 500);
}
rotation = (target, val) => {
target.style.transform = `rotate(${val}deg)`;
}
window.onload = clock();
dragElement = (target, btn) => {
target.addEventListener('mousedown', (e) => {
onMouseMove(e);
window.addEventListener('mousemove', onMouseMove);
window.addEventListener('mouseup', onMouseUp);
});
onMouseMove = (e) => {
e.preventDefault();
let targetRect = target.getBoundingClientRect();
let x = e.pageX - targetRect.left + 10;
if (x > targetRect.width) {
x = targetRect.width
};
if (x < 0) {
x = 0
};
btn.x = x - 10;
btn.style.left = btn.x + 'px';
// get the position of the button inside the container (%)
let percentPosition = (btn.x + 10) / targetRect.width * 100;
// color width = position of button (%)
color.style.width = percentPosition + "%";
// move the tooltip when button moves, and show the tooltip
tooltip.style.left = btn.x - 5 + 'px';
tooltip.style.opacity = 1;
// show the percentage in the tooltip
tooltip.textContent = Math.round(percentPosition) + '%';
};
onMouseUp = (e) => {
window.removeEventListener('mousemove', onMouseMove);
tooltip.style.opacity = 0;
btn.addEventListener('mouseover', function() {
tooltip.style.opacity = 1;
});
btn.addEventListener('mouseout', function() {
tooltip.style.opacity = 0;
});
};
};
dragElement(container, btn);
/* play button */
playBtn.addEventListener('click', function(e) {
e.preventDefault();
pause.classList.toggle('visibility');
play.classList.toggle('visibility');
playBtn.classList.toggle('shadow');
wave1.classList.toggle('paused');
wave2.classList.toggle('paused');
});
</script>
<script>
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.strokeStyle = '#00ffff';
ctx.lineWidth = 17;
ctx.shadowBlur = 15;
ctx.shadowColor = '#00ffff'
function degToRad(degree) {
var factor = Math.PI / 180;
return degree * factor;
}
function renderTime() {
var now = new Date();
var today = now.toDateString();
var time = now.toLocaleTimeString();
var hrs = now.getHours();
var min = now.getMinutes();
var sec = now.getSeconds();
var mil = now.getMilliseconds();
var smoothsec = sec + (mil / 1000);
var smoothmin = min + (smoothsec / 60);
//Background
gradient = ctx.createRadialGradient(250, 250, 5, 250, 250, 300);
gradient.addColorStop(0, "#03303a");
gradient.addColorStop(1, "black");
ctx.fillStyle = gradient;
//ctx.fillStyle = 'rgba(00 ,00 , 00, 1)';
ctx.fillRect(0, 0, 500, 500);
//Hours
ctx.beginPath();
ctx.arc(250, 250, 200, degToRad(270), degToRad((hrs * 30) - 90));
ctx.stroke();
//Minutes
ctx.beginPath();
ctx.arc(250, 250, 170, degToRad(270), degToRad((smoothmin * 6) - 90));
ctx.stroke();
//Seconds
ctx.beginPath();
ctx.arc(250, 250, 140, degToRad(270), degToRad((smoothsec * 6) - 90));
ctx.stroke();
//Date
ctx.font = "25px Helvetica";
ctx.fillStyle = 'rgba(00, 255, 255, 1)'
ctx.fillText(today, 175, 250);
//Time
ctx.font = "25px Helvetica Bold";
ctx.fillStyle = 'rgba(00, 255, 255, 1)';
ctx.fillText(time + ":" + mil, 175, 280);
}
setInterval(renderTime, 40);
</script>
<script>
let gradients = document.querySelectorAll(".gradient");
for (let [i, gradient] of gradients.entries()) {
gradient.innerHTML = i + 1;
gradient.classList.add(`g${i + 1}`);
}
</script>
</body>
</html>