From 3becf43d3b8fd9e0f67fda11d64ad7fa10e6252b Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Sat, 9 Dec 2023 17:14:47 +0100 Subject: [PATCH] Added quests markers and data for eastern map --- package.json | 2 +- public/icon/flag-shadow.png | Bin 0 -> 2577 bytes public/icon/flag.png | Bin 0 -> 2617 bytes src/assets/scss/theme.scss | 1 + src/components/maps/WorldMap.astro | 42 ++- src/components/maps/data/markers.json | 293 ++++++++++++++---- src/components/maps/overlay/SearchMarkers.vue | 73 ++++- src/types/Leaflet.ts | 2 +- 8 files changed, 330 insertions(+), 83 deletions(-) create mode 100644 public/icon/flag-shadow.png create mode 100644 public/icon/flag.png diff --git a/package.json b/package.json index e71bf8aa..ee0d8dfd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "leim-maps", "type": "module", - "version": "0.0.1", + "version": "2.0.0", "scripts": { "dev": "astro dev", "start": "astro dev", diff --git a/public/icon/flag-shadow.png b/public/icon/flag-shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..0a0b312702fc0774c1d1f65ad93f3f19f0f26f9e GIT binary patch literal 2577 zcmb_e4NwzT9$#oxP_TZrwOVvp7%G-c_9G$5O0*^cgOgB%XpP#I&F&_wB-yyTA;I3Y zs8mA-87#FTYL!aq)cS#l*qKhJw$fTgIOf!9f!;B9b3IQzz*ak2TgQ6=lF=J%J5G1z z?R)#)@BjUK?`>s%-jc+LvnE0il$dKa6@b1LG)>%i@Qy1E4uCG+XSPcaG--Oc#X$AD zXF|~UX5O|^UTL*ZjNnnwtl;1jL5~lhAt-B6&_^>RoD4fS7w^?0Lmz*Nz&xu*UQk;x ztIx<4^XBy;SGYdU#;h-4bS$!HA)FPYfC3LE({Rw^_DWPxj|}Ujz&JduMBrhFT%t!7 zhYi9jt@*G~5IHzgfuRhB5wJ$5z%x~(n#h0&jKGu_t|T!OS5s!b=y zIit3~mmVpWWgn$f1_A*^fK&*gONr}rIweLZ2?7NOR4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}Uzdh#yxBvhE literal 0 HcmV?d00001 diff --git a/src/assets/scss/theme.scss b/src/assets/scss/theme.scss index a7949554..4cc775e2 100644 --- a/src/assets/scss/theme.scss +++ b/src/assets/scss/theme.scss @@ -15,6 +15,7 @@ --slate-800: #1e293b; --slate-900: #0f172a; --slate-950: #020617; + --red-500: #dc2626; } html { diff --git a/src/components/maps/WorldMap.astro b/src/components/maps/WorldMap.astro index a7b0f951..e414c770 100644 --- a/src/components/maps/WorldMap.astro +++ b/src/components/maps/WorldMap.astro @@ -40,13 +40,33 @@ function convertYToScale(y) { return (y * yRatio * zoomRatio) + yOffset } +/** + * Convert leaflet scale to x with ratio, zoom and offset + * + * It is basically the mathematically inverse function of convertXToScale() + * @param {number} y + */ +function convertScaleToX(x) { + return (x - xOffset) / (xRatio * zoomRatio) +} + +/** + * Convert leaflet scale to y with ratio, zoom and offset + * + * It is basically the mathematically inverse function of convertYToScale() + * @param {number} y + */ +function convertScaleToY(y) { + return (y - yOffset) / (yRatio * zoomRatio) +} + const distanceRatio = 2 const map = L.map('world', { crs: L.CRS.Simple, maxZoom: 8.5, - minZoom: 4, - zoom: 4, + minZoom: 3.5, + zoom: 3.5, zoomSnap: 0, zoomControl: false }); @@ -69,6 +89,7 @@ const layerGroups = { cities: L.layerGroup(), towns: L.layerGroup(), landmarks: L.layerGroup(), + quests: L.layerGroup(), }; /** @@ -111,6 +132,17 @@ for (let i = 0; i < markers.length; i++) { }); break; + case "quests": + markerIcon = L.icon({ + iconUrl: `icon/flag.png`, + shadowUrl: `icon/flag-shadow.png`, + iconSize: [20, 23], + shadowSize: [35, 30], + iconAnchor: [12.5, 8], + shadowAnchor: [11, 12] + }); + break; + case "towns": default: iconKey = "house" @@ -233,7 +265,7 @@ const rulerOptions = { display: 'Kilomètres', }, days: { - factor: 0.000002 * distanceRatio, + factor: 0.00000325 * distanceRatio, display: 'Jours de marche', decimals: 1 } @@ -247,8 +279,8 @@ measureControl.addTo(map); * DEBUGS */ map.addEventListener('click', (event) => { - const lat = convertXToScale(event.latlng.lat) - const lon = convertYToScale(event.latlng.lng) + const lat = convertScaleToY(event.latlng.lat) + const lon = convertScaleToX(event.latlng.lng) console.log(lat, lon); }) diff --git a/src/components/maps/data/markers.json b/src/components/maps/data/markers.json index 20a1cc7c..063a2187 100644 --- a/src/components/maps/data/markers.json +++ b/src/components/maps/data/markers.json @@ -4,7 +4,7 @@ "group": "capitals", "title": "Ambrose", "description": "Chef-lieu de Nacride et Capitale économique de l'Alliance Kaldélienne.", - "link": "https://alexcreates.fr/leim/index.php?title=Ambrose", + "link": "https://alexcreates.fr/leim/index.php/Ambrose", "markerCoords": { "x": 83.6, "y": -185.2 @@ -14,7 +14,7 @@ "group": "capitals", "title": "Cordouac", "description": "Chef-lieu d'Héraldie et Capitale administrative de l'Alliance Kaldélienne.", - "link": "https://alexcreates.fr/leim/index.php?title=Cordouac", + "link": "https://alexcreates.fr/leim/index.php/Cordouac", "markerCoords": { "x": 133.46875, "y": -146.0625 @@ -24,7 +24,7 @@ "group": "capitals", "title": "Bordelac", "description": "Chef-lieu des Hautes-Berges", - "link": "https://alexcreates.fr/leim/index.php?title=Bordelac", + "link": "https://alexcreates.fr/leim/index.php/Bordelac", "markerCoords": { "x": 151.22656, "y": -173.63281 @@ -34,7 +34,7 @@ "group": "capitals", "title": "Tourgrise", "description": "Chef-lieu de Ternâcre. C'est une cité de mages archivistes, mais c'est aussi ici qu'on trouve la plus grande population carcérale de l'Alliance.", - "link": "https://alexcreates.fr/leim/index.php?title=Tourgrise", + "link": "https://alexcreates.fr/leim/index.php/Tourgrise", "markerCoords": { "x": 132.26953, "y": -98.19141 @@ -44,7 +44,7 @@ "group": "capitals", "title": "Valsoie", "description": "Chef-lieu de Mireloin.", - "link": "https://alexcreates.fr/leim/index.php?title=Valsoie", + "link": "https://alexcreates.fr/leim/index.php/Valsoie", "markerCoords": { "x": 103.4375, "y": -79.5 @@ -54,7 +54,7 @@ "group": "capitals", "title": "Prismalline", "description": "Chef-lieu de Corambre.", - "link": "https://alexcreates.fr/leim/index.php?title=Prismalline", + "link": "https://alexcreates.fr/leim/index.php/Prismalline", "markerCoords": { "x": 103.00329, "y": -138.02162 @@ -64,7 +64,7 @@ "group": "capitals", "title": "Port-brisé", "description": "Chef-lieu d'Émerose.", - "link": "https://alexcreates.fr/leim/index.php?title=Port-brisé", + "link": "https://alexcreates.fr/leim/index.php/Port-brisé", "markerCoords": { "x": 168.39491, "y": -109.13376 @@ -74,7 +74,7 @@ "group": "capitals", "title": "Berce", "description": "Chef-lieu des Basses-berges.", - "link": "https://alexcreates.fr/leim/index.php?title=Berce", + "link": "https://alexcreates.fr/leim/index.php/Berce", "markerCoords": { "x": 173.39874, "y": -164.39011 @@ -84,7 +84,7 @@ "group": "capitals", "title": "Lamière", "description": "Chef-lieu de Quillon.", - "link": "https://alexcreates.fr/leim/index.php?title=Lamière", + "link": "https://alexcreates.fr/leim/index.php/Lamière", "markerCoords": { "x": 140.20731, "y": -195.77923 @@ -94,7 +94,7 @@ "group": "capitals", "title": "Halport", "description": "Chef-lieu de Lagarde.", - "link": "https://alexcreates.fr/leim/index.php?title=Halport", + "link": "https://alexcreates.fr/leim/index.php/Halport", "markerCoords": { "x": 76.6803, "y": -198.76159 @@ -104,7 +104,7 @@ "group": "capitals", "title": "Soubreciel", "description": "Chef-lieu de Rougefer.", - "link": "https://alexcreates.fr/leim/index.php?title=Soubreciel", + "link": "https://alexcreates.fr/leim/index.php/Soubreciel", "markerCoords": { "x": 204.42515, "y": -226.85883 @@ -114,7 +114,7 @@ "group": "capitals", "title": "Dramast", "description": "Chef-lieu d'Asharos.", - "link": "https://alexcreates.fr/leim/index.php?title=Dramast", + "link": "https://alexcreates.fr/leim/index.php/Dramast", "markerCoords": { "x": 119.35456, "y": -27.53623 @@ -124,17 +124,17 @@ "group": "capitals", "title": "Briseroc", "description": "Chef-lieu de Pergaré.", - "link": "https://alexcreates.fr/leim/index.php?title=Briseroc", + "link": "https://alexcreates.fr/leim/index.php/Briseroc", "markerCoords": { "x": 41.96763, "y": -48.83056 } }, { - "group": "capitals", + "group": "cities", "title": "Demilieu", "description": "Ancienne cité militaire laissée à l'abandon depuis plusieurs centaines d'années.", - "link": "https://alexcreates.fr/leim/index.php?title=Demilieu", + "link": "https://alexcreates.fr/leim/index.php/Demilieu", "markerCoords": { "x": 204.75462, "y": -116.80687 @@ -144,7 +144,7 @@ "group": "cities", "title": "Borélis", "description": "Cité côtière vivant principalement de la pêche.", - "link": "https://alexcreates.fr/leim/index.php?title=Borélis", + "link": "https://alexcreates.fr/leim/index.php/Borélis", "markerCoords": { "x": 138.44531, "y": -51.54687 @@ -154,7 +154,7 @@ "group": "cities", "title": "Alcombe", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Alcombe", + "link": "https://alexcreates.fr/leim/index.php/Alcombe", "markerCoords": { "x": 165.42471, "y": -164.00393 @@ -164,7 +164,7 @@ "group": "cities", "title": "Cristaline", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Cristaline", + "link": "https://alexcreates.fr/leim/index.php/Cristaline", "markerCoords": { "x": 167.06242, "y": -176.47233 @@ -174,7 +174,7 @@ "group": "cities", "title": "Vidinamel", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Vidinamel", + "link": "https://alexcreates.fr/leim/index.php/Vidinamel", "markerCoords": { "x": 176.40469, "y": -199.94666 @@ -184,7 +184,7 @@ "group": "cities", "title": "Cantane", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Cantane", + "link": "https://alexcreates.fr/leim/index.php/Cantane", "markerCoords": { "x": 196.00387, "y": -210.9071 @@ -194,7 +194,7 @@ "group": "cities", "title": "Horfer", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Horfer", + "link": "https://alexcreates.fr/leim/index.php/Horfer", "markerCoords": { "x": 185.57431, "y": -229.08588 @@ -204,7 +204,7 @@ "group": "cities", "title": "Cimeterre", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Cimeterre", + "link": "https://alexcreates.fr/leim/index.php/Cimeterre", "markerCoords": { "x": 143.16512, "y": -217.37201 @@ -214,7 +214,7 @@ "group": "cities", "title": "Aubert", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Aubert", + "link": "https://alexcreates.fr/leim/index.php/Aubert", "markerCoords": { "x": 140.19456, "y": -201.85993 @@ -224,7 +224,7 @@ "group": "cities", "title": "Telos", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Telos", + "link": "https://alexcreates.fr/leim/index.php/Telos", "markerCoords": { "x": 104.61938, "y": -204.35683 @@ -234,7 +234,7 @@ "group": "cities", "title": "Saint-Amanthe", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Saint-Amanthe", + "link": "https://alexcreates.fr/leim/index.php/Saint-Amanthe", "markerCoords": { "x": 83.88068, "y": -196.35341 @@ -244,7 +244,7 @@ "group": "cities", "title": "Flauvent", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Flauvent", + "link": "https://alexcreates.fr/leim/index.php/Flauvent", "markerCoords": { "x": 77.58332, "y": -210.22326 @@ -254,7 +254,7 @@ "group": "cities", "title": "Nardion", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Nardion", + "link": "https://alexcreates.fr/leim/index.php/Nardion", "markerCoords": { "x": 43.56226, "y": -218.19662 @@ -264,7 +264,7 @@ "group": "cities", "title": "Granvert", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Granvert", + "link": "https://alexcreates.fr/leim/index.php/Granvert", "markerCoords": { "x": 63.47312, "y": -192.67867 @@ -274,7 +274,7 @@ "group": "cities", "title": "Olydra", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Olydra", + "link": "https://alexcreates.fr/leim/index.php/Olydra", "markerCoords": { "x": 92.24383, "y": -179.9298 @@ -284,7 +284,7 @@ "group": "cities", "title": "Vermeil", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Vermeil", + "link": "https://alexcreates.fr/leim/index.php/Vermeil", "markerCoords": { "x": 98.86066, "y": -185.63039 @@ -294,7 +294,7 @@ "group": "cities", "title": "Corindon", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Corindon", + "link": "https://alexcreates.fr/leim/index.php/Corindon", "markerCoords": { "x": 85.04465, "y": -173.44829 @@ -304,7 +304,7 @@ "group": "cities", "title": "Verdame", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Verdame", + "link": "https://alexcreates.fr/leim/index.php/Verdame", "markerCoords": { "x": 93.64841, "y": -155.23226 @@ -314,7 +314,7 @@ "group": "cities", "title": "Sellier", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Sellier", + "link": "https://alexcreates.fr/leim/index.php/Sellier", "markerCoords": { "x": 112.8161, "y": -165.85315 @@ -324,7 +324,7 @@ "group": "cities", "title": "Fort-Altare", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Fort-Altare", + "link": "https://alexcreates.fr/leim/index.php/Fort-Altare", "markerCoords": { "x": 123.1809, "y": -156.79472 @@ -334,7 +334,7 @@ "group": "cities", "title": "Naegir", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Naegir", + "link": "https://alexcreates.fr/leim/index.php/Naegir", "markerCoords": { "x": 111.22838, "y": -142.46072 @@ -344,7 +344,7 @@ "group": "cities", "title": "Silène", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Silène", + "link": "https://alexcreates.fr/leim/index.php/Silène", "markerCoords": { "x": 129.49372, "y": -127.83022 @@ -354,7 +354,7 @@ "group": "cities", "title": "Astelion", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Astelion", + "link": "https://alexcreates.fr/leim/index.php/Astelion", "markerCoords": { "x": 149.80364, "y": -141.47096 @@ -364,7 +364,7 @@ "group": "cities", "title": "Mythuse", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Mythuse", + "link": "https://alexcreates.fr/leim/index.php/Mythuse", "markerCoords": { "x": 101.52778, "y": -119.3854 @@ -374,7 +374,7 @@ "group": "cities", "title": "Celadonis", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Celadonis", + "link": "https://alexcreates.fr/leim/index.php/Celadonis", "markerCoords": { "x": 121.39631, "y": -107.59972 @@ -384,7 +384,7 @@ "group": "cities", "title": "Mestrl", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Mestrl", + "link": "https://alexcreates.fr/leim/index.php/Mestrl", "markerCoords": { "x": 141.59822, "y": -112.96104 @@ -394,7 +394,7 @@ "group": "cities", "title": "Pyranae", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Pyranae", + "link": "https://alexcreates.fr/leim/index.php/Pyranae", "markerCoords": { "x": 191.89054, "y": -166.99251 @@ -404,7 +404,7 @@ "group": "cities", "title": "Liserios", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Liserios", + "link": "https://alexcreates.fr/leim/index.php/Liserios", "markerCoords": { "x": 187.69872, "y": -101.89283 @@ -414,7 +414,7 @@ "group": "cities", "title": "Armistille", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Armistille", + "link": "https://alexcreates.fr/leim/index.php/Armistille", "markerCoords": { "x": 187.72908, "y": -111.21423 @@ -424,7 +424,7 @@ "group": "cities", "title": "Gasterre", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Gasterre", + "link": "https://alexcreates.fr/leim/index.php/Gasterre", "markerCoords": { "x": 167.39995, "y": -144.62217 @@ -434,7 +434,7 @@ "group": "cities", "title": "Valversant", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Valversant", + "link": "https://alexcreates.fr/leim/index.php/Valversant", "markerCoords": { "x": 177.56325, "y": -156.35054 @@ -444,7 +444,7 @@ "group": "cities", "title": "Becqueraut", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Becqueraut", + "link": "https://alexcreates.fr/leim/index.php/Becqueraut", "markerCoords": { "x": 129.06038, "y": -190.31194 @@ -454,7 +454,7 @@ "group": "cities", "title": "Grasselieu", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Grasselieu", + "link": "https://alexcreates.fr/leim/index.php/Grasselieu", "markerCoords": { "x": 148.54698, "y": -185.44567 @@ -464,7 +464,7 @@ "group": "cities", "title": "Asandre", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Asandre", + "link": "https://alexcreates.fr/leim/index.php/Asandre", "markerCoords": { "x": 125.35658, "y": -95.44555 @@ -474,7 +474,7 @@ "group": "cities", "title": "Félisse", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Félisse", + "link": "https://alexcreates.fr/leim/index.php/Félisse", "markerCoords": { "x": 138.45867, "y": -87.15509 @@ -484,7 +484,7 @@ "group": "cities", "title": "Zélira", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Zélira", + "link": "https://alexcreates.fr/leim/index.php/Zélira", "markerCoords": { "x": 151.79771, "y": -89.78763 @@ -494,7 +494,7 @@ "group": "cities", "title": "Anderol", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Anderol", + "link": "https://alexcreates.fr/leim/index.php/Anderol", "markerCoords": { "x": 88.08019, "y": -76.54403 @@ -504,7 +504,7 @@ "group": "cities", "title": "Denteloin", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Denteloin", + "link": "https://alexcreates.fr/leim/index.php/Denteloin", "markerCoords": { "x": 99.26192, "y": -94.88901 @@ -514,7 +514,7 @@ "group": "cities", "title": "Willeau", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Willeau", + "link": "https://alexcreates.fr/leim/index.php/Willeau", "markerCoords": { "x": 107.50352, "y": -67.36631 @@ -524,7 +524,7 @@ "group": "cities", "title": "Borglah", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Borglah", + "link": "https://alexcreates.fr/leim/index.php/Borglah", "markerCoords": { "x": 91.03982, "y": -57.75967 @@ -534,7 +534,7 @@ "group": "cities", "title": "Karlas", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Karlas", + "link": "https://alexcreates.fr/leim/index.php/Karlas", "markerCoords": { "x": 133.5332, "y": -44.42783 @@ -544,7 +544,7 @@ "group": "cities", "title": "Sérak", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Sérak", + "link": "https://alexcreates.fr/leim/index.php/Sérak", "markerCoords": { "x": 127.10271, "y": -18.2676 @@ -554,7 +554,7 @@ "group": "cities", "title": "Plumeroche", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Plumeroche", + "link": "https://alexcreates.fr/leim/index.php/Plumeroche", "markerCoords": { "x": 52.68144, "y": -44.71821 @@ -573,7 +573,7 @@ "group": "landmarks", "title": "Les Cages Handaniennes", "description": "Complexe pénitencier réservé aux criminels maîtrisant la magie.", - "link": "https://alexcreates.fr/leim/index.php?title=Cages_Handaniennes", + "link": "https://alexcreates.fr/leim/index.php/Cages_Handaniennes", "markerCoords": { "x": 168.31641, "y": -60.54297 @@ -583,7 +583,7 @@ "group": "landmarks", "title": "Solemthelio", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Solemthelio", + "link": "https://alexcreates.fr/leim/index.php/Solemthelio", "markerCoords": { "x": 174.22358, "y": -197.04778 @@ -593,7 +593,7 @@ "group": "landmarks", "title": "Temple du soleil", "description": "", - "link": "https://alexcreates.fr/leim/index.php?title=Temple du soleil", + "link": "https://alexcreates.fr/leim/index.php/Temple du soleil", "markerCoords": { "x": 58.89295, "y": -189.69308 @@ -602,10 +602,177 @@ { "group": "landmarks", "title": "Épave de l'Éclipse", - "description": "Carcasse d'un bateau de garde de la cité de Borélis, échouée sur le rivage rocheux par Sulvan Trois-Barbes, un anarchiste de Bamast.", + "description": "Carcasse d'un bateau de garde de la cité de Borélis, échouée sur le rivage rocheux par Sulvan Trois-Barbes, un anarchiste de Bamast.", "markerCoords": { - "y": -57.93673, - "x": 165.08197 + "x": 165.08197, + "y": -57.93673 + } + }, + { + "group": "capitals", + "title": "Flamberge", + "description": "Cité principale et capitale de l'empire des Terres de Syaltha.", + "link": "https://alexcreates.fr/leim/index.php/Flamberge", + "markerCoords": { + "x": 301.5278268956225, + "y": -109.31289744548666 + } + }, + { + "group": "cities", + "title": "Gosselin", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Gosselin", + "markerCoords": { + "x": 274.548390146726, + "y": -102.85910373918237 + } + }, + { + "group": "capitals", + "title": "Garràn", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Garràn", + "markerCoords": { + "x": 285.0990986858211, + "y": -146.08986069534564 + } + }, + { + "group": "cities", + "title": "Reilig", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Reilig", + "markerCoords": { + "x": 223.59559509274789, + "y": -128.59456481755538 + } + }, + { + "group": "cities", + "title": "Hiraeth", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Hiraeth", + "markerCoords": { + "x": 258.93504395455756, + "y": -170.68684659852204 + } + }, + { + "group": "capitals", + "title": "Sàrù", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Sàrù", + "markerCoords": { + "x": 263.7812679145169, + "y": -200.00348881920243 + } + }, + { + "group": "cities", + "title": "Sarys", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Sarys", + "markerCoords": { + "x": 299.97233754112403, + "y": -213.20999986828247 + } + }, + { + "group": "cities", + "title": "Fasàch", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Fasàch", + "markerCoords": { + "x": 326.7497076703842, + "y": -206.67114645854178 + } + }, + { + "group": "cities", + "title": "Treidàrch", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Treidàrch", + "markerCoords": { + "x": 348.1598016147318, + "y": -199.19162163619717 + } + }, + { + "group": "cities", + "title": "Alemin", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Alemin", + "markerCoords": { + "x": 334.95532432090823, + "y": -150.73512405752393 + } + }, + { + "group": "cities", + "title": "Méasine", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Méasine", + "markerCoords": { + "x": 357.1552251247344, + "y": -99.67975687686224 + } + }, + { + "group": "capitals", + "title": "Ormünd", + "description": "Capitale de la République séparatiste de Sakâr", + "link": "https://alexcreates.fr/leim/index.php/Orm%C3%BCnd", + "markerCoords": { + "x": 331.89665426999727, + "y": -233.1398446347952 + } + }, + { + "group": "cities", + "title": "Ârmelio", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Ârmelio", + "markerCoords": { + "x": 312.66238876422227, + "y": -236.43901518662912 + } + }, + { + "group": "cities", + "title": "Parsûl", + "description": "", + "link": "https://alexcreates.fr/leim/index.php/Parsûl", + "markerCoords": { + "x": 350.6765500094611, + "y": -223.55406577960014 + } + }, + { + "group": "quests", + "title": "Pour la République", + "description": "???", + "markerCoords": { + "x": 330.5404289908736, + "y": -233.9598590433425 + } + }, + { + "group": "quests", + "title": "Les Cloches de Cantane", + "description": "D'étranges disparitions secouent la cité minière de Cantane, rythmées par le tintement des cloches de l'église", + "markerCoords": { + "x": 195.6256582183996, + "y": -210.28328748968713 + } + }, + { + "group": "quests", + "title": "Mémoires de fer", + "description": "???", + "markerCoords": { + "x": 105.79962111804268, + "y": -82.40552057309549 } } ] diff --git a/src/components/maps/overlay/SearchMarkers.vue b/src/components/maps/overlay/SearchMarkers.vue index 59aa6176..b1ae93e5 100644 --- a/src/components/maps/overlay/SearchMarkers.vue +++ b/src/components/maps/overlay/SearchMarkers.vue @@ -92,9 +92,20 @@ onUpdated(() => {
  • -
@@ -205,12 +216,45 @@ onUpdated(() => { } .search-item { + position: relative; cursor: pointer; padding: .4rem .25em; + padding-right: 2.4rem; width: 100%; outline-offset: -1px; - &:hover { + .title, + .desc { + display: block; + font-size: .85em; + } + + .title { + font-weight: 500; + text-underline-offset: 2px; + } + .desc { + color: var(--slate-500); + + :deep(a) { + text-underline-offset: 2px; + text-decoration: underline; + + &:hover { + color: #16a34a; + } + } + } + + .icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: .4rem; + color: var(--slate-400); + } + + &:hover:not(:has(a:hover)) { background-color: var(--slate-100); .title { @@ -227,18 +271,21 @@ onUpdated(() => { } } - .title, - .desc { - display: block; - font-size: .85em; + /** + * Rules for specific groups (capitals, cities, etc...) + */ + &.group-capitals { + .title { + font-weight: 600; + } } - .title { - font-weight: 500; - text-underline-offset: 2px; - } - .desc { - color: var(--slate-500); + &.group-quests { + &:hover:not(:has(a:hover)) { + .icon { + color: var(--red-500); + } + } } } } diff --git a/src/types/Leaflet.ts b/src/types/Leaflet.ts index 63d4f455..ee0b9926 100644 --- a/src/types/Leaflet.ts +++ b/src/types/Leaflet.ts @@ -1,4 +1,4 @@ -export type MapMarkerGroup = "capitals" | "cities" | "towns" | "landmarks"; +export type MapMarkerGroup = "capitals" | "cities" | "towns" | "landmarks" | "quests"; export type MapCoords = { x: number, y: number,