From 1fbc96acf2cae26502fe9d2ea11cb0656944454f Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Mon, 9 Oct 2023 22:52:26 +0200 Subject: [PATCH] Added favicon, text stroke and changes to data handling --- public/android-chrome-96x96.png | Bin 0 -> 540 bytes public/apple-touch-icon.png | Bin 0 -> 1429 bytes public/browserconfig.xml | 9 + public/favicon-16x16.png | Bin 0 -> 678 bytes public/favicon-32x32.png | Bin 0 -> 1086 bytes public/favicon.ico | Bin 0 -> 15086 bytes public/mstile-150x150.png | Bin 0 -> 713 bytes public/safari-pinned-tab.svg | 21 + public/site.webmanifest | 14 + src/assets/scss/_leaflet.scss | 36 ++ src/assets/scss/theme.scss | 5 + src/assets/scss/utils/_text.scss | 24 + src/components/maps/AllianceKaldelienne.astro | 227 +------ src/layouts/Layout.astro | 42 +- src/pages/api/data/alliance.markers.ts | 603 ++++++++++++++++++ src/pages/api/markers.json.ts | 8 + src/pages/index.astro | 7 +- src/types/Leaflet.ts | 12 + tsconfig.json | 8 +- 19 files changed, 771 insertions(+), 245 deletions(-) create mode 100644 public/android-chrome-96x96.png create mode 100644 public/apple-touch-icon.png create mode 100644 public/browserconfig.xml create mode 100644 public/favicon-16x16.png create mode 100644 public/favicon-32x32.png create mode 100644 public/favicon.ico create mode 100644 public/mstile-150x150.png create mode 100644 public/safari-pinned-tab.svg create mode 100644 public/site.webmanifest create mode 100644 src/assets/scss/_leaflet.scss create mode 100644 src/assets/scss/theme.scss create mode 100644 src/assets/scss/utils/_text.scss create mode 100644 src/pages/api/data/alliance.markers.ts create mode 100644 src/pages/api/markers.json.ts create mode 100644 src/types/Leaflet.ts diff --git a/public/android-chrome-96x96.png b/public/android-chrome-96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..7faa167701dbd5d060b4a619e873f5c14e583670 GIT binary patch literal 540 zcmV+%0^|LOP)Px#El^BUMNDaN*ZqesWF${nf0_Y?JJ580{7G8jz&i!w| zYPBo8<2Xr12>@yfeFV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=RX1jeyfNijB zQi2-_MbTS!K~QLQb+jS~+>Xg)+Qhp$CCo{N`Ta@B?km9|-?DRD4gXd(jky<;_w)s9fWb}|6&efXqXs#gYqYaM+vdHC7g%N&COjcP(EnG<2~8M{my6c$0vH; zjQiPVnG{a1hJ36fQ;_>(f|MeS9(-fbW&k=AaHVTW@&6?Aar?fWguyA zbYlPjc%0+%3K74o@ + + + + + #00aba9 + + + diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..1627c5fd5c87c0d8d82ecb23296887e87f423517 GIT binary patch literal 678 zcmV;X0$KfuP)Px#?NCfqMNDaN(f!uM|I(rU$phfIod3oXjh()};Q*d+xd!?%EotFK?(Ers3-@FXqz0LpBxBkx9 z{@}gz(>Lpz*#6)M;8FtP!`=VmUgEPu!l%6T z(Y5f@Ev}uJ$+WfH!>j(x8?c%etDML6+mzM2Ho&E7?zuCwpohY+AefIcVrU!1tWjcU zv-Zt}@4!{Xtx?UeOUJFQ%eJoS%Ts4;NTZrgv7?l~uBO?*Ezh+{ZgL09v5U#GhRe1q zq?i@8;XD8U04j7+PE!E>FTfQV*BSx=;@te&`1=x{DjF8MxhB;|+uPduFvQy4y13fg z+s^;~)Jzl+0002KNklR)ig>i(?QwqW=B#x7G84+7%YNBcK%?gA5m8LNp}}{YC|XYpf`cH4 z?tV72-40oW(Aw-==NNBY0e+aa9piX#@a;APdXzkF!6{pMeFUW>J^NX@3QIJC&(#lJ ztLIc#b5M0}d3oQ%sRgJUsDZVx7M>+bbqJg`9Lw{$4C)$(VyG^VB+#XPabEgWIf09SfcSaechcOY6Cgx@G{a;ABePT>%h=S&#LUDT#0SfONT5nC0O}VJbn-$ql>h($ M07*qoM6N<$f});Hr2qf` literal 0 HcmV?d00001 diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..047716f370d7ec5f276ca90c526780bf73824397 GIT binary patch literal 1086 zcmV-E1i|}>P)Px$J5WqiMNDaNw*Srq+_`)6yOaII2;jTb|JK+4*$d&j z)&JJI|Id*9#MJ-Roc+fJ-@MrW*p&Xn-2dV)@s|M9vDN?9(Erud|JK<5*X94_JNlNA z{lo>{ypsLI3E{e&{>Ya7#nu1T*8kQ9-n@$bzccxjMEsYN{lo^}ybO>D|K${tlGdMsF_Uqo1N##ll{al_L?eVXO-H&c9Y+80000ibW%=J04fju77`Q}&(s4G z*VpLP)AjoT+4r>*)E2U))+E&R%(A@G($m)RC8inb<>ny100068Nkl^4-tL6qXjnG?scVBej<)h+-kLm->Hy2|K5GQRL}zEJBi- zDdbW5fMz6#p|@hCViBDrNs@3to~D^vjiJjJmQSPWlEq?){09!onL;AIu|JmO=Ys$Y z=pQt{4ibe-W?N!esaBI%n6wFkc&X8-!fG_;13ru1#v7zAZ zWgXT+)vFRS*pG$5XJ$TAn>viweK1j*RSBH}f>|$kEwY+61S-s6*FaTOzw4~H0<9pU zkwt-4U)=jV%kutkG-`oG9R;!dnS9;3^EJ)C>sSvrfaBJ{R-3!NweEFo*txp0yot@} ziA`{8D_~?n@Yr>@8M5XIbUFceu&iHW*WvJ!bzplV09vgZ?{RFp&eAyB4TBS$vq38W z&%e8_JC^0#X&CID8A}@gMFG#xAx0HKR6cCiq>nlpX zuh_5~H*$htA|U#O!h5oe<1ZZdf=`W~=2z+>8Uj1fZ6Cgx@G{a;ABePT>%h=S&#LUDT#0SfONT5nC0O}VJbn-$ql>h($07*qoM6N<$ Eg2p8?asU7T literal 0 HcmV?d00001 diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..eaf78704bb9434f3eed9a3e718e6e1dccbfeffa1 GIT binary patch literal 15086 zcmdU$Yj9Op6~|AZC0LmO3k9WC7;S6CX~8n0GgVu~8SSWbXw~UVosPC2ijMlhFP*U; zbVg~XcKVR;NO;%?SSz#)k0y}hLP80T07-b{Noaty2wI0gTON|+Zr5+!yKeS9+)M5= zj$~H%Is5Fr)_?uifA4e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L|BNec0A1+}nND z_{&E3!{K5bv6ijA_8f~^)0gc!A1+?_I=O%W9;k)I=QzeqcI!OsKhyIeJ*vh%IO6#qkemwRBGgm)O9s!A2oPqnC zQZ;=g&&Fx$$}T`mS5t#{DJgLt{v+aD1EpQrUF* zygb`2Tm5bIG5_&-dX5ip5QDL)=I`ix_9*jz{i_G$w?D6H{9iozu*{#QIg#7Gz70pa z-Lb3Y(|6>E@q^c6QhIEs*az^IYq>N_Xf& z#O?prdiD3lt{-Y&yK6a?Za&xcMb`{4_l-T@aeu9!qefi%#Q&AX=wIp^2A5p*oeiI@ zuBojtTG7imVs~HIqtWB>pF literal 0 HcmV?d00001 diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png new file mode 100644 index 0000000000000000000000000000000000000000..e47d19d515050f88c38ace0cc476d074a6f0b71e GIT binary patch literal 713 zcmeAS@N?(olHy`uVBq!ia0vp^=RlZ+8A!GmDtrf0Ea{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaM|1AIbUeKHHL|G&Y0f6wH`_k_$B>F!Z*QFUVhR*#DBOBWd!K`k zt%H%ifNi6{q0sbgzOGx&a0hw2X2hRa^i;tww{=0O%fnq6hUYKLH9q>KJ?iY<%)0wd z7h3JlSCqJEiz-3Dug|M`-R^b@vshTnyj-xc=on{APmA&4bCce0Ka%NeT@b>ybB6j03!sYAw@%vleR~l1I&M--_h$iD z@u>3CHu;Yqi1_JiO1VcKv-G{}D>El(?o*Rmv2>N~$%0#SzB-Dmee__;t1F9M#DwkE z-oCS7$};^;cP+Xft*N+oi@)!AL7=A + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + diff --git a/public/site.webmanifest b/public/site.webmanifest new file mode 100644 index 00000000..53d0b63a --- /dev/null +++ b/public/site.webmanifest @@ -0,0 +1,14 @@ +{ + "name": "Cartes de Leim", + "short_name": "Cartes de Leim", + "icons": [ + { + "src": "/android-chrome-96x96.png", + "sizes": "96x96", + "type": "image/png" + } + ], + "theme_color": "#a9d1eb", + "background_color": "#a9d1eb", + "display": "standalone" +} diff --git a/src/assets/scss/_leaflet.scss b/src/assets/scss/_leaflet.scss new file mode 100644 index 00000000..8ab520e5 --- /dev/null +++ b/src/assets/scss/_leaflet.scss @@ -0,0 +1,36 @@ +@use './utils/text'; + +.leaflet-container { + margin: auto; + width: 100%; + max-width: 100%; + max-height: 100%; + background: #98bcd0 !important; + + .leaflet-map-pane { + .leaflet-tooltip-pane { + .leaflet-tooltip { + &.capital-name { + padding: .2rem .4rem; + color: #EEE; + font-weight: bold; + background: none; + border: none; + box-shadow: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + + &::before { + display: none; + } + + @include text.stroke(2, #18181b); + } + } + } + } +} + +.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 new file mode 100644 index 00000000..feaf5b78 --- /dev/null +++ b/src/assets/scss/theme.scss @@ -0,0 +1,5 @@ +@use './leaflet'; + +html { + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; +} \ No newline at end of file diff --git a/src/assets/scss/utils/_text.scss b/src/assets/scss/utils/_text.scss new file mode 100644 index 00000000..49e17613 --- /dev/null +++ b/src/assets/scss/utils/_text.scss @@ -0,0 +1,24 @@ +/// Stroke font-character +/// @param {Integer} $stroke - Stroke width +/// @param {Color} $color - Stroke color +/// @return {List} - text-shadow list +@function stroke($stroke, $color) { + $shadow: (); + $from: $stroke*-1; + + @for $i from $from through $stroke { + @for $j from $from through $stroke { + $shadow: append($shadow, $i*1px $j*1px 0 $color, comma); + } + } + + @return $shadow; +} + +/// Stroke font-character +/// @param {Integer} $stroke - Stroke width +/// @param {Color} $color - Stroke color +/// @return {Style} - text-shadow +@mixin stroke($stroke, $color) { + text-shadow: stroke($stroke, $color); +} diff --git a/src/components/maps/AllianceKaldelienne.astro b/src/components/maps/AllianceKaldelienne.astro index 79099776..dcb564fa 100644 --- a/src/components/maps/AllianceKaldelienne.astro +++ b/src/components/maps/AllianceKaldelienne.astro @@ -1,6 +1,16 @@ +--- +import type { MapMarker } from '@/types/Leaflet'; + +interface Props { + markers: MapMarker; +} + +const { markers } = Astro.props +--- +
- - \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 5b6c4eb8..3a5f02d3 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -7,15 +7,22 @@ const { title } = Astro.props; --- - + - {title} + + + + + + + + @@ -28,32 +35,7 @@ const { title } = Astro.props; - diff --git a/src/pages/api/data/alliance.markers.ts b/src/pages/api/data/alliance.markers.ts new file mode 100644 index 00000000..5b4d1bde --- /dev/null +++ b/src/pages/api/data/alliance.markers.ts @@ -0,0 +1,603 @@ +import type { MapMarker } from "@/types/Leaflet"; + +export const allianceMarkers: MapMarker[] = [ + { + 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", + markerCoords: { + x: 83.6, + y: -185.2, + } + }, + { + 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", + markerCoords: { + x: 133.46875, + y: -146.0625 , + } + }, + { + group: "capitals", + title: "Bordelac", + description: "Chef-lieu des Hautes-Berges", + link: "https://alexcreates.fr/leim/index.php?title=Bordelac", + markerCoords: { + x: 151.22656, + y: -173.63281, + } + }, + { + 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", + markerCoords: { + x: 132.26953, + y: -98.19141, + } + }, + { + group: "capitals", + title: "Valsoie", + description: "Chef-lieu de Mireloin.", + link: "https://alexcreates.fr/leim/index.php?title=Valsoie", + markerCoords: { + x: 103.4375, + y: -79.5, + } + }, + { + group: "capitals", + title: "Prismalline", + description: "Chef-lieu de Corambre.", + link: "https://alexcreates.fr/leim/index.php?title=Prismalline", + markerCoords: { + x: 103.00329, + y: -138.02162, + } + }, + { + group: "capitals", + title: "Port-brisé", + description: "Chef-lieu d'Émerose.", + link: "https://alexcreates.fr/leim/index.php?title=Port-brisé", + markerCoords: { + x: 168.39491, + y: -109.13376, + } + }, + { + group: "capitals", + title: "Berce", + description: "Chef-lieu des Basses-berges.", + link: "https://alexcreates.fr/leim/index.php?title=Berce", + markerCoords: { + x: 173.39874, + y: -164.39011, + } + }, + { + group: "capitals", + title: "Lamière", + description: "Chef-lieu de Quillon.", + link: "https://alexcreates.fr/leim/index.php?title=Lamière", + markerCoords: { + x: 140.20731, + y: -195.77923, + } + }, + { + group: "capitals", + title: "Halport", + description: "Chef-lieu de Lagarde.", + link: "https://alexcreates.fr/leim/index.php?title=Halport", + markerCoords: { + x: 76.6803, + y: -198.76159, + } + }, + { + group: "capitals", + title: "Soubreciel", + description: "Chef-lieu de Rougefer.", + link: "https://alexcreates.fr/leim/index.php?title=Soubreciel", + markerCoords: { + x: 204.42515, + y: -226.85883, + } + }, + { + group: "capitals", + title: "Dramast", + description: "Chef-lieu d'Asharos.", + link: "https://alexcreates.fr/leim/index.php?title=Dramast", + markerCoords: { + x: 119.35456, + y: -27.53623, + } + }, + { + group: "capitals", + title: "Briseroc", + description: "Chef-lieu de Pergaré.", + link: "https://alexcreates.fr/leim/index.php?title=Briseroc", + markerCoords: { + x: 41.96763, + y: -48.83056, + } + }, + { + group: "capitals", + 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", + markerCoords: { + x: 204.75462, + y: -116.80687, + } + }, + { + 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", + markerCoords: { + x: 138.44531, + y: -51.54687, + } + }, + { + group: "cities", + title: "Alcombe", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Alcombe", + markerCoords: { + x: 165.42471, + y: -164.00393, + } + }, + { + group: "cities", + title: "Cristaline", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Cristaline", + markerCoords: { + x: 167.06242, + y: -176.47233, + } + }, + { + group: "cities", + title: "Vidinamel", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Vidinamel", + markerCoords: { + x: 176.40469, + y: -199.94666, + } + }, + { + group: "cities", + title: "Cantane", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Cantane", + markerCoords: { + x: 196.00387, + y: -210.9071, + } + }, + { + group: "cities", + title: "Horfer", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Horfer", + markerCoords: { + x: 185.57431, + y: -229.08588, + } + }, + { + group: "cities", + title: "Cimeterre", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Cimeterre", + markerCoords: { + x: 143.16512, + y: -217.37201, + } + }, + { + group: "cities", + title: "Aubert", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Aubert", + markerCoords: { + x: 140.19456, + y: -201.85993, + } + }, + { + group: "cities", + title: "Telos", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Telos", + markerCoords: { + x: 104.61938, + y: -204.35683, + } + }, + { + group: "cities", + title: "Saint-Amanthe", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Saint-Amanthe", + markerCoords: { + x: 83.88068, + y: -196.35341, + } + }, + { + group: "cities", + title: "Flauvent", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Flauvent", + markerCoords: { + x: 77.58332, + y: -210.22326, + } + }, + { + group: "cities", + title: "Nardion", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Nardion", + markerCoords: { + x: 43.56226, + y: -218.19662, + } + }, + { + group: "cities", + title: "Granvert", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Granvert", + markerCoords: { + x: 63.47312, + y: -192.67867, + } + }, + { + group: "cities", + title: "Olydra", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Olydra", + markerCoords: { + x: 92.24383, + y: -179.9298, + } + }, + { + group: "cities", + title: "Vermeil", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Vermeil", + markerCoords: { + x: 98.86066, + y: -185.63039, + } + }, + { + group: "cities", + title: "Corindon", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Corindon", + markerCoords: { + x: 85.04465, + y: -173.44829, + } + }, + { + group: "cities", + title: "Verdame", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Verdame", + markerCoords: { + x: 93.64841, + y: -155.23226, + } + }, + { + group: "cities", + title: "Sellier", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Sellier", + markerCoords: { + x: 112.8161, + y: -165.85315, + } + }, + { + group: "cities", + title: "Fort-Altare", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Fort-Altare", + markerCoords: { + x: 123.1809, + y: -156.79472, + } + }, + { + group: "cities", + title: "Naegir", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Naegir", + markerCoords: { + x: 111.22838, + y: -142.46072, + } + }, + { + group: "cities", + title: "Silène", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Silène", + markerCoords: { + x: 129.49372, + y: -127.83022, + } + }, + { + group: "cities", + title: "Astelion", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Astelion", + markerCoords: { + x: 149.80364, + y: -141.47096, + } + }, + { + group: "cities", + title: "Mythuse", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Mythuse", + markerCoords: { + x: 101.52778, + y: -119.3854, + } + }, + { + group: "cities", + title: "Celadonis", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Celadonis", + markerCoords: { + x: 121.39631, + y: -107.59972, + } + }, + { + group: "cities", + title: "Mestrl", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Mestrl", + markerCoords: { + x: 141.59822, + y: -112.96104, + } + }, + { + group: "cities", + title: "Pyranae", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Pyranae", + markerCoords: { + x: 191.89054, + y: -166.99251, + } + }, + { + group: "cities", + title: "Liserios", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Liserios", + markerCoords: { + x: 187.69872, + y: -101.89283, + } + }, + { + group: "cities", + title: "Armistille", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Armistille", + markerCoords: { + x: 187.72908, + y: -111.21423, + } + }, + { + group: "cities", + title: "Gasterre", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Gasterre", + markerCoords: { + x: 167.39995, + y: -144.62217, + } + }, + { + group: "cities", + title: "Valversant", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Valversant", + markerCoords: { + x: 177.56325, + y: -156.35054, + } + }, + { + group: "cities", + title: "Becqueraut", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Becqueraut", + markerCoords: { + x: 129.06038, + y: -190.31194, + } + }, + { + group: "cities", + title: "Grasselieu", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Grasselieu", + markerCoords: { + x: 148.54698, + y: -185.44567, + } + }, + { + group: "cities", + title: "Asandre", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Asandre", + markerCoords: { + x: 125.35658, + y: -95.44555, + } + }, + { + group: "cities", + title: "Félisse", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Félisse", + markerCoords: { + x: 138.45867, + y: -87.15509, + } + }, + { + group: "cities", + title: "Félisse", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Félisse", + markerCoords: { + x: 151.79771, + y: -89.78763, + } + }, + { + group: "cities", + title: "Anderol", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Anderol", + markerCoords: { + x: 88.08019, + y: -76.54403, + } + }, + { + group: "cities", + title: "Denteloin", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Denteloin", + markerCoords: { + x: 99.26192, + y: -94.88901, + } + }, + { + group: "cities", + title: "Willeau", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Willeau", + markerCoords: { + x: 107.50352, + y: -67.36631, + } + }, + { + group: "cities", + title: "Borglah", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Borglah", + markerCoords: { + x: 91.03982, + y: -57.75967, + } + }, + { + group: "cities", + title: "Karlas", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Karlas", + markerCoords: { + x: 133.5332, + y: -44.42783, + } + }, + { + group: "cities", + title: "Sérak", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Sérak", + markerCoords: { + x: 127.10271, + y: -18.2676, + } + }, + { + group: "cities", + title: "Plumeroche", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Plumeroche", + markerCoords: { + x: 52.68144, + y: -44.71821, + } + }, + { + group: 'landmarks', + title: "L'Ange d'Aldys", + description: "", + markerCoords: { + x: 89.08707, + y: -166.49361, + } + }, + { + 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", + markerCoords: { + x: 168.31641, + y: -60.54297, + } + }, + { + group: 'landmarks', + title: "Solemthelio", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Solemthelio", + markerCoords: { + x: 174.22358, + y: -197.04778, + } + }, + { + group: 'landmarks', + title: "Temple du soleil", + description: "", + link: "https://alexcreates.fr/leim/index.php?title=Temple du soleil", + markerCoords: { + x: 58.89295, + y: -189.69308, + } + } +]; diff --git a/src/pages/api/markers.json.ts b/src/pages/api/markers.json.ts new file mode 100644 index 00000000..ae503bed --- /dev/null +++ b/src/pages/api/markers.json.ts @@ -0,0 +1,8 @@ +import type { APIRoute } from "astro"; +import { allianceMarkers } from "./data/alliance.markers"; + +export const GET: APIRoute = ({ params, request }) => { + return new Response( + JSON.stringify(allianceMarkers) + ) +} \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 15d1ba1d..a54e705d 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,8 +1,11 @@ --- import Layout from '../layouts/Layout.astro'; import AllianceKaldelienne from '../components/maps/AllianceKaldelienne.astro' + +const res = await fetch('http://localhost:4321/api/markers.json'); +const data = await res.json(); --- - - + + diff --git a/src/types/Leaflet.ts b/src/types/Leaflet.ts new file mode 100644 index 00000000..f45b8dbc --- /dev/null +++ b/src/types/Leaflet.ts @@ -0,0 +1,12 @@ +export type MapMarkerGroup = "capitals" | "cities" | "towns" | "landmarks"; + +export type MapMarker = { + title: string, + markerCoords: { + x: number, + y: number, + } + description?: string, + link?: string, + group?: MapMarkerGroup, +} diff --git a/tsconfig.json b/tsconfig.json index 77da9dd0..f363b6b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,9 @@ { - "extends": "astro/tsconfigs/strict" + "extends": "astro/tsconfigs/strict", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["src/*"], + } + } } \ No newline at end of file