forked from anuragverma108/SwapReads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profiletest.html
272 lines (226 loc) · 9.52 KB
/
profiletest.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="apple-touch-icon" sizes="180x180" href="./assets/favicon_package_v0.16/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/favicon_package_v0.16/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon_package_v0.16/favicon-16x16.png">
<link rel="manifest" href="./assets/favicon_package_v0.16/site.webmanifest">
<link rel="mask-icon" href="./assets/favicon_package_v0.16/safari-pinned-tab.svg" color="#5bbad5">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="stylesheet" href="testp.css"> <!-- Link to your CSS file -->
<script src="testp.js" defer></script>
<title>Profile Page</title>
<style>
/* Circle styles */
.circle {
height: 24px;
width: 24px;
border-radius: 50%;
background-color: black;
position: fixed;
top: 0;
left: 0;
pointer-events: none;
z-index: 99999999;
transition: transform 0.1s ease-out;
}
</style>
</head>
<body>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="profile-container">
<div class="content-section">
<h2>Your Profile</h2>
<a href="index.html">
<i class="fas fa-home"></i>
</a>
<div class="profile-card">
<div class="profile-header">
<img src="./assets/images/avatar2.jpg" alt="Profile Image" class="profile-image" id="selectedAvatar">
<div class="profile-info">
<h3 class="profile-name" id="profileNameDisplay">John Doe</h3>
<p class="profile-bio" id="profileBioDisplay">A book Worm 😉</p>
<p class="profile-email"><i class="fas fa-envelope" id="profileEmailDisplay"></i></p>
<p class="profile-phone" id="profilePhoneDisplay"><i class="fas fa-phone"></i> +123 456 7890</p>
<p id="last-active"></p>
</div>
</div>
<a href="./assets/html/profileedit.html">
<button class="edit-profile-btn edit_profiled">Edit Profile</button>
</a>
</div>
</div>
<div class="content-section">
<h2>Account Details</h2>
<div class="profile-details">
<div class="profile-detail-card" id="profileCard">
<h3>Address</h3>
<p id="addressText" contenteditable="false">123 Main St, New York, NY</p>
<a href="#"><button class="edit-profile-btn">Edit</button></a>
</div>
<div class="profile-detail-card">
<h3>Payment Methods</h3>
<p>**** **** **** 1234</p>
<a href="/payment.html">
<button class="edit-profile-btn">Edit</button></a>
</div>
<div class="profile-detail-card">
<h3>Wishlist</h3>
<p>Item 1, Item 2</p>
<a href="#">
<button class="edit-profile-btn">View</button></a>
</div>
<div class="profile-detail-card">
<h3>Recent Activity</h3>
<p>Order #1234, Order #5678</p>
<a href="#">
<button class="edit-profile-btn">View</button></a>
</div>
</div>
</div>
<section class="content-section">
<h2>Notifications</h2>
<div class="card">
<p>You have a new message from support.</p>
<button class="edit-profile-btn">View Notification</button>
</div>
<div class="card">
<p>Your order #1234 has been shipped.</p>
<button class="edit-profile-btn">View Notification</button>
</div>
</section>
<footer class="footer">
<div class="footer-links">
<a href="/privacynotice.html">Privacy Policy</a>
<a href="/terms&cond.html">Terms of Service</a>
</div>
<div class="footer-socials">
<a href="facebook.com" class="social-icon"><i class="fab fa-facebook-f"></i></a>
<a href="twitter.com" class="social-icon"><i class="fab fa-twitter"></i></a>
<a href="linkedin.com" class="social-icon"><i class="fab fa-linkedin-in"></i></a>
</div>
<p>© 2023 Swap Reads. All rights reserved.</p>
</footer>
</div>
<script>
// Coordinates for the cursor
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
// Colors for the circles
const colors = [
"#ffb56b", "#fdaf69", "#f89d63", "#f59761", "#ef865e", "#ec805d",
"#e36e5c", "#df685c", "#d5585c", "#d1525c", "#c5415d", "#c03b5d",
"#b22c5e", "#ac265e", "#9c155f", "#950f5f", "#830060", "#7c0060",
"#680060", "#60005f", "#48005f", "#3d005e"
];
// Assign colors and initial position to each circle
circles.forEach(function (circle, index) {
circle.x = 0;
circle.y = 0;
circle.style.backgroundColor = colors[index % colors.length];
});
// Update the coordinates when the mouse moves
window.addEventListener("mousemove", function (e) {
coords.x = e.clientX;
coords.y = e.clientY;
});
// Animation function to move the circles
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach(function (circle, index) {
// Update the position and scale of each circle
circle.style.left = x - 12 + "px";
circle.style.top = y - 12 + "px";
circle.style.scale = (circles.length - index) / circles.length;
circle.x = x;
circle.y = y;
// Get the next circle in the sequence
const nextCircle = circles[index + 1] || circles[0];
x += (nextCircle.x - x) * 0.15;
y += (nextCircle.y - y) * 0.15;
});
// Repeat the animation
requestAnimationFrame(animateCircles);
}
// Start the animation
animateCircles();
// Get the saved profile data and display it on the page
document.addEventListener("DOMContentLoaded", () => {
const savedName = localStorage.getItem("profileName");
const savedPhone = localStorage.getItem("profilePhone");
const savedEmail = localStorage.getItem("profileEmail");
const savedAvatar = localStorage.getItem("selectedAvatar");
const savedBio = localStorage.getItem("profileBio");
if (savedName) {
document.getElementById("profileNameDisplay").textContent = `${savedName}`;
} else {
document.getElementById("profileNameDisplay").textContent = "Welcome, Guest!";
}
if (savedPhone) {
document.getElementById("profilePhoneDisplay").textContent = `Phone: ${savedPhone}`;
} else {
document.getElementById("profilePhoneDisplay").textContent = "Phone: Not provided";
}
if (savedEmail) {
document.getElementById("profileEmailDisplay").textContent = ` ${savedEmail}`;
} else {
document.getElementById("profileEmailDisplay").textContent = "Email: Not provided";
}
if (savedAvatar) {
document.getElementById("selectedAvatar").src = `./assets/images/${savedAvatar}`;
} else {
document.getElementById("selectedAvatar").src = "/assets/images/avatar1.jpg";
}
if (savedBio) {
document.getElementById("profileBioDisplay").textContent = `${savedBio}`;
} else {
document.getElementById("profileBioDisplay").textContent = "Bio: Not provided";
}
});
</script>
</body>
</html>