Skip to content

Commit f5dc84c

Browse files
committed
Add usgs.gov link
1 parent af4863b commit f5dc84c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/Main.svelte

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,38 @@
3333
<span class:font-bold={feature.properties.mag >= 4.5} class:text-red-600={feature.properties.mag >= 7}
3434
>{feature.properties.place}</span
3535
>
36+
37+
<!-- usgs.gov link -->
38+
{#if feature.properties.url.length}
39+
<a
40+
href={feature.properties.url}
41+
target="_blank"
42+
rel="noreferrer"
43+
class="text-blue-600"
44+
title="View on earthquake.usgs.gov"
45+
use:tooltip={{ theme: "dark-border" }}
46+
>
47+
<svg
48+
xmlns="http://www.w3.org/2000/svg"
49+
width="15"
50+
height="15"
51+
viewBox="0 0 24 24"
52+
fill="none"
53+
stroke="currentColor"
54+
stroke-width="2"
55+
stroke-linecap="round"
56+
stroke-linejoin="round"
57+
><circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line
58+
x1="12"
59+
y1="8"
60+
x2="12"
61+
y2="8"
62+
/></svg
63+
>
64+
</a>
65+
{/if}
66+
67+
<!-- geojson.io link -->
3668
<a
3769
href={`http://geojson.io/#data=data:application/json,${encodeURIComponent(JSON.stringify(feature))}`}
3870
target="_blank"
@@ -55,6 +87,7 @@
5587
>
5688
</a>
5789

90+
<!-- tsunami -->
5891
{#if feature.properties.tsunami === 1}
5992
<span
6093
class="text-blue-600"

0 commit comments

Comments
 (0)