Compare commits
30 Commits
1.4.11
...
53cd12ac4d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53cd12ac4d | ||
|
|
dae2bb7524 | ||
|
|
b06ef38fd7 | ||
|
|
2e0884a6b7 | ||
|
|
d43b7761f0 | ||
|
|
7164ec65b9 | ||
|
|
e7a793a25e | ||
|
|
5198dcf656 | ||
|
|
39a4f91e2e | ||
|
|
ae3bd70e3c | ||
|
|
3b70b878a4 | ||
|
|
232ef4d914 | ||
|
|
df81c74d76 | ||
|
|
d85708a571 | ||
|
|
3911e55a6c | ||
|
|
c09df15821 | ||
|
|
defd3968fd | ||
|
|
0386cc3fe0 | ||
|
|
832c37ef9d | ||
|
|
f2f42c0400 | ||
|
|
d49d5e79f2 | ||
|
|
4209771189 | ||
|
|
e43baa13da | ||
|
|
b243c3129d | ||
|
|
3f60672bb0 | ||
|
|
5792d7d15f | ||
|
|
91ea78c632 | ||
|
|
961fd0d198 | ||
|
|
1cba7b398b | ||
|
|
05d3bca10b |
12
README.md
12
README.md
@@ -8,8 +8,18 @@
|
||||
* Measure distances between two points
|
||||
* Custom client-side markers
|
||||
|
||||
## Documentation
|
||||
### Making usable map assets
|
||||
Since we're not using earth maps, we need to build one compatible with Leaflet. I used Zoomify to generate usable tile data from my SVG maps. I don't know if this will fit your use case ; if you use something else, you can contact me !
|
||||
|
||||
> [!IMPORTANT]
|
||||
> As of writing this, it appears Zoomify Unlimited Converter (which is what I used) is not available on Linux or for download anymore
|
||||
|
||||
### Enabling features
|
||||
Some features are able to be toggled on and off. If you don't use multiple languages, or if you don't want the custom markers, you can disable them in the .env file. By default, all of them are true.
|
||||
|
||||
## Contributing
|
||||
I'm not currently accepting pull-requests for this project, but if you have a suggestion, feel free to contact me !
|
||||
|
||||
## Notes
|
||||
As someone with some degree of with [aphantasia](https://en.wikipedia.org/wiki/Aphantasia), I struggle with visualization and immersion, and DMing in general. If you find yourself in the same situation, I hope my little thing made your life easier !
|
||||
As someone with some degree of [aphantasia](https://en.wikipedia.org/wiki/Aphantasia), I struggle with visualization and immersion, and DMing in general. If you find yourself in the same situation, I hope my little thing made your life easier !
|
||||
|
||||
@@ -17,5 +17,14 @@ export default defineConfig({
|
||||
ENABLE_BREADCRUMB: envField.boolean({ context: "server", access: "secret", default: true }),
|
||||
ENABLE_I18N: envField.boolean({ context: "server", access: "secret", default: true }),
|
||||
}
|
||||
},
|
||||
vite: {
|
||||
server: {
|
||||
watch: {
|
||||
ignored: [
|
||||
'**/dist/**', // dist shouldn't be watched
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
22
package.json
22
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "leim-maps",
|
||||
"type": "module",
|
||||
"version": "1.4.11",
|
||||
"version": "1.4.14",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
@@ -10,18 +10,18 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/sitemap": "^3.4.1",
|
||||
"@astrojs/vue": "^5.1.0",
|
||||
"@nanostores/persistent": "1.0.0",
|
||||
"@nanostores/vue": "^1.0.0",
|
||||
"@types/leaflet": "^1.9.18",
|
||||
"@vueuse/core": "^13.4.0",
|
||||
"astro": "^5.10.0",
|
||||
"nanostores": "^1.0.1",
|
||||
"@astrojs/sitemap": "^3.7.3",
|
||||
"@astrojs/vue": "^7.0.1",
|
||||
"@nanostores/persistent": "1.3.4",
|
||||
"@nanostores/vue": "^1.1.0",
|
||||
"@types/leaflet": "^1.9.21",
|
||||
"@vueuse/core": "^14.3.0",
|
||||
"astro": "^7.0.7",
|
||||
"nanostores": "^1.4.0",
|
||||
"radix-vue": "^1.9.17",
|
||||
"vue": "^3.5.17"
|
||||
"vue": "^3.5.39"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sass": "^1.89.2"
|
||||
"sass": "^1.101.0"
|
||||
}
|
||||
}
|
||||
|
||||
5226
pnpm-lock.yaml
generated
5226
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
||||
allowBuilds:
|
||||
'@parcel/watcher': true
|
||||
esbuild: true
|
||||
sharp: true
|
||||
vue-demi: true
|
||||
onlyBuiltDependencies:
|
||||
- '@parcel/watcher'
|
||||
- esbuild
|
||||
|
||||
BIN
public/leaflet/images/marker-icon-2x.png
Normal file
BIN
public/leaflet/images/marker-icon-2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
public/leaflet/images/marker-icon.png
Normal file
BIN
public/leaflet/images/marker-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
public/leaflet/images/marker-shadow.png
Normal file
BIN
public/leaflet/images/marker-shadow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -1,13 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import { useDark, useToggle } from '@vueuse/core'
|
||||
|
||||
import { currentLang, t } from '@/i18n/store';
|
||||
|
||||
const isDark = useDark({ storageKey: "theme", disableTransition: false })
|
||||
const toggleDark = useToggle(isDark)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div data-theme-toggle id="theme-switcher" class="wrapper appear-from-top">
|
||||
<button @click="toggleDark()" class="btn-round">
|
||||
<button @click="toggleDark()" class="btn-round" :title="t('nav.theme.aria-label')">
|
||||
<svg v-if="isDark" xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M120,40V32a8,8,0,0,1,16,0v8a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-8-8A8,8,0,0,0,50.34,61.66Zm0,116.68-8,8a8,8,0,0,0,11.32,11.32l8-8a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l8-8a8,8,0,0,0-11.32-11.32l-8,8A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l8,8a8,8,0,0,0,11.32-11.32ZM40,120H32a8,8,0,0,0,0,16h8a8,8,0,0,0,0-16Zm88,88a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-8A8,8,0,0,0,128,208Zm96-88h-8a8,8,0,0,0,0,16h8a8,8,0,0,0,0-16Z"></path></svg>
|
||||
<svg v-else xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"></path></svg>
|
||||
</button>
|
||||
|
||||
@@ -21,9 +21,10 @@ export const translations: LanguageDict = {
|
||||
'capitals': 'Capitales',
|
||||
'points-of-interest': 'Points d\'intérêt',
|
||||
'personals': 'Personnels',
|
||||
'nav.aria-label': 'Navigation principale',
|
||||
'nav.aria-label': 'Menu principal',
|
||||
'nav.map.aria-label': 'Changer de carte',
|
||||
'nav.lang.aria-label': 'Changer de langue',
|
||||
'nav.theme.aria-label': 'Changer de thème',
|
||||
'maps.go-to-map': 'Voir la carte détaillée',
|
||||
'maps.go-to-player': 'Aller à la position actuelle des joueurs',
|
||||
'maps.seeQuest': 'Voir la quête',
|
||||
@@ -44,8 +45,8 @@ export const translations: LanguageDict = {
|
||||
<h3>Données personnelles</h3>
|
||||
<p>Je ne collecte aucune donnée sur votre activité dans cette application. Les marqueurs personnalisés que vous pouvez placer n'existent que sur votre navigateur en tant que données de <a href="https://developer.mozilla.org/fr/docs/Web/API/Window/localStorage" target="_blank">local storage</a>.</p>
|
||||
<p>Mon hébergeur collecte des données de trafic pour des raisons de sécurité ; comme les adresses IP et leur emplacement approximatif, les types de navigateurs, les agents utilisateurs (si vous êtes un robot ou un humain) et l'état de la demande. </p>
|
||||
<p>Ce site n'utilise pas de pixels de suivi ou d'analyse, et je n'utilise aucune autre application tierce qui pourrait collecter des données sur vous (comme Youtube ou autre).</p>
|
||||
<p>Malgré cela, <strong>aucune de vos données n'est vendue ou transmise à un tiers quel qu'il soit</strong>.</p>
|
||||
<p>J'utilise une instance Matomo pour mesurer l'audience du site, mais les données sont anonymisées et je ne construis aucun profil à partir de ces dernières.</p>
|
||||
<p><strong>Aucune de vos données n'est vendue ou transmise à un tiers quel qu'il soit</strong>.</p>
|
||||
<p>Si vous avez des questions, vous pouvez me contacter à <a href="mailto:contact@alexcreates.fr">contact@alexcreates.fr</a>.</p>
|
||||
`
|
||||
},
|
||||
@@ -65,9 +66,10 @@ export const translations: LanguageDict = {
|
||||
'capitals': 'Capitals',
|
||||
'points-of-interest': 'Points of interest',
|
||||
'personals': 'Personals',
|
||||
'nav.aria-label': 'Main navigation',
|
||||
'nav.aria-label': 'Main menu',
|
||||
'nav.map.aria-label': 'Switch map',
|
||||
'nav.lang.aria-label': 'Switch language',
|
||||
'nav.theme.aria-label': 'Switch color theme',
|
||||
'maps.go-to-map': 'See detailed map',
|
||||
'maps.go-to-player': 'Go to current players position',
|
||||
'maps.seeQuest': 'See the quest',
|
||||
@@ -88,9 +90,11 @@ export const translations: LanguageDict = {
|
||||
<h3>Privacy</h3>
|
||||
<p>I don't collect any data of your activity with this app. The custom markers that you may place only exist on your browser as <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage" target="_blank">local storage</a> data.</p>
|
||||
<p>My hosting provider collects traffic data for security reasons ; like IP addresses and their approximate location, browsers types, user agents (if you're a robot or a human) and the request status.</p>
|
||||
<p>This website doesn't use any tracking pixels or analytics, and I don't use any other third-party app that might collect stuff from you (like Youtube or anything else)</p>
|
||||
<p>Regardless, <strong>none of your data is sold or passed to any third-party whatsoever</strong>.</p>
|
||||
<p>This website doesn't use any other third-party app that might collect stuff from you (like Youtube or anything else)</p>
|
||||
<p>I do use a self-hosted Matomo Instance to measure website audience, but data is anonymised and I don't build profiles with it.</p>
|
||||
<p><strong>None of your data is sold or passed to any third-party whatsoever</strong>.</p>
|
||||
<p>If you have any questions, you can contact me at <a href="mailto:contact@alexcreates.fr">contact@alexcreates.fr</a>.</p>
|
||||
`
|
||||
}
|
||||
} as const;
|
||||
|
||||
@@ -16,6 +16,13 @@ const lang = getLangFromUrl(Astro.url) || defaultLang;
|
||||
<!doctype html>
|
||||
<html lang={lang}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{title} — Leim Wiki</title>
|
||||
|
||||
<script is:inline src="/leaflet/leaflet.js" />
|
||||
<script is:inline type="text/javascript" src="/js/leaflet-measure.min.js"></script>
|
||||
<script is:inline type="text/javascript" src="/js/leaflet-zoomify.min.js"></script>
|
||||
<script>
|
||||
import { setLang } from "@/i18n/store";
|
||||
import { defaultLang, type Language } from "@/i18n/ui";
|
||||
@@ -25,12 +32,21 @@ const lang = getLangFromUrl(Astro.url) || defaultLang;
|
||||
setLang(currentLang || defaultLang);
|
||||
</script>
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="stylesheet" href="/leaflet/leaflet.css" rel="preload" />
|
||||
<link rel="stylesheet" href="/leaflet-measure/leaflet-measure.css" rel="preload" />
|
||||
|
||||
<meta name="author" content="Alexis Pelé" />
|
||||
{head?.description && <meta name="description" content={head.description} /> }
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta property="og:author" content="Alexis Pelé" />
|
||||
<meta property="og:locale" content={lang}>
|
||||
<meta name="application-name" content="leim-maps">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="msapplication-config" content="none">
|
||||
|
||||
{head?.description && (
|
||||
<meta name="description" content={head.description} />
|
||||
<meta property="og:description" content={head.description} />
|
||||
)}
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{title} — Leim Wiki</title>
|
||||
|
||||
<link rel="canonical" href={Astro.url}>
|
||||
|
||||
@@ -41,22 +57,33 @@ const lang = getLangFromUrl(Astro.url) || defaultLang;
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#6595b4">
|
||||
<meta name="msapplication-TileColor" content="#00aba9">
|
||||
<meta name="theme-color" content="#a9d1eb">
|
||||
<meta name="color-scheme" content="dark light">
|
||||
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={Astro.url} />
|
||||
{head?.image && <meta property="og:image" content={head.image} />}
|
||||
|
||||
{head?.description && <meta name="twitter:description" content={head.description} /> }
|
||||
{head?.image && <meta property="twitter:image" content={head.image} />}
|
||||
|
||||
<link rel="stylesheet" href="/leaflet/leaflet.css" rel="preload" />
|
||||
<script is:inline src="/leaflet/leaflet.js" />
|
||||
|
||||
<script is:inline type="text/javascript" src="/js/leaflet-zoomify.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/leaflet-measure/leaflet-measure.css" rel="preload" />
|
||||
<script is:inline type="text/javascript" src="/js/leaflet-measure.min.js"></script>
|
||||
{head?.image && (
|
||||
<meta property="og:image" content={`${Astro.site?.origin}${head.image}`} />
|
||||
<meta name="twitter:image" content={`${Astro.site?.origin}${head.image}`} />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
)}
|
||||
<!-- Matomo -->
|
||||
<script is:inline>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//stats.alexcreates.fr/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '3']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
||||
</head>
|
||||
<body>
|
||||
<script is:inline>
|
||||
|
||||
@@ -4,7 +4,12 @@ import Map from '@/components/maps/Map.astro'
|
||||
import MapOverlay from '@/components/maps/MapOverlay.astro'
|
||||
---
|
||||
|
||||
<Layout title="Borélis ~ Maps">
|
||||
<Layout
|
||||
title="Borélis ~ Maps"
|
||||
head={{
|
||||
description: "Map of Borélis, a harbour city on the northern shores of the Kaldelium Accord."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='aldys-borelis'
|
||||
searchConfig={{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import type { MapMarker, PlayerMarker } from '@/types/Leaflet';
|
||||
import type { MapMarker } from '@/types/Leaflet';
|
||||
|
||||
import Layout from '@/layouts/Layout.astro';
|
||||
import Map from '@/components/maps/Map.astro'
|
||||
@@ -10,7 +10,12 @@ import markersData from '@/components/maps/data/en/aldys/cantane/markers.json'
|
||||
const markers = markersData.data as MapMarker[]
|
||||
---
|
||||
|
||||
<Layout title="Cantane ~ Maps">
|
||||
<Layout
|
||||
title="Cantane ~ Maps"
|
||||
head={{
|
||||
description: "Map of the old city of Cantane, south of the Kaldelium Accord."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='aldys-cantane'
|
||||
markers={markers}
|
||||
|
||||
@@ -10,7 +10,12 @@ import markersData from '@/components/maps/data/en/aldys/cantane/les-mines-blanc
|
||||
const markers = markersData.data as MapMarker[]
|
||||
---
|
||||
|
||||
<Layout title="White Hollow ~ Maps">
|
||||
<Layout
|
||||
title="White Hollow ~ Maps"
|
||||
head={{
|
||||
description: "Map of the White Hollow mining complex, left abandonned east of Cantane."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='aldys-cantane-mines'
|
||||
markers={markers}
|
||||
|
||||
@@ -12,7 +12,12 @@ const markers = markersData.data as MapMarker[]
|
||||
const players = playersData as PlayerMarker
|
||||
---
|
||||
|
||||
<Layout title="Bamast ~ Maps">
|
||||
<Layout
|
||||
title="Bamast ~ Maps"
|
||||
head={{
|
||||
description: "Map of the archipelago of Bamast and its many islands in the Balamian Ocean."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='bamast'
|
||||
markers={markers}
|
||||
|
||||
@@ -16,8 +16,8 @@ const players = playersData as PlayerMarker
|
||||
title="Aldys ~ Maps"
|
||||
head={
|
||||
{
|
||||
description: "Carte de l'Alliance Kaldélienne sur la planète de Léim.",
|
||||
image: '/images/bailey-zindel-NRQV-hBF10M-unsplash.jpg'
|
||||
description: "Map of the Aldys continent on the planet of Léim, displaying the Kaldelium accord and the Common Lands of Syaltha.",
|
||||
image: '/bailey-zindel-NRQV-hBF10M-unsplash.jpg'
|
||||
}
|
||||
}
|
||||
>
|
||||
|
||||
@@ -4,7 +4,12 @@ import Map from '@/components/maps/Map.astro'
|
||||
import MapOverlay from '@/components/maps/MapOverlay.astro'
|
||||
---
|
||||
|
||||
<Layout title="Borélis ~ Cartographie">
|
||||
<Layout
|
||||
title="Borélis ~ Cartographie"
|
||||
head={{
|
||||
description: "Carte de la ville côtière de Borélis, sur les côtes gelées au nord de l'Alliance Kaldélienne."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='aldys-borelis'
|
||||
searchConfig={{
|
||||
|
||||
@@ -10,7 +10,12 @@ import markersData from '@/components/maps/data/fr/aldys/cantane/markers.json'
|
||||
const markers = markersData.data as MapMarker[]
|
||||
---
|
||||
|
||||
<Layout title="Cantane ~ Cartographie">
|
||||
<Layout
|
||||
title="Cantane ~ Cartographie"
|
||||
head={{
|
||||
description: "Carte de la ville de Cantane, au sud de l'Alliance Kaldélienne."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='aldys-cantane'
|
||||
markers={markers}
|
||||
|
||||
@@ -10,7 +10,12 @@ import markersData from '@/components/maps/data/fr/aldys/cantane/les-mines-blanc
|
||||
const markers = markersData.data as MapMarker[]
|
||||
---
|
||||
|
||||
<Layout title="Les Mines Blanches ~ Cartographie">
|
||||
<Layout
|
||||
title="Les Mines Blanches ~ Cartographie"
|
||||
head={{
|
||||
description: "Cartographie du complexe des Mines Blanches, laissé à l'abandon à l'est de Cantane."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='aldys-cantane-mines'
|
||||
markers={markers}
|
||||
|
||||
@@ -12,7 +12,12 @@ const markers = markersData.data as MapMarker[]
|
||||
const players = playersData as PlayerMarker
|
||||
---
|
||||
|
||||
<Layout title="Bamast ~ Cartographie">
|
||||
<Layout
|
||||
title="Bamast ~ Cartographie"
|
||||
head={{
|
||||
description: "Carte de l'Archipel de Bamast et ses nombreuses îles de l'Océan Balamien."
|
||||
}}
|
||||
>
|
||||
<MapOverlay
|
||||
mapKey='bamast'
|
||||
markers={markers}
|
||||
|
||||
@@ -16,8 +16,8 @@ const players = playersData as PlayerMarker
|
||||
title="Aldys ~ Cartographie"
|
||||
head={
|
||||
{
|
||||
description: "Carte de l'Alliance Kaldélienne sur la planète de Léim.",
|
||||
image: '/images/bailey-zindel-NRQV-hBF10M-unsplash.jpg'
|
||||
description: "Carte du continent Aldys sur la planète de Léim, comprenant l'Alliance Kaldélienne et les Terres de Syaltha.",
|
||||
image: '/bailey-zindel-NRQV-hBF10M-unsplash.jpg'
|
||||
}
|
||||
}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user