From 02b63a3748f4b1b9eeeadd65867c875021e98000 Mon Sep 17 00:00:00 2001
From: Alexis <35.alexis.pele@gmail.com>
Date: Sat, 14 Oct 2023 14:03:09 +0200
Subject: [PATCH] Added external link marker and fix useless is:global
---
src/assets/scss/_leaflet.scss | 20 ++++++++++++++++----
src/assets/scss/theme.scss | 13 +++++++++++++
src/components/maps/WorldMap.astro | 4 ++--
src/layouts/Layout.astro | 4 ++--
4 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/src/assets/scss/_leaflet.scss b/src/assets/scss/_leaflet.scss
index 6fd81eaf..29b0e268 100644
--- a/src/assets/scss/_leaflet.scss
+++ b/src/assets/scss/_leaflet.scss
@@ -8,6 +8,22 @@
background: #f1f5f9;
.leaflet-map-pane {
+ .leaflet-popup-pane {
+ .leaflet-popup-content-wrapper {
+ border-radius: .25rem;
+
+ .leaflet-popup-content {
+ strong {
+ margin-bottom: .25em;
+
+ a {
+ text-underline-offset: 2px;
+ text-decoration: underline;
+ }
+ }
+ }
+ }
+ }
.leaflet-tooltip-pane {
.leaflet-tooltip {
&.capital-name {
@@ -30,7 +46,3 @@
}
}
}
-
-.leaflet-popup-content-wrapper {
- border-radius: .25rem;
-}
\ No newline at end of file
diff --git a/src/assets/scss/theme.scss b/src/assets/scss/theme.scss
index 898d4f23..9e1fe5a0 100644
--- a/src/assets/scss/theme.scss
+++ b/src/assets/scss/theme.scss
@@ -20,3 +20,16 @@ html {
color: var(--slate-900);
}
+a[href^='http'] {
+ padding-right: 1.25em;
+}
+
+a[href^='http']::after {
+ position: absolute;
+ content: "\e972";
+ font-family: 'Phosphor-Fill' !important;
+ display: inline-block;
+ width: 1em;
+ height: 1em;
+ margin-left: .25em;
+}
\ No newline at end of file
diff --git a/src/components/maps/WorldMap.astro b/src/components/maps/WorldMap.astro
index ca9ac233..29445bcc 100644
--- a/src/components/maps/WorldMap.astro
+++ b/src/components/maps/WorldMap.astro
@@ -90,11 +90,11 @@ for (let i = 0; i < markers.length; i++) {
const marker = L.marker(coords, { icon: markerIcon }).addTo(map);
const popupContent = `
-
+
${m.title}
-
+
${m.description}
`;
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index dedbbfb9..e0b772fd 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -38,6 +38,6 @@ const { title } = Astro.props;