-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
244 lines (219 loc) · 13.5 KB
/
sidebar.php
File metadata and controls
244 lines (219 loc) · 13.5 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
<div class="sidebar bg-white border-r border-gray-200" id="sidebar">
<a class="logo-box sticky top-0 flex min-h-topbar-height items-center justify-start px-6 bg-white border-b border-gray-100 z-10" href="index.php">
<!-- Logo -->
<span class="text-xl font-bold text-gray-800 tracking-tight">FPL<span class="text-emerald-600">Master</span></span>
</a>
<ul class="side-nav p-3 hs-accordion-group">
<li class="menu-title text-xs font-bold text-gray-400 uppercase tracking-wider px-4 mt-2 mb-1">
<span>Overview</span>
</li>
<li class="menu-item">
<a href="index.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'index.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-home"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Home</span>
</a>
</li>
<li class="menu-item">
<a href="Dashboard.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'Dashboard.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard"><rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/></svg></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Dashboard</span>
</a>
</li>
<li class="menu-item">
<a href="team.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'team.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-people-fill"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">My Team</span>
</a>
</li>
<li class="menu-item">
<a href="planner.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'planner.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-calendar-check"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Planner</span>
</a>
</li>
<li class="menu-title text-xs font-bold text-gray-400 uppercase tracking-wider px-4 mt-6 mb-1">
<span>Stats & Data</span>
</li>
<li class="menu-item">
<a href="fixtures.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'fixtures.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-calendar3"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Fixtures</span>
</a>
</li>
<li class="menu-item">
<a href="players.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'players.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-person-lines-fill"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Players</span>
</a>
</li>
<li class="menu-item">
<a href="leagues.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'leagues.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-trophy"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Leagues</span>
</a>
</li>
<li class="menu-item">
<a href="rank.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'rank.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-bar-chart-line"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Live Rank</span>
</a>
</li>
<li class="menu-item">
<a href="live-score.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'live-score.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-activity"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Live Score</span>
</a>
</li>
<li class="menu-title text-xs font-bold text-gray-400 uppercase tracking-wider px-4 mt-6 mb-1">
<span>Tools</span>
</li>
<li class="menu-item">
<a href="compare.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'compare.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-arrow-left-right"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Comparison</span>
</a>
</li>
<li class="menu-item">
<a href="price-changes.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'price-changes.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-currency-pound"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Price Changes</span>
</a>
</li>
<li class="menu-item hs-accordion">
<a href="javascript:void(0)" class="hs-accordion-toggle menu-link group">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-cpu"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">AI Hub</span>
<span class="menu-arrow text-gray-400 group-hover:text-emerald-600"></span>
</a>
<ul class="sub-menu hs-accordion-content hidden bg-gray-50/50">
<li class="menu-item">
<a class="menu-link group" href="ai-team-rating.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Team Rating</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-team-picker.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Team Picker</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-team-improver.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Team Improver</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-team-point-predictor.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Point Predictor</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-captain-advisor.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">👑 Captain Advisor</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-final-team.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">🏆 Final Team</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-freehit-picker.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">⚡ Freehit Picker</span>
</a>
</li>
<li class="menu-item">
<a class="menu-link group" href="ai-wildcard-picker.php">
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">🃏 Wildcard Picker</span>
</a>
</li>
</ul>
</li>
<li class="menu-title text-xs font-bold text-gray-400 uppercase tracking-wider px-4 mt-6 mb-1">
<span>Insights</span>
</li>
<li class="menu-item">
<a href="price-predictor.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'price-predictor.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-graph-up-arrow"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Price Predictor</span>
</a>
</li>
<li class="menu-item">
<a href="chip-strategy.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'chip-strategy.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-lightning-charge"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Chip Strategy</span>
</a>
</li>
<li class="menu-title text-xs font-bold text-gray-400 uppercase tracking-wider px-4 mt-6 mb-1">
<span>Extra</span>
</li>
<li class="menu-item">
<a href="expert-reveals.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'expert-reveals.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-star"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">Expert Reveals</span>
</a>
</li>
<li class="menu-item">
<a href="draft.php" class="menu-link group <?php echo basename($_SERVER['PHP_SELF']) == 'draft.php' ? 'active' : ''; ?>">
<span class="menu-icon group-hover:text-emerald-600"><i class="bi bi-shuffle"></i></span>
<span class="menu-text font-medium text-gray-600 group-hover:text-emerald-700">FPL Draft</span>
</a>
</li>
<li class="menu-item mt-4">
<a href="logout.php" class="menu-link group text-red-500 hover:bg-red-50/50 hover:text-red-600">
<span class="menu-icon"><i class="bi bi-box-arrow-left"></i></span>
<span class="menu-text font-medium">Logout</span>
</a>
</li>
</ul>
<div class="mt-auto p-4 border-t border-gray-100 md:hidden">
<button type="button" id="closeSidebar" class="btn btn-outline-danger w-100">Close Menu</button>
</div>
</div>
<div class="sidebar-overlay" id="sidebarOverlay"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
console.log('Sidebar script loaded');
// Helper to toggle body class
const toggleSidebar = () => {
console.log('Toggling sidebar');
document.body.classList.toggle('sidebar-toggled');
};
// Helper to close sidebar (remove class)
const closeSidebar = () => {
console.log('Closing sidebar');
document.body.classList.remove('sidebar-toggled');
};
// Event delegation for robustness
document.addEventListener('click', (e) => {
const tempToggleBtn = e.target.closest('#sidebarToggle');
const tempCloseBtn = e.target.closest('#closeSidebar');
const tempOverlay = e.target.closest('#sidebarOverlay');
if (tempToggleBtn) {
toggleSidebar();
} else if (tempCloseBtn || tempOverlay) {
closeSidebar();
}
});
// Accordion functionality for hs-accordion
const accordions = document.querySelectorAll('.hs-accordion-toggle');
accordions.forEach(acc => {
acc.addEventListener('click', function(e) {
e.preventDefault();
const parent = this.closest('.hs-accordion');
const content = parent.querySelector('.hs-accordion-content');
// Toggle current
if (content.classList.contains('hidden')) {
content.classList.remove('hidden');
content.style.display = 'block';
this.classList.add('active');
this.setAttribute('aria-expanded', 'true');
} else {
content.classList.add('hidden');
content.style.display = 'none';
this.classList.remove('active');
this.setAttribute('aria-expanded', 'false');
}
});
});
});
</script>