-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
208 lines (192 loc) · 9.97 KB
/
index.html
File metadata and controls
208 lines (192 loc) · 9.97 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
<!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 name="theme-color" content="#000000">
<meta name="description" content="ndaggers stylish custom page.">
<meta name="keywords" content="ndagger, ndigger, portfolio, modern, style, space, стиль, космос, портфолио, own">
<link rel="author" href="https://ndigger.github.io/" />
<link rel="canonical" href="https://ndigger.github.io/" />
<meta property="og:url" content="https://ndigger.github.io/">
<meta property="og:description" content="ndaggers stylish custom page.">
<meta property="og:title" content="my dream place">
<meta property="og:site_name" content="my dream place">
<meta itemprop="name" content="my dream place">
<meta itemprop="description" content="ndaggers stylish custom page.">
<meta itemprop="image" content="https://ndigger.github.io/meta.png?v=3">
<meta property="og:image" content="https://ndigger.github.io/meta.png?v=3">
<meta name="twitter:image" content="https://ndigger.github.io/meta.png?v=3">
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="https://ndigger.github.io/">
<meta name="twitter:title" content="my dream place">
<meta name="twitter:description" content="ndaggers stylish custom page.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
<link rel="icon" id="page-icon" href="icon.svg" type="image/svg+xml">
<link rel="stylesheet" href="styles.css">
<title>my dream place</title>
</head>
<body>
<div id="override"></div>
<div id="cursor-glow"></div>
<canvas id="glcanvas" width="1600" height="1080"></canvas>
<script id="vs" type="x-shader/x-vertex">
attribute vec2 a_position;
varying vec2 v_uv;
void main() {
v_uv = (a_position + 1.0) * 0.5;
gl_Position = vec4(a_position, 0.0, 1.0);
}
</script>
<script id="fs" type="x-shader/x-fragment">
precision highp float;
varying vec2 v_uv;
uniform float u_time;
#define PI 3.14159265
const float starLayers = 6.;
uniform vec2 u_resolution;
uniform vec3 u_backgroundColor;
uniform vec3 u_wavesColor;
uniform vec3 u_secondaryWavesColor;
uniform vec2 u_offset;
uniform vec2 u_scrollOffset;
uniform float u_zoom;
uniform float u_seed;
const float t = 0.25;
float random (in vec2 st) {
return fract(sin(dot(st.xy,
vec2(12.9898,78.233)))*
43758.5453123);
}
float sin1(in float v) {
return sin(v) * .5 + .5;
}
float drawStars(in vec2 st, in vec2 ast, in float layer) {
float time = u_time * t * .5;
float speed = layer/2.;
float scale = 5. * ((u_scrollOffset.y/30.)+1.);
vec2 fst = fract(ast * scale * speed + vec2(0, random(vec2(speed)) * 10.) + u_offset + u_scrollOffset);
vec2 ist = floor(ast * scale * speed + vec2(0, random(vec2(speed)) * 10.) + u_offset + u_scrollOffset);
float rnd = random(ist + layer + u_seed);
if (rnd * 1. > .6) {
return 0.;
} else {
float size = 30. * (rnd + .4) * (1. - sin1(time * (rnd * 10. + 5.) + rnd) * .2);
vec2 pos = vec2(.5) + vec2(random(ist.xy + layer), random(ist)) * .3 + vec2(sin(time * rnd * 5.), cos(time * rnd * 10.)) * .1;
float circle = 1.-smoothstep(distance(fst, pos) * size, .0, .15);
float yOpacity = (st.y * 2. + 0.9);
float star = circle * yOpacity / starLayers / float(layer * .5);
float disap = clamp(sin1(time * 2. + rnd * 100.) * 20. - 10., 0., 1.);
return clamp(star * disap, 0., .3);
}
}
vec2 getCenterSquareResolution(in vec2 uv) {
vec2 st = uv / u_resolution;
st = (st - 0.5) * 2.0;
float aspect = u_resolution.x / u_resolution.y;
if (aspect > 1.0) { st.x *= aspect; }
else { st.y /= aspect; }
return st * 0.5 + 0.5;
}
float easeOut(float t) {
float v = clamp(t, 0., 1.);
return 1.0 - pow((1.0 - v), 3.);
}
const float startDistance = 1.2;
void main() {
vec2 st = getCenterSquareResolution(v_uv * u_resolution);
st -= .5;
vec2 ast = st;
st += u_scrollOffset;
st *= u_zoom;
st.x += u_seed * 500.;
vec3 color = vec3(u_backgroundColor);
float time = u_time * .2;
st.y += startDistance;
st.y -= easeOut(pow(u_time, .5) / 5.) * startDistance;
ast.y += startDistance;
ast.y -= easeOut(pow(u_time, .5) / 5.) * startDistance;
st += u_offset;
for (int i = 1; i < int(starLayers); i++) {
color += vec3(drawStars(st, (ast + vec2(0., 1.)) * u_zoom, float(i)));
}
st.y += .5;
st.x *= 1.2;
float ist = floor(st.x);
float fst = fract(st.x);
float ground = mix(random(vec2(ist)) * 3., random(vec2(ist + 1.)) * 3., smoothstep(0., 1., fst)) * .08;
if (st.y < ground + .1 || (st.y < ground + .115 && st.y > ground + .11 )) {
color = mix(u_wavesColor, u_secondaryWavesColor, clamp(st.y * 2.3 + abs(u_scrollOffset.y) * 1.5 / u_zoom, 0., 1.));
}
st.y -= .5;
ast *= clamp(u_zoom, 1., 2.);
float distanceNightCircle = clamp(1.35-length(ast) * 0.9, 0., 1.) + u_backgroundColor.r;
distanceNightCircle -= random(ast) * .03;
color = clamp(color, vec3(0.), vec3(1.));
color *= clamp(distanceNightCircle, 0., 1.);
color = mix(color, vec3(u_backgroundColor), clamp(st.y/50., 0., 1.));
//color = mix(vec3(1.), color, .95 + length(ast + vec2(0., -1.5)) * .05);
gl_FragColor = vec4(color,1.0);
}
</script>
<main id="centered">
<section id="main-window">
<button id="music-illustration-btn">
<img src="./images/musicIllustrationInactiveSleep.png" alt="illustration for window">
</button>
<div class="window-panel">
<p class="title"><span title="lovely">my dream place</span></p>
</div>
<div class="content">
<h1 id="title">hi, i'm <span id="title-author" translate="no">NDagger</span></h1>
<div class="buttons">
<button id="about-me-btn" title="About me" class="hover-sound gold-btn">
<i class="bi bi-info-square"></i>
<p>About me</p>
</button>
<button id="skills-btn" title="Skills" class="hover-sound gold-btn">
<i class="bi bi-box-seam"></i>
<p>Skills</p>
</button>
<button id="links-btn" title="Links" class="hover-sound gold-btn">
<div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
</svg>
<svg class="shadow" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<defs>
<filter id="text-shadow" x="-200%" y="-200%" width="400%" height="400%"> <feDropShadow dx="0" dy="0" stdDeviation="20" flood-color="var(--main-window-button-hover-text-shadow-color)"/> </filter>
</defs>
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
</svg>
</div>
<p>Links</p>
</button>
<button id="status-btn" title="Statuses" class="hover-sound gold-btn">
<i class="bi bi-clock-fill"></i>
<p>Statuses</p>
</button>
</div>
</div>
</section>
</main>
<button id="night-mode-btn" class="ui-btn hover-sound"><i class="bi bi-moon-fill"></i></button>
<div class="top-right">
<button id="music-btn" class="ui-btn"><i class="bi bi-music-note-beamed hover-sound"></i></button>
<button id="sound-btn" class="ui-btn hover-sound"><i class="bi bi-music-note"></i></button>
</div>
<script src="globals.js"></script>
<script src="script.js" type="module"></script>
<script src="canvas.js"></script>
<!-- <div id="sfcz8rbyqtq3t95xmchbg1gquxdf9t3dbee"></div>
<script id="counter-script" type="text/javascript" src="https://counter1.optistats.ovh/private/counter.js?c=z8rbyqtq3t95xmchbg1gquxdf9t3dbee&down=async" async></script>
<script>
window.addEventListener('load', () => {
body.removeChild(document.getElementById("sfcz8rbyqtq3t95xmchbg1gquxdf9t3dbee"))
})
</script> -->
</body>
</html>