-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.html
More file actions
275 lines (246 loc) · 8.06 KB
/
profile.html
File metadata and controls
275 lines (246 loc) · 8.06 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Profile Card">
<meta property="og:description" content="View my profile card made with profile-maker.pages.dev!">
<meta property="og:image" content="https://i.ibb.co/1RfL4pB/guest.png">
<title>USERNAME - Profile</title>
<link rel="icon" href="PROFILE_ICON" type="image/png">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#particles-js {
width: 100%;
height: 100%;
background-position: 50% 50%;
position: fixed;
top: 0px;
z-index: -1;
}
body {
background-color: black;
font-family: 'Poppins', sans-serif;
overflow: hidden;
color: #0D0D0D;
}
canvas {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: -1;
pointer-events: none;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
backdrop-filter: blur(3px);
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: 600;
z-index: 10;
cursor: pointer;
transition: opacity 0.5s ease;
color: white;
}
.overlay.fade-out {
opacity: 0;
pointer-events: none;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.8);
background: rgba(34, 34, 34, 0.5);
border-radius: 20px;
padding: 30px;
text-align: center;
box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.4);
width: 80%;
max-width: 400px;
z-index: 1;
opacity: 0;
transition: transform 0.5s ease, opacity 0.5s ease;
}
.container.show {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
}
.container img {
width: 120px;
border-radius: 50%;
margin-bottom: 20px;
border: 5px solid #fff;
padding: 3px;
transition: transform 0.2s ease-in-out;
}
.container img:hover {
transform: scale(1.05);
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.container img.spin {
animation: spin 1s ease-out forwards;
}
.container h1 {
font-size: 32px;
margin: 15px 0;
font-weight: 600;
color: #bbb;
}
.bio {
margin: 10px 0;
font-size: 18px;
line-height: 1.6;
color: #bbb;
}
.divider {
margin: 20px 0;
border-bottom: 2px solid #444;
}
.icons a {
margin: 0 15px;
font-size: 24px;
color: #ddd;
text-decoration: none;
transition: color 0.3s ease, text-shadow 0.3s ease;
text-shadow: 0 0 15px rgba(255, 255, 255, 0.35);
}
.icons a:hover {
color: #fff;
text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}
.icons a:active {
color: #fff;
text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}
@media (max-width: 600px) {
.container {
width: 90%;
padding: 20px;
}
.icons a {
font-size: 20px;
}
}
</style>
</head>
<body>
<div class="overlay" id="enter" onclick="enterSite()">click to enter...</div>
<div class="container" id="profileContainer">
<img id="profilePicture" src="" alt="Profile" onerror="this.onerror=null; this.src='https://via.placeholder.com/120';">
<h1 id="username">Username</h1>
<div class="bio" id="bio">About Me</div>
</div>
<audio id="audio" loop>
<source id="audioSource" src="" type="audio/mp3">
</audio>
<script>
const urlParams = new URLSearchParams(window.location.search);
const username = urlParams.get('username') || 'DefaultUsername';
const bio = urlParams.get('bio') || 'This is a default bio.';
const profileImage = urlParams.get('profileImage') || 'https://via.placeholder.com/120';
const audioSrc = urlParams.get('music') || '';
const background = urlParams.get('background') || '';
const cardBackground = urlParams.get('cardBackground') || '#1f1e1e';
document.title = `@${username}`;
document.querySelector('meta[property="og:title"]').content = username;
document.querySelector('meta[property="og:description"]').content = `About Me: ${bio}`;
document.querySelector('meta[property="og:image"]').content = profileImage;
document.querySelector('link[rel="icon"]').href = profileImage;
document.getElementById('username').textContent = username;
document.getElementById('bio').textContent = bio;
document.getElementById('profilePicture').src = profileImage;
document.body.style.backgroundImage = `url('${background}')`;
document.querySelector('.container').style.backgroundColor = cardBackground;
async function fetchAudio() {
if (audioSrc) {
try {
const response = await fetch(audioSrc);
if (!response.ok) throw new Error('Network response was not ok');
const blob = await response.blob();
const objectUrl = URL.createObjectURL(blob);
document.getElementById('audioSource').src = objectUrl;
const audio = document.getElementById('audio');
audio.load();
} catch (error) {
console.error('Fetch error:', error);
}
}
}
function enterSite() {
document.querySelector('.overlay').classList.add('fade-out');
document.getElementById('profileContainer').classList.add('show');
const audio = document.getElementById('audio');
audio.play().catch(error => console.log('Audio play failed:', error));
}
const profilePicture = document.getElementById('profilePicture');
const audio = document.getElementById('audio');
const audioContext = new(window.AudioContext || window.webkitAudioContext)();
const analyser = audioContext.createAnalyser();
const source = audioContext.createMediaElementSource(audio);
source.connect(analyser);
analyser.connect(audioContext.destination);
analyser.fftSize = 256;
const bufferLength = analyser.frequencyBinCount;
const dataArray = new Uint8Array(bufferLength);
function updateImageBorder() {
analyser.getByteFrequencyData(dataArray);
let averageFrequency = 0;
for (let i = 0; i < bufferLength; i++) {
averageFrequency += dataArray[i];
}
averageFrequency /= bufferLength;
let borderSize = 1 + (averageFrequency / 255) * 13;
borderSize = Math.min(Math.max(borderSize, 3), 8);
profilePicture.style.border = `${borderSize}px solid #fff`;
requestAnimationFrame(updateImageBorder);
}
audio.onplay = function() {
audioContext.resume().then(() => {
updateImageBorder();
});
};
let title = `@${username}`;
let step = 1;
let direction = 1;
function updateTitle() {
document.title = title.substring(0, step);
if (direction === 1 && step < title.length) {
step++;
} else if (direction === -1 && step > 1) {
step--;
}
if (step === title.length) {
direction = -1;
} else if (step === 1) {
direction = 1;
}
setTimeout(updateTitle, 400);
}
updateTitle();
fetchAudio();
</script>
</body>
</html>