-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_html.js
More file actions
65 lines (57 loc) · 2.59 KB
/
Copy pathupdate_html.js
File metadata and controls
65 lines (57 loc) · 2.59 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
const fs = require('fs');
const path = require('path');
const styleBlock = ` <style>
/* Essential Sidebar & Mobile Menu Styles */
@media (min-width: 1024px) {
.lg\\:flex { display: flex !important; }
.lg\\:hidden { display: none !important; }
#mobile-sidebar { display: none !important; }
}
#mobile-sidebar {
position: fixed !important;
top: 0 !important; right: 0 !important;
bottom: 0 !important; left: 0 !important;
z-index: 60 !important;
transition: transform 0.3s ease-in-out !important;
}
#mobile-sidebar.translate-x-full { transform: translateX(100%) !important; }
#mobile-sidebar:not(.translate-x-full) { transform: translateX(0) !important; }
.w-4\\/5 { width: 80% !important; }
.right-0 { right: 0 !important; left: auto !important; }
.text-white { color: #ffffff !important; }
.border-white\\/50 { border-color: rgba(255,255,255,0.5) !important; }
.bg-white\\/20 { background-color: rgba(255,255,255,0.2) !important; }
.text-\\[10px\\] { font-size: 10px !important; }
.text-\\[11px\\] { font-size: 11px !important; }
/* Failsafe Vibrant Glass - Injected here to bypass any build tool stripping */
.glass-navbar {
background: rgba(255, 255, 255, 0.35) !important;
-webkit-backdrop-filter: blur(40px) saturate(220%) brightness(1.15) !important;
backdrop-filter: blur(40px) saturate(220%) brightness(1.15) !important;
}
.glass-navbar::before, .glass-navbar::after {
display: none !important;
content: none !important;
}
.glass-dropdown {
background: rgba(255, 255, 255, 0.85) !important;
-webkit-backdrop-filter: blur(30px) saturate(210%) brightness(1.1) !important;
backdrop-filter: blur(30px) saturate(210%) brightness(1.1) !important;
}
</style>
</head>`;
const rootDir = __dirname;
const files = fs.readdirSync(rootDir).filter(f => f.endsWith('.html') && f !== 'index.html');
files.forEach(file => {
const filePath = path.join(rootDir, file);
let content = fs.readFileSync(filePath, 'utf8');
// 1. Restore/Ensure the mobile sidebar and failsafe glass style block
if (!content.includes('/* Essential Sidebar & Mobile Menu Styles */')) {
content = content.replace('</head>', styleBlock);
}
// 2. Update CSS version
content = content.replace(/href="css\/output\.css\?v=20"/g, 'href="css/output.css?v=21"');
content = content.replace(/href="css\/output\.css\?v=19"/g, 'href="css/output.css?v=21"');
fs.writeFileSync(filePath, content);
console.log(`Updated \${file}`);
});