generated from opengeos/maplibre-gl-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
144 lines (126 loc) · 3.43 KB
/
index.html
File metadata and controls
144 lines (126 loc) · 3.43 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MapLibre GL Plugin Template - Examples</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 40px 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
}
h1 {
color: white;
text-align: center;
margin-bottom: 10px;
font-size: 2.5rem;
}
.subtitle {
color: rgba(255, 255, 255, 0.9);
text-align: center;
margin-bottom: 40px;
font-size: 1.1rem;
}
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
}
.example-card {
background: white;
border-radius: 12px;
padding: 24px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
transition: transform 0.2s, box-shadow 0.2s;
text-decoration: none;
color: inherit;
display: block;
}
.example-card:hover {
transform: translateY(-4px);
box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}
.example-card h2 {
color: #333;
margin-bottom: 8px;
font-size: 1.3rem;
}
.example-card p {
color: #666;
font-size: 0.95rem;
line-height: 1.5;
margin-bottom: 16px;
}
.example-card .tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.tag {
background: #f0f0f0;
color: #555;
padding: 4px 10px;
border-radius: 4px;
font-size: 0.8rem;
font-weight: 500;
}
.tag.vanilla { background: #fff3e0; color: #ef6c00; }
.tag.react { background: #e1f5fe; color: #0277bd; }
.tag.typescript { background: #e3f2fd; color: #1565c0; }
.footer {
text-align: center;
margin-top: 40px;
color: rgba(255, 255, 255, 0.8);
}
.footer a {
color: white;
text-decoration: none;
font-weight: 500;
}
.footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h1>MapLibre GL Plugin Template</h1>
<p class="subtitle">A template for creating MapLibre GL JS plugins with TypeScript and React support</p>
<div class="examples-grid">
<a href="./examples/basic/index.html" class="example-card">
<h2>Basic Example</h2>
<p>Simple vanilla JavaScript/TypeScript example showing how to add the plugin control to a map.</p>
<div class="tags">
<span class="tag vanilla">Vanilla JS</span>
<span class="tag typescript">TypeScript</span>
</div>
</a>
<a href="./examples/react/index.html" class="example-card">
<h2>React Example</h2>
<p>React example demonstrating the React wrapper component and custom hooks integration.</p>
<div class="tags">
<span class="tag react">React</span>
<span class="tag typescript">TypeScript</span>
</div>
</a>
</div>
<div class="footer">
<p>
<a href="https://github.com/your-username/maplibre-gl-plugin-template">GitHub</a> ·
<a href="https://www.npmjs.com/package/maplibre-gl-plugin-template">npm</a>
</p>
</div>
</div>
</body>
</html>