Skip to content

Commit ab2a9ce

Browse files
committed
adding a via strabospot link to the checkin's card when a spot_id != null in checkins table
1 parent 730dc20 commit ab2a9ce

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

pages/layout.module.sass

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ body
282282

283283
.checkin-header
284284
display: flex
285+
.strabo-link
286+
margin-left: auto
287+
font-size: 0.8rem
288+
color: #1a73e8
289+
text-decoration: underline
290+
291+
&:hover
292+
color: #b01594
285293

286294
.description
287295
margin-top: 10px

src/components/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,17 @@ function Checkin({ checkin, mapRef, setInspectPosition, len }) {
350350
LngLatCoords(LngLatProps),
351351
h("h3", { className: "rating" }, ratingArr),
352352
]),
353+
checkin.spot_id != null &&
354+
h(
355+
"a",
356+
{
357+
className: "strabo-link",
358+
href: "https://strabospot.org",
359+
target: "_blank",
360+
rel: "noopener noreferrer",
361+
},
362+
"via StraboSpot"
363+
),
353364
]),
354365
h("p", { className: "description" }, checkin.notes),
355366
h(

src/components/layout.module.sass

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@
223223

224224
.checkin-header
225225
display: flex
226+
.strabo-link
227+
margin-left: auto
228+
font-size: 0.8rem
229+
color: #1a73e8
230+
text-decoration: underline
231+
232+
&:hover
233+
color: #b01594
226234

227235
.description
228236
margin-top: 10px

0 commit comments

Comments
 (0)