tangled
alpha
login
or
join now
flo-bit.dev
/
blento
21
fork
atom
your personal website on atproto - mirror
blento.app
21
fork
atom
overview
issues
pulls
pipelines
fixed attribution
unbedenklich
1 month ago
74872072
e3e89418
+67
-32
2 changed files
expand all
collapse all
unified
split
.claude
settings.local.json
src
lib
cards
core
MapCard
Map.svelte
+32
-31
.claude/settings.local.json
···
1
1
{
2
2
-
"permissions": {
3
3
-
"allow": [
4
4
-
"Bash(pnpm check:*)",
5
5
-
"mcp__ide__getDiagnostics",
6
6
-
"mcp__plugin_svelte_svelte__svelte-autofixer",
7
7
-
"mcp__plugin_svelte_svelte__list-sections",
8
8
-
"Bash(pkill:*)",
9
9
-
"Bash(timeout 8 pnpm dev:*)",
10
10
-
"Bash(git checkout:*)",
11
11
-
"Bash(npx svelte-kit:*)",
12
12
-
"Bash(ls:*)",
13
13
-
"Bash(pnpm format:*)",
14
14
-
"Bash(pnpm add:*)",
15
15
-
"WebSearch",
16
16
-
"WebFetch(domain:github.com)",
17
17
-
"WebFetch(domain:flipclockjs.com)",
18
18
-
"WebFetch(domain:codepen.io)",
19
19
-
"WebFetch(domain:flo-bit.dev)",
20
20
-
"Bash(pnpm install)",
21
21
-
"Bash(pnpm install:*)",
22
22
-
"Bash(pnpm config:*)",
23
23
-
"Bash(lsof:*)",
24
24
-
"Bash(pnpm dev)",
25
25
-
"Bash(pnpm exec svelte-kit:*)",
26
26
-
"Bash(pnpm build:*)",
27
27
-
"Bash(pnpm remove:*)",
28
28
-
"Bash(grep:*)",
29
29
-
"Bash(find:*)",
30
30
-
"Bash(npx prettier:*)"
31
31
-
]
32
32
-
}
2
2
+
"permissions": {
3
3
+
"allow": [
4
4
+
"Bash(pnpm check:*)",
5
5
+
"mcp__ide__getDiagnostics",
6
6
+
"mcp__plugin_svelte_svelte__svelte-autofixer",
7
7
+
"mcp__plugin_svelte_svelte__list-sections",
8
8
+
"Bash(pkill:*)",
9
9
+
"Bash(timeout 8 pnpm dev:*)",
10
10
+
"Bash(git checkout:*)",
11
11
+
"Bash(npx svelte-kit:*)",
12
12
+
"Bash(ls:*)",
13
13
+
"Bash(pnpm format:*)",
14
14
+
"Bash(pnpm add:*)",
15
15
+
"WebSearch",
16
16
+
"WebFetch(domain:github.com)",
17
17
+
"WebFetch(domain:flipclockjs.com)",
18
18
+
"WebFetch(domain:codepen.io)",
19
19
+
"WebFetch(domain:flo-bit.dev)",
20
20
+
"Bash(pnpm install)",
21
21
+
"Bash(pnpm install:*)",
22
22
+
"Bash(pnpm config:*)",
23
23
+
"Bash(lsof:*)",
24
24
+
"Bash(pnpm dev)",
25
25
+
"Bash(pnpm exec svelte-kit:*)",
26
26
+
"Bash(pnpm build:*)",
27
27
+
"Bash(pnpm remove:*)",
28
28
+
"Bash(grep:*)",
29
29
+
"Bash(find:*)",
30
30
+
"Bash(npx prettier:*)",
31
31
+
"Bash(node -e:*)"
32
32
+
]
33
33
+
}
33
34
}
+35
-1
src/lib/cards/core/MapCard/Map.svelte
···
5
5
let { item = $bindable() }: { item: Item } = $props();
6
6
7
7
let center = $state({ lng: parseFloat(item.cardData.lon), lat: parseFloat(item.cardData.lat) });
8
8
+
let showAttribution = $state(false);
8
9
</script>
9
10
10
11
<div class="absolute inset-0 isolate h-full w-full">
···
13
14
style="https://tiles.openfreemap.org/styles/liberty"
14
15
zoom={item.cardData.zoom}
15
16
{center}
16
16
-
attributionControl={{ compact: true }}
17
17
+
attributionControl={false}
17
18
dragPan={false}
18
19
dragRotate={false}
19
20
keyboard={false}
···
33
34
{/snippet}
34
35
</Marker>
35
36
</MapLibre>
37
37
+
38
38
+
{#snippet infoIcon()}
39
39
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill-rule="evenodd" viewBox="0 0 20 20">
40
40
+
<path d="M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0" />
41
41
+
</svg>
42
42
+
{/snippet}
43
43
+
44
44
+
{#snippet attributionText()}
45
45
+
<a href="https://openfreemap.org" target="_blank" rel="noopener noreferrer" class="text-black/75 no-underline hover:underline" onclick={(e) => e.stopPropagation()}>OpenFreeMap</a> <a href="https://openmaptiles.org" target="_blank" rel="noopener noreferrer" class="text-black/75 no-underline hover:underline" onclick={(e) => e.stopPropagation()}>© OpenMapTiles</a> Data from <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer" class="text-black/75 no-underline hover:underline" onclick={(e) => e.stopPropagation()}>OpenStreetMap</a>
46
46
+
{/snippet}
47
47
+
48
48
+
{#if showAttribution}
49
49
+
<div class="absolute right-2.5 bottom-2.5 z-10 rounded-xl bg-white text-black" style="width: calc(100% - 20px); max-width: 12rem;">
50
50
+
<button
51
51
+
class="float-right flex size-6 cursor-pointer items-center justify-center rounded-full shadow-[0_0_6px_rgba(59,130,246,0.6)]"
52
52
+
onclick={() => (showAttribution = false)}
53
53
+
aria-label="Toggle attribution"
54
54
+
>
55
55
+
{@render infoIcon()}
56
56
+
</button>
57
57
+
<div class="p-2 text-left text-xs leading-snug text-black/75">
58
58
+
{@render attributionText()}
59
59
+
</div>
60
60
+
</div>
61
61
+
{:else}
62
62
+
<button
63
63
+
class="absolute right-2.5 bottom-2.5 z-10 flex size-6 items-center justify-center rounded-full bg-white text-black"
64
64
+
onclick={() => (showAttribution = true)}
65
65
+
aria-label="Toggle attribution"
66
66
+
>
67
67
+
{@render infoIcon()}
68
68
+
</button>
69
69
+
{/if}
36
70
</div>