-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathindex.html
More file actions
323 lines (289 loc) Β· 8.4 KB
/
index.html
File metadata and controls
323 lines (289 loc) Β· 8.4 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Leaflet Control FullScreen</title>
<link
rel="icon"
type="image/svg+xml"
href='data:image/svg+xml,<svg viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M5 10.3V5.9c0-.5.4-.9.9-.9h4.4c.2 0 .4.2.4.4V7c0 .2-.2.4-.4.4h-3v3c0 .2-.2.4-.4.4H5.4a.4.4 0 0 1-.4-.4zm10.3-4.9V7c0 .2.2.4.4.4h3v3c0 .2.2.4.4.4h1.5c.2 0 .4-.2.4-.4V5.9c0-.5-.4-.9-.9-.9h-4.4c-.2 0-.4.2-.4.4zm5.3 9.9H19c-.2 0-.4.2-.4.4v3h-3c-.2 0-.4.2-.4.4v1.5c0 .2.2.4.4.4h4.4c.5 0 .9-.4.9-.9v-4.4c0-.2-.2-.4-.4-.4zm-9.9 5.3V19c0-.2-.2-.4-.4-.4h-3v-3c0-.2-.2-.4-.4-.4H5.4c-.2 0-.4.2-.4.4v4.4c0 .5.4.9.9.9h4.4c.2 0 .4-.2.4-.4z" fill="%23333"/></svg>'
/>
<style>
:root {
--bg: #0d1117;
--bg-subtle: #161b22;
--bg-elevated: #1c2128;
--text: #e6edf3;
--text-muted: #b9bcc0;
--link: #58a6ff;
--link-hover: #79c0ff;
--border: #30363d;
--accent: #238636;
}
* {
box-sizing: border-box;
}
html {
height: 100%;
}
body {
background: var(--bg);
color: var(--text);
font:
16px/1.6 -apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
sans-serif;
margin: 0;
padding: 0;
min-height: 100%;
display: flex;
flex-direction: column;
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
color: var(--link-hover);
}
.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 24px;
}
header {
padding: 64px 0 48px;
background: linear-gradient(180deg, #262c36 0%, var(--bg) 100%);
position: relative;
}
.header-content {
text-align: center;
}
h1 {
margin: 0 0 24px;
font-size: 48px;
font-weight: 600;
letter-spacing: -0.025em;
color: #ffffff;
}
.header-description {
color: var(--text-muted);
font-size: 17px;
line-height: 1.7;
max-width: 800px;
margin: 0 auto;
}
.header-description p {
margin: 0 0 16px;
}
.header-description p:last-child {
margin-bottom: 0;
}
.header-links {
margin-top: 24px;
display: flex;
flex-wrap: wrap;
gap: 8px 12px;
align-items: center;
justify-content: center;
}
.header-links a {
color: var(--link);
text-decoration: none;
font-size: 15px;
font-weight: 500;
}
main {
padding-bottom: 80px;
flex: 1;
}
h2 {
margin: 0 0 32px;
font-size: 28px;
font-weight: 600;
text-align: center;
color: var(--text);
}
.demo-links {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24px;
margin-bottom: 64px;
max-width: 900px;
margin-left: auto;
margin-right: auto;
}
.demo-link {
display: block;
padding: 24px 32px;
background: var(--bg-subtle);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text);
transition: all 0.2s ease;
text-align: center;
font-size: 18px;
font-weight: 500;
text-decoration: none;
}
.demo-link:hover {
border-color: var(--link);
background: rgba(88, 166, 255, 0.05);
transform: translateY(-2px);
color: var(--link-hover);
}
.demo-link-title {
display: block;
font-size: 20px;
margin-bottom: 8px;
}
.demo-link-desc {
display: block;
font-size: 14px;
color: var(--text-muted);
font-weight: normal;
}
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
margin-bottom: 64px;
}
.feature {
padding: 24px;
background: var(--bg-subtle);
border: 1px solid var(--border);
border-radius: 8px;
}
.feature h3 {
margin: 0 0 12px;
font-size: 18px;
font-weight: 600;
color: var(--text);
}
.feature p {
margin: 0;
color: var(--text-muted);
font-size: 15px;
line-height: 1.6;
}
code {
background: rgba(110, 118, 129, 0.15);
border: 1px solid var(--border);
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
font-family: 'SF Mono', Monaco, 'Cascadia Mono', 'Roboto Mono', Consolas, monospace;
}
@media (max-width: 768px) {
h1 {
font-size: 36px;
}
header {
padding: 48px 0 32px;
}
.header-description {
font-size: 16px;
}
h2 {
font-size: 24px;
margin-bottom: 24px;
}
.features {
grid-template-columns: 1fr;
}
.demo-links {
grid-template-columns: 1fr;
}
.demo-link {
font-size: 16px;
padding: 20px 24px;
}
.header-links span {
display: none;
}
}
</style>
<meta name="description" content="Simple plugin for Leaflet that adds fullscreen button to your maps. Supports both ES6 modules and UMD." />
<link rel="canonical" href="." />
<meta property="og:title" content="Leaflet Control FullScreen" />
<meta property="og:description" content="Simple plugin for Leaflet that adds fullscreen button to your maps. Supports both ES6 modules and UMD." />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
</head>
<body>
<header>
<div class="container">
<div class="header-content">
<h1>Leaflet Control FullScreen</h1>
<div class="header-description">
<p>
Simple plugin for Leaflet that adds a fullscreen button to your maps. Supports true fullscreen mode using the Fullscreen API with a pseudo-fullscreen fallback for
browsers without support.
</p>
</div>
<div class="header-links">
<a href="https://www.npmjs.com/package/leaflet.fullscreen" target="_blank" rel="noopener">π¦ npm</a>
<span>β’</span>
<a href="https://github.com/brunob/leaflet.fullscreen" target="_blank" rel="noopener">π GitHub</a>
<span>β’</span>
<a href="https://github.com/brunob/leaflet.fullscreen#readme" target="_blank" rel="noopener">π Documentation</a>
<span>β’</span>
<a href="https://github.com/brunob/leaflet.fullscreen/blob/master/LICENSE.md" target="_blank" rel="noopener">βοΈ MIT License</a>
</div>
</div>
</div>
</header>
<main class="container">
<h2>Interactive Demos</h2>
<div class="demo-links">
<a href="demo/demo.umd.html" class="demo-link">
<span class="demo-link-title">π Script Tags Demo</span>
<span class="demo-link-desc">Traditional script tags with global L object</span>
</a>
<a href="demo/demo.esm.html" class="demo-link">
<span class="demo-link-title">π¦ ES Module Demo</span>
<span class="demo-link-desc">Modern ES6 imports for bundlers</span>
</a>
<a href="demo/demo.fullscreenElement.html" class="demo-link">
<span class="demo-link-title">πΌοΈ Custom Element Demo</span>
<span class="demo-link-desc">Fullscreen with custom wrapper element</span>
</a>
<a href="demo/demo-darkmode.html" class="demo-link">
<span class="demo-link-title">π Dark Mode Demo</span>
<span class="demo-link-desc">Light/dark theme support with CSS variables</span>
</a>
</div>
<h2>Features</h2>
<div class="features">
<div class="feature">
<h3>π₯οΈ True Fullscreen</h3>
<p>Uses the native Fullscreen API for immersive map viewing. Automatically falls back to pseudo-fullscreen mode when the API is unavailable.</p>
</div>
<div class="feature">
<h3>π¦ ES6 Modules</h3>
<p>Pure ES6 module exports with named imports. UMD version auto-generated from ESM source. Works with modern bundlers and Import Maps.</p>
</div>
<div class="feature">
<h3>π¨ Customizable</h3>
<p>Configure position, button titles, icons, and behavior. Use <code>fullscreenElement</code> to make custom wrapper elements go fullscreen with your map.</p>
</div>
<div class="feature">
<h3>π§ Programmatic API</h3>
<p>Control fullscreen mode with <code>map.toggleFullscreen()</code> method. Listen to <code>enterFullscreen</code> and <code>exitFullscreen</code> events.</p>
</div>
<div class="feature">
<h3>β‘ Lightweight</h3>
<p>No dependencies beyond Leaflet. Minimal footprint with clean, modern code. Just import and use.</p>
</div>
<div class="feature">
<h3>π Wide Support</h3>
<p>Compatible with Leaflet 1.7+ and 2.x. Works in all modern browsers with graceful fallback for older ones.</p>
</div>
</div>
</main>
</body>
</html>