-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.html
More file actions
222 lines (193 loc) · 8.42 KB
/
Copy pathpage.html
File metadata and controls
222 lines (193 loc) · 8.42 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
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WF861TCVBP"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WF861TCVBP');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="BexleyMesh - A community project to build off-grid mesh networks">
<title>BexleyMesh</title>
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="BexleyMesh.svg">
<link rel="apple-touch-icon" href="BexleyMesh.svg">
<!-- Note: Using Tailwind CDN for Phase 1. For production, install as PostCSS plugin. -->
<script src="https://cdn.tailwindcss.com?plugins=forms,typography"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="css/custom.css">
<script>
// Suppress Tailwind CDN warning for Phase 1 development
if (typeof Proxy !== 'undefined') {
window.matchMedia = new Proxy(window.matchMedia, {
apply(target, thisArg, args) {
return Reflect.apply(target, thisArg, args);
}
});
}
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
screens: {
'xl2': '1200px'
},
colors: {
mesh: {
50: '#f0fdf4',
100: '#dcfce7',
300: '#86efac',
500: '#22c55e',
600: '#16a34a',
700: '#15803d',
800: '#166534',
900: '#14532d',
dark: '#0f172a',
card: '#1e293b'
}
},
fontFamily: {
sans: ['Inter', 'sans-serif'],
mono: ['Fira Code', 'monospace'],
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Fira+Code:wght@400;500&display=swap');
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #0f172a;
}
::-webkit-scrollbar-thumb {
background: #334155;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #475569;
}
.mesh-gradient {
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.glass-nav {
background: rgba(15, 23, 42, 0.8);
backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.node-pulse {
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
}
}
</style>
</head>
<body class="bg-mesh-dark text-slate-300 font-sans antialiased selection:bg-mesh-500 selection:text-white">
<!-- Navigation (rendered by components.js) -->
<div id="nav-component"></div>
<!-- Page Header -->
<div class="relative pt-32 pb-16 sm:pt-40 sm:pb-20 overflow-hidden border-b border-slate-800">
<div class="absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-20 z-0 pointer-events-none"></div>
<div class="absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px] z-0 pointer-events-none"></div>
<div class="relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<h1 id="page-title" class="text-4xl sm:text-5xl font-extrabold text-white tracking-tight">Loading...</h1>
<p id="page-subtitle" class="mt-4 text-xl text-slate-400"></p>
</div>
</div>
<!-- Main Content -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div class="grid lg:grid-cols-3 gap-12">
<!-- Left Column: Page Content -->
<div class="lg:col-span-2">
<div id="page-content" class="prose prose-invert prose-lg text-slate-300 leading-relaxed">
<div class="text-center py-12">
<p class="text-slate-400">Loading content...</p>
</div>
</div>
</div>
<!-- Right Column: Sidebar -->
<aside class="space-y-8">
<!-- Network Status (rendered by components.js) -->
<div id="network-status-component"></div>
<!-- Coverage Map (rendered by components.js) -->
<div id="coverage-map-component"></div>
<!-- Resources (rendered by components.js) -->
<div id="resources-component"></div>
</aside>
</div>
</div>
<!-- Footer (rendered by components.js) -->
<div id="footer-component"></div>
<!-- Scripts -->
<script src="js/components.js"></script>
<script src="js/app.js"></script>
<script>
async function initPage() {
const slug = getQueryParam('page');
if (!slug) {
document.getElementById('page-title').textContent = 'Page Not Found';
document.getElementById('page-content').innerHTML = `
<div class="text-center py-12">
<p class="text-red-400">No page specified</p>
<a href="index.html" class="text-mesh-500 hover:text-mesh-300">Back to Home</a>
</div>
`;
return;
}
try {
const response = await fetch(`docs/${slug}.md`);
if (!response.ok) {
throw new Error('Page not found');
}
const content = await response.text();
// Parse front matter
const { frontMatter, content: body } = FrontMatterParser.parse(content);
// Update page title
const title = frontMatter.title || slug.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
document.getElementById('page-title').textContent = title;
document.title = `${title} - BexleyMesh`;
// Update subtitle if provided
if (frontMatter.subtitle) {
document.getElementById('page-subtitle').textContent = frontMatter.subtitle;
}
// Update meta description if provided
if (frontMatter.description) {
document.querySelector('meta[name="description"]').setAttribute('content', frontMatter.description);
}
// Render markdown content
const htmlContent = MarkdownParser.parse(body);
document.getElementById('page-content').innerHTML = htmlContent;
} catch (error) {
console.error('Failed to load page:', error);
document.getElementById('page-title').textContent = 'Page Not Found';
document.getElementById('page-content').innerHTML = `
<div class="text-center py-12">
<p class="text-red-400">The requested page could not be found.</p>
<a href="index.html" class="text-mesh-500 hover:text-mesh-300">Back to Home</a>
</div>
`;
}
}
document.addEventListener('DOMContentLoaded', initPage);
</script>
</body>
</html>