Skip to content

Commit b2ac83f

Browse files
authored
Update index.html
1 parent 435e8fe commit b2ac83f

File tree

1 file changed

+0
-83
lines changed

1 file changed

+0
-83
lines changed

web/index.html

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,10 @@
44
<title>ProStore Web</title>
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<link rel="stylesheet" href="styles.css">
7-
<style>
8-
.sidebar-item.active{
9-
color: var(--text);
10-
background: linear-gradient(90deg, rgba(78,229,255,0.04), rgba(139,92,246,0.03));
11-
border-color: rgba(78,229,255,0.08);
12-
box-shadow: 0 6px 18px rgba(78,229,255,0.03);
13-
}
14-
</style>
157
<script src="installer.js"></script>
168
</head>
179
<body>
1810
<div class="content-area">
19-
<button class="hamburger" aria-label="Toggle sidebar" aria-expanded="false">
20-
<svg width="22" height="16" viewBox="0 0 22 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
21-
<rect width="22" height="2" rx="1" fill="currentColor"/>
22-
<rect y="7" width="22" height="2" rx="1" fill="currentColor"/>
23-
<rect y="14" width="22" height="2" rx="1" fill="currentColor"/>
24-
</svg>
25-
</button>
2611
<div class="sidebar">
2712
<div onclick="window.location.href = 'index.html';" class="sidebar-item active">ProStore Installer</div>
2813
<div onclick="window.location.href = 'cert.html';" class="sidebar-item">Certificate Manager & Status</div>
@@ -45,74 +30,6 @@ <h1 class="title">ProStore Installer</h1><br>
4530
<script>
4631
pulse('reset');
4732
loadingImg(0);
48-
49-
// SIDEBAR TOGGLE \\
50-
(function(){
51-
const body = document.body;
52-
const hamburger = document.querySelector('.hamburger');
53-
if(!hamburger) return;
54-
// create overlay node (used on mobile)
55-
let overlay = document.querySelector('.sidebar-overlay');
56-
if(!overlay){
57-
overlay = document.createElement('div');
58-
overlay.className = 'sidebar-overlay';
59-
document.body.appendChild(overlay);
60-
}
61-
62-
function openSidebar(){
63-
body.classList.add('sidebar-open');
64-
hamburger.setAttribute('aria-expanded','true');
65-
// trap focus simple-ish - set focus to first sidebar item
66-
const firstItem = document.querySelector('.sidebar .sidebar-item');
67-
if(firstItem) firstItem.focus();
68-
}
69-
function closeSidebar(){
70-
body.classList.remove('sidebar-open');
71-
hamburger.setAttribute('aria-expanded','false');
72-
hamburger.focus();
73-
}
74-
function toggleSidebar(){
75-
if(body.classList.contains('sidebar-open')) closeSidebar();
76-
else openSidebar();
77-
}
78-
79-
hamburger.addEventListener('click', function(e){
80-
e.stopPropagation();
81-
toggleSidebar();
82-
});
83-
84-
overlay.addEventListener('click', function(){
85-
closeSidebar();
86-
});
87-
88-
// close on escape
89-
document.addEventListener('keydown', function(e){
90-
if(e.key === 'Escape' && body.classList.contains('sidebar-open')){
91-
closeSidebar();
92-
}
93-
});
94-
95-
// If a sidebar item is clicked on mobile, auto-close (and navigate)
96-
document.addEventListener('click', function(e){
97-
const item = e.target.closest('.sidebar-item');
98-
if(!item) return;
99-
// only auto-close on small screens (avoid closing on desktop)
100-
if(window.innerWidth <= 860) {
101-
// Slight delay to allow navigation/href to trigger
102-
setTimeout(closeSidebar, 160);
103-
}
104-
});
105-
106-
// ensure state updates on resize (e.g., when rotating device)
107-
window.addEventListener('resize', function(){
108-
if(window.innerWidth > 860) {
109-
// ensure sidebar visible on desktop
110-
body.classList.remove('sidebar-open');
111-
hamburger.setAttribute('aria-expanded','false');
112-
}
113-
});
114-
})();
115-
11633
</script>
11734
</body>
11835
</html>

0 commit comments

Comments
 (0)