-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsocial.html
More file actions
541 lines (474 loc) · 17.7 KB
/
Copy pathsocial.html
File metadata and controls
541 lines (474 loc) · 17.7 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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
<!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=no">
<title>BodyPro | The Wire</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
<style>
html, body {
overflow-x: hidden;
width: 100%;
position: relative;
}
.main-content {
padding-bottom: 100px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
/* Social Tabs Styling */
.social-tabs {
display: flex;
border-bottom: 1px solid var(--border-color);
margin-bottom: 20px;
background: var(--bg-surface);
border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
overflow: hidden;
}
.social-tab {
flex: 1;
text-align: center;
padding: 15px 10px;
background: none;
border: none;
color: var(--text-muted);
font-weight: bold;
cursor: pointer;
border-bottom: 3px solid transparent;
transition: all 0.2s;
font-size: 0.9rem;
}
.social-tab.active {
color: var(--accent);
border-bottom-color: var(--accent);
background: var(--bg-surface-elevated);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: translateY(0); }
}
/* Modern Feed Layout */
.stream-layout {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 20px;
}
@media (max-width: 850px) {
.stream-layout {
grid-template-columns: 1fr;
}
.stream-sidebar {
order: -1; /* Puts news/tips at the top on mobile */
}
}
/* Create Post UI */
.create-post-card {
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--border-radius-md);
padding: 15px;
margin-bottom: 20px;
}
.create-post-card textarea {
width: 100%;
background: var(--bg-base);
border: 1px solid var(--border-color);
border-radius: var(--border-radius-sm);
padding: 12px;
color: var(--text-main);
font-family: inherit;
resize: vertical;
min-height: 80px;
margin-bottom: 10px;
}
.create-post-card textarea:focus {
outline: none;
border-color: var(--primary);
}
/* Feed Events */
.feed-event {
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--border-radius-md);
margin-bottom: 20px;
overflow: hidden;
}
.feed-event-header {
display: flex;
align-items: center;
gap: 12px;
padding: 15px;
border-bottom: 1px solid var(--border-color);
background: var(--bg-surface-elevated);
}
.feed-event-header .time-ago {
margin-left: auto;
font-size: 0.75rem;
color: var(--text-muted);
font-weight: 600;
}
.feed-event-body {
padding: 20px 15px;
}
.feed-event-title {
font-size: 1.1rem;
font-weight: 800;
margin: 0 0 10px 0;
color: var(--text-main);
}
.feed-event-metrics {
display: flex;
gap: 10px;
margin-bottom: 15px;
flex-wrap: wrap;
}
.metric-pill {
background: var(--bg-base);
border: 1px solid var(--border-color);
padding: 6px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 700;
display: flex;
align-items: center;
gap: 6px;
}
.feed-event-details {
font-size: 0.85rem;
color: var(--text-muted);
background: var(--bg-base);
padding: 10px;
border-radius: var(--border-radius-sm);
border-left: 3px solid var(--primary);
margin-bottom: 15px;
}
/* Social Action Bar */
.feed-action-bar {
display: flex;
padding: 10px 15px;
border-top: 1px solid var(--border-color);
background: var(--bg-surface-elevated);
gap: 15px;
}
.feed-btn {
background: var(--bg-base);
border: 1px solid var(--border-color);
border-radius: 20px;
color: var(--text-muted);
font-weight: 600;
font-size: 0.85rem;
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
transition: all 0.2s;
padding: 6px 12px;
}
.feed-btn:hover {
background: var(--bg-surface);
color: var(--text-main);
border-color: var(--text-main);
}
.feed-btn.active-like { color: var(--info, #3b82f6); border-color: var(--info, #3b82f6); }
.feed-btn.active-fire { color: var(--danger); border-color: var(--danger); }
.feed-btn.active-flex { color: var(--accent); border-color: var(--accent); }
/* Head to Head Card */
.h2h-card {
background: linear-gradient(145deg, var(--bg-surface), var(--bg-base));
border: 1px solid var(--border-color);
border-radius: var(--border-radius-md);
padding: 20px;
margin-bottom: 25px;
box-shadow: 0 8px 20px rgba(0,0,0,0.2);
position: relative;
}
.pin-btn {
position: absolute;
top: 15px;
right: 15px;
background: none;
border: none;
color: var(--text-muted);
font-size: 1.2rem;
cursor: pointer;
transition: color 0.2s;
}
.pin-btn.pinned { color: var(--accent); }
.h2h-header {
text-align: center;
margin-bottom: 20px;
font-size: 1.1rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-main);
}
.compare-row {
display: grid;
grid-template-columns: 1fr 2fr 1fr;
gap: 15px;
align-items: center;
margin-bottom: 15px;
font-size: 0.95rem;
}
.compare-bar-container {
width: 100%;
height: 10px;
background: var(--bg-base);
border-radius: 5px;
display: flex;
overflow: hidden;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}
.compare-bar-self { background: var(--accent); height: 100%; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.compare-bar-friend { background: var(--primary); height: 100%; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
/* API Widgets */
.widget-card {
background: var(--bg-surface);
border: 1px solid var(--border-color);
border-radius: var(--border-radius-md);
padding: 15px;
margin-bottom: 20px;
}
.widget-header {
font-size: 0.9rem;
font-weight: 800;
text-transform: uppercase;
color: var(--text-muted);
border-bottom: 1px solid var(--border-color);
padding-bottom: 10px;
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}
.news-item {
display: flex;
flex-direction: column;
gap: 5px;
margin-bottom: 15px;
border-bottom: 1px dashed var(--border-color);
padding-bottom: 15px;
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.news-title {
font-size: 0.9rem;
font-weight: 700;
color: var(--text-main);
text-decoration: none;
}
.news-title:hover { color: var(--primary); text-decoration: underline; }
.news-source { font-size: 0.75rem; color: var(--accent); font-weight: bold; }
.daily-tip {
font-size: 1rem;
font-style: italic;
color: var(--text-main);
line-height: 1.5;
border-left: 3px solid var(--warning);
padding-left: 10px;
}
/* Basic Network Styles */
.my-id-box {
background: var(--bg-base);
border: 2px dashed var(--primary);
padding: 15px;
border-radius: var(--border-radius-sm);
margin: 15px 0;
font-size: 1.8rem;
font-weight: 800;
font-family: monospace;
letter-spacing: 5px;
color: var(--primary);
text-align: center;
}
.friend-avatar {
width: 45px;
height: 45px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary), var(--accent));
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 1.2rem;
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.badge {
background: var(--danger);
color: white;
font-size: 0.7rem;
padding: 2px 8px;
border-radius: 12px;
margin-left: 5px;
vertical-align: middle;
display: none;
font-weight: 800;
}
/* Modal for Friend's Vault */
.modal-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(5px);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
background: var(--bg-surface);
width: 90%;
max-width: 500px;
max-height: 90vh;
overflow-y: auto;
border-radius: var(--border-radius-md);
border: 1px solid var(--border-color);
padding: 25px;
transform: translateY(20px);
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
</style>
</head>
<body>
<div class="app-container">
<nav class="app-nav">
<a href="dashboard.html" class="nav-item">
<i class="fa-solid fa-house"></i>
<span>Home</span>
</a>
<a href="nutrition.html" class="nav-item">
<i class="fa-solid fa-utensils"></i>
<span>Nutrition</span>
</a>
<a href="recipes.html" class="nav-item">
<i class="fa-solid fa-book-open"></i>
<span>Recipes</span>
</a>
<a href="fitness.html" class="nav-item">
<i class="fa-solid fa-dumbbell"></i>
<span>Fitness</span>
</a>
<a href="analytics.html" class="nav-item">
<i class="fa-solid fa-chart-line"></i>
<span>Analytics</span>
</a>
<a href="social.html" class="nav-item active">
<i class="fa-solid fa-users"></i>
<span>Social</span>
</a>
<a href="settings.html" class="nav-item">
<i class="fa-solid fa-user"></i>
<span>Profile</span>
</a>
</nav>
<main class="main-content">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
<div>
<h2 style="margin-bottom: 5px;">The Wire</h2>
<p class="text-muted" style="font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px;">Global Telemetry Sync</p>
</div>
<button class="btn btn-ghost" id="btnRefreshSocial" style="padding: 8px 15px; font-size: 0.85rem;">
<i class="fa-solid fa-rotate-right"></i> Refresh
</button>
</div>
<div class="social-tabs">
<button class="social-tab active" data-tab="pane-feed"><i class="fa-solid fa-bolt"></i> Stream</button>
<button class="social-tab" data-tab="pane-network"><i class="fa-solid fa-user-group"></i> Squad <span class="badge" id="friendCountBadge" style="display:inline-block; background:var(--bg-surface-elevated); color:var(--text-muted);">0</span></button>
<button class="social-tab" data-tab="pane-requests"><i class="fa-solid fa-user-plus"></i> Pending <span class="badge" id="requestBadge"></span></button>
</div>
<div id="pane-feed" class="tab-pane active">
<div class="stream-layout">
<div class="stream-main">
<div class="create-post-card">
<textarea id="postInput" placeholder="Share your progress, PRs, or thoughts with the squad..."></textarea>
<div style="display: flex; justify-content: space-between; align-items: center;">
<span style="font-size: 0.8rem; color: var(--text-muted);"><i class="fa-solid fa-earth-americas"></i> Visible to Connections</span>
<button class="btn" id="btnSubmitPost" style="padding: 8px 20px;"><i class="fa-solid fa-paper-plane"></i> Post</button>
</div>
</div>
<div id="pinnedSyncsContainer"></div>
<div id="analyticsFeedContainer">
<div style="text-align: center; padding: 40px 20px; color: var(--text-muted);">
<i class="fa-solid fa-spinner fa-spin" style="font-size: 2rem; margin-bottom: 15px;"></i><br>
Decrypting Cross-User Telemetry...
</div>
</div>
</div>
<div class="stream-sidebar">
<div class="widget-card" style="border-top: 3px solid var(--warning);">
<div class="widget-header"><i class="fa-solid fa-lightbulb text-warning"></i> Daily Intelligence</div>
<div class="daily-tip" id="dailyTipContainer">Loading optimization protocol...</div>
</div>
<div class="widget-card" style="border-top: 3px solid var(--info, #3b82f6);">
<div class="widget-header"><i class="fa-solid fa-newspaper" style="color: var(--info, #3b82f6);"></i> Global Health Feed</div>
<div id="newsFeedContainer">
<div style="text-align:center; padding: 10px; color: var(--text-muted);"><i class="fa-solid fa-spinner fa-spin"></i> Fetching Data...</div>
</div>
</div>
</div>
</div>
</div>
<div id="pane-network" class="tab-pane">
<div class="social-header">
<h3 style="margin-top: 0; font-size: 1.1rem;"><i class="fa-solid fa-link text-primary"></i> Your Link ID</h3>
<p class="text-muted" style="font-size: 0.85rem;">Share this secure 6-character code to link telemetry feeds with other athletes.</p>
<div class="my-id-box" id="myShortId">------</div>
<button class="btn btn-ghost" id="btnCopyId" style="width: 100%;">
<i class="fa-regular fa-copy"></i> Copy Link ID
</button>
<div style="border-top: 1px dashed var(--border-color); margin-top: 20px; padding-top: 20px;">
<h4 style="margin: 0 0 10px 0; text-align: left; font-size: 0.95rem;">Add Connection</h4>
<div style="display: flex; gap: 10px;">
<input type="text" id="inputFriendId" placeholder="ENTER ID" maxlength="6" style="flex:1; text-align:center; font-family:monospace; font-size:1.2rem; letter-spacing:2px; text-transform:uppercase; background:var(--bg-surface-elevated); border:1px solid var(--border-color); color:var(--text-main); border-radius:var(--border-radius-sm);">
<button class="btn" id="btnAddFriend" style="width: auto; padding: 0 20px;"><i class="fa-solid fa-paper-plane"></i></button>
</div>
<div id="addFriendMsg" style="font-size: 0.8rem; margin-top: 8px; display: none; text-align: left;"></div>
</div>
</div>
<h4 style="margin-bottom: 15px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase;">Active Roster</h4>
<div id="friendListContainer"></div>
</div>
<div id="pane-requests" class="tab-pane">
<h4 style="margin-bottom: 10px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase;">Inbound Clearances</h4>
<div id="requestsListContainer" style="margin-bottom: 20px;"></div>
<h4 style="margin-bottom: 10px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase;">Outbound Pings</h4>
<div id="sentRequestsContainer"></div>
</div>
</main>
</div>
<div id="systemToast" class="toast">Notification</div>
<div class="modal-overlay" id="friendVaultModal">
<div class="modal-content">
<h3 style="margin-top: 0; margin-bottom: 5px;" id="fvTitle"><i class="fa-solid fa-box-open text-primary"></i> Friend's Vault</h3>
<p class="text-muted" style="font-size: 0.85rem; margin-bottom: 15px;">Import custom workout protocols and recipes directly into your database.</p>
<div style="display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 15px;">
<button class="vault-tab active" data-vault="workouts" style="flex: 1; padding: 10px; background: none; border: none; color: var(--accent); font-weight: bold; border-bottom: 2px solid var(--accent); cursor: pointer;">Workouts</button>
<button class="vault-tab" data-vault="recipes" style="flex: 1; padding: 10px; background: none; border: none; color: var(--text-muted); font-weight: bold; border-bottom: 2px solid transparent; cursor: pointer;">Recipes</button>
</div>
<div id="pane-vault-workouts" style="display: block;">
<div id="fvWorkoutsList" style="max-height: 350px; overflow-y: auto;"></div>
</div>
<div id="pane-vault-recipes" style="display: none;">
<div id="fvRecipesList" style="max-height: 350px; overflow-y: auto;"></div>
</div>
<button class="btn btn-ghost" style="width: 100%; margin-top: 20px;" onclick="document.getElementById('friendVaultModal').classList.remove('active')">Close Vault</button>
</div>
</div>
<script type="module" src="data-store.js"></script>
<script type="module" src="social.js"></script>
</body>
<footer style="text-align: center; padding: 20px; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border-color); margin-top: 20px;">
© 2026 Joshua Michael Smolak. All Rights Reserved. <br>
BodyPro System v2.0.0
</footer>
</html>