Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
487 lines (485 loc) · 22.1 KB
/
Copy pathindex.html
File metadata and controls
487 lines (485 loc) · 22.1 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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="google" content="notranslate" />
<link
rel="icon"
type="image/svg+xml"
href="/favicon-indigo-bg.svg"
media="(prefers-color-scheme: light)"
/>
<link
rel="icon"
type="image/svg+xml"
href="/favicon-graphite-bg.svg"
media="(prefers-color-scheme: dark)"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="theme-color"
content="#fafafc"
media="(prefers-color-scheme: light)"
/>
<meta
name="theme-color"
content="#0f1115"
media="(prefers-color-scheme: dark)"
/>
<meta
name="description"
content="Mapcursor - draw and annotate on maps. Sketch routes, mark places and share a map link. No login, no signup."
/>
<meta property="og:title" content="Mapcursor - Sketch on maps" />
<meta
property="og:description"
content="Annotate on maps without signup"
/>
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Caveat+Brush&family=Geist+Mono:wght@100..900&family=Geist:wght@400&family=Inter:wght@300..700&display=swap"
rel="stylesheet"
/>
<title>Mapcursor - Draw and annotate on maps</title>
<!-- Pre-paint theme: apply the saved/system theme before the bundle
loads so the boot loader + first paint match (no light flash).
Keep this logic in sync with src/hooks/useTheme.ts. -->
<script>
;(function () {
try {
var stored = localStorage.getItem('mc-theme')
var pref =
stored === 'light' ||
stored === 'dark' ||
stored === 'system'
? stored
: 'light'
var dark =
pref === 'dark' ||
(pref === 'system' &&
window.matchMedia('(prefers-color-scheme: dark)')
.matches)
if (dark) document.documentElement.classList.add('dark')
} catch (e) {}
})()
</script>
<script
defer
src="https://cloud.umami.is/script.js"
data-website-id="df6d84fd-5cd0-4439-bd9f-d2b421dea79e"
></script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Mapcursor",
"applicationCategory": "BusinessApplication",
"operatingSystem": "Web",
"description": "Draw and annotate on maps. Sketch routes, mark places and share a map link.",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
<!-- Inline startup loader (Variant A). Paints before the JS bundle
loads; React replaces #root on first commit. Keep in sync with
src/components/common/mapcursorLoader.css -->
<style>
#mc-boot {
position: fixed;
inset: 0;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 22px;
/* Solid parchment only — the dot grid is canvas-only (behind
the dotGrid feature flag) and must never appear on the
loader. */
background-color: #fafafc;
/* One cycle for all three route animations; they must share a
duration or the cursor drifts off the head of its line. */
--mc-cycle: 2.8s;
}
/* Dark boot loader — kept in sync with the .dark tokens in
src/App.css so the loader matches the resolved theme. */
.dark #mc-boot {
background-color: #0f1115;
}
#mc-boot svg {
width: 132px;
height: 132px;
overflow: visible;
}
/* Ink for the map and the cursor. Scoped to .mc-map / .mc-cursor
on purpose: a blanket `svg path` rule would also recolour the
mask's path, whose #FFFFFF is the only reason it reveals
anything. */
#mc-boot .mc-map path,
#mc-boot .mc-cursor path {
stroke: #14161c;
}
.dark #mc-boot .mc-map path,
.dark #mc-boot .mc-cursor path {
stroke: #e8eaf0;
}
#mc-boot .mc-wordmark {
font-family: 'Inter', system-ui, sans-serif;
font-weight: 600;
font-size: 22px;
/* Pinned, not `normal`, which resolves off the font's own
metrics and moved the column when the webfont loaded. */
line-height: 1;
letter-spacing: 0.5px;
color: #14161c;
}
.dark #mc-boot .mc-wordmark {
color: #e8eaf0;
}
#mc-boot .mc-caption {
margin-top: -10px;
font-family: 'Inter', system-ui, sans-serif;
font-size: 13px;
line-height: 1;
letter-spacing: 0.3px;
color: #6b7180;
}
#mc-boot .mc-caption::after {
content: '';
animation: mcBootDots 1.4s steps(4, end) infinite;
}
@keyframes mcBootDots {
0% {
content: '';
}
25% {
content: '.';
}
50% {
content: '..';
}
75% {
content: '...';
}
}
/* The route animation is CSS, not SMIL, and that is the whole
point of it: SMIL's timeline does not start until the document
`load` event, which this page blocks on the font stylesheet
above and on the bundle below. The boot loader therefore used
to paint its map and then sit frozen until everything had
loaded, then snap into motion. CSS animations start at the
element's first style resolution instead — the frame this
paints. Keep in sync with src/components/common/
mapcursorLoader.css, which carries the full note. */
#mc-boot .mc-route {
animation: mcBootRouteFade var(--mc-cycle) linear infinite;
}
#mc-boot .mc-route-wipe {
stroke-dashoffset: 106.231;
animation: mcBootRouteWipe var(--mc-cycle) linear infinite;
}
#mc-boot .mc-cursor {
offset-path: path(
'M70,75 L105,75 Q115,75 115,85 L115,115 L140,115'
);
offset-rotate: 0deg;
offset-distance: 0%;
animation: mcBootCursorTravel var(--mc-cycle) linear infinite;
}
/* Pre-Safari-16: the line still draws, the cursor just rests. */
@supports not (offset-path: path('M0 0')) {
#mc-boot .mc-cursor {
transform: translate(70px, 75px);
animation: none;
}
}
/* Frame 0 is the resting state — cursor parked at the start of the
route, at full opacity — so the mark never appears without it.
The rewind to that state happens between 92% and 95%, inside the
fade-out, where nothing is visible; and 100% is identical to 0%,
so the loop has no seam. */
@keyframes mcBootRouteFade {
0%,
84% {
opacity: 1;
}
92%,
95% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes mcBootCursorTravel {
0%,
6% {
offset-distance: 0%;
}
72%,
92% {
offset-distance: 100%;
}
93%,
100% {
offset-distance: 0%;
}
}
@keyframes mcBootRouteWipe {
0%,
6% {
stroke-dashoffset: 106.231;
}
72%,
92% {
stroke-dashoffset: 0;
}
93%,
100% {
stroke-dashoffset: 106.231;
}
}
/* Reduced motion gets the finished still frame. */
@media (prefers-reduced-motion: reduce) {
#mc-boot .mc-route,
#mc-boot .mc-route-wipe,
#mc-boot .mc-cursor {
animation: none;
}
#mc-boot .mc-route-wipe {
stroke-dashoffset: 0;
}
#mc-boot .mc-cursor {
offset-distance: 100%;
}
#mc-boot .mc-caption::after {
animation: none;
content: '...';
}
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root">
<div id="mc-boot" role="status" aria-label="Loading Mapcursor">
<svg viewBox="0 0 200 200" aria-hidden="true">
<defs>
<mask
id="mc-boot-route-mask"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="200"
height="200"
>
<path
class="mc-route-wipe"
d="M70,75 L105,75 Q115,75 115,85 L115,115 L140,115"
stroke="#FFFFFF"
stroke-width="6"
fill="none"
stroke-linecap="round"
stroke-dasharray="106.231 106.231"
/>
</mask>
</defs>
<g
class="mc-map"
transform="translate(-4213.726,-7162.326) scale(2.0)"
>
<g transform="matrix(1 0 0 1 2135 3634)">
<g transform="matrix(1 0 0 1 1 -21)">
<path
d="M 0.178307 0.696819 L 0.178307 38.575825 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 42 -21)">
<path
d="M 0.251929 0.240445 L 0.251929 2.40822 L 0.251929 6.743769 L 0.251929 13.247092 L 0.251929 21.91819 L 0.223405 28.621177 L 0.166359 33.356053 L 0.080789 36.122817 L -0.033305 36.921471 L -0.118875 37.520461 L -0.175922 37.919788 L -0.204445 38.119452 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 13 -20)">
<path
d="M 0.956767 0.609566 L 0.956767 36.663078 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 29 -20)">
<path
d="M 0.473469 0.153192 L 0.473469 35.750331 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 1 -21)">
<path
d="M 0.656862 0.064973 L 12.561257 -5.674646 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 14 -27)">
<path
d="M 0.161571 0.112776 L 0.661571 0.112776 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 15 -27)">
<path
d="M 0.687042 0.112776 L 0.873048 0.152634 L 1.245061 0.232351 L 1.803079 0.351926 L 2.547104 0.51136 L 3.649855 0.923231 L 5.111332 1.587539 L 6.931535 2.504284 L 9.110465 3.673465 L 10.943954 4.616782 L 12.432004 5.334235 L 13.574613 5.825823 L 14.371782 6.091546 L 14.969659 6.290838 L 15.368244 6.4237 L 15.567536 6.49013 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 30 -21)">
<path
d="M 0.354958 0.702709 L 12.471932 -3.761439 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 42 -25)">
<path
d="M 0.471932 0.451139 L 0.471932 3.639816 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 2 21)">
<path
d="M 0.719754 0.155514 L 11.773836 -3.883477 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 14 16)">
<path
d="M 0.62415 0.691366 L 1.089165 0.771083 L 2.019196 0.930517 L 3.414242 1.169668 L 5.274304 1.488536 L 7.041363 1.847262 L 8.715418 2.245846 L 10.296471 2.68429 L 11.78452 3.162591 L 12.900557 3.521317 L 13.644582 3.760468 L 14.016594 3.880044 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 29 20)">
<path
d="M 0.929801 0.517779 L 13.046775 -2.883477 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 29 16)">
<path
d="M 0.292065 0.053631 L 0.292065 4.092622 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 1 17)">
<path
d="M 0.231705 0.329102 L 0.231705 3.517779 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
<g transform="matrix(1 0 0 1 14 -26)">
<path
d="M 0.009414 0.586915 L 0.009414 7.178233 "
fill="none"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
</g>
</g>
<g class="mc-route">
<path
class="mc-route-line"
d="M70,75 L105,75 Q115,75 115,85 L115,115 L140,115"
stroke="#6965db"
stroke-width="2.2"
stroke-linecap="round"
stroke-dasharray="1,5.5"
fill="none"
mask="url(#mc-boot-route-mask)"
/>
<g class="mc-cursor">
<g
transform="scale(0.34) translate(21.4375,-3.1875)"
>
<g transform="matrix(1 0 0 1 -30 -5)">
<path
d="M 0.963939 3.526349 L 0.963939 4.486442 L 0.963939 6.406629 L 0.963939 9.28691 L 0.963939 13.127284 L 0.872501 16.55619 L 0.689626 19.573627 L 0.415314 22.179595 L 0.049564 24.374095 L -0.453342 23.962626 L -1.093405 20.945189 L -1.870623 15.321784 L -2.784998 7.092411 L -3.287904 0.646068 L -3.379342 -4.017244 L -3.059311 -6.897524 L -2.327811 -7.994774 L -0.087592 -7.126118 L 3.661344 -4.291556 L 8.919 0.508912 L 15.685373 7.275286 L 19.525748 11.572847 L 20.440123 13.401597 L 18.428498 12.761535 L 13.490874 9.65266 L 9.787656 7.321004 L 7.318844 5.766567 L 6.084438 4.989348 "
fill="none"
stroke-width="13.890796957060644"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="4"
/>
</g>
</g>
</g>
</g>
</svg>
<div class="mc-wordmark">Mapcursor</div>
<div class="mc-caption">setting up your map</div>
</div>
</div>
<script type="module" src="/src/index.js"></script>
</body>
</html>