Compare commits
4 commits
427a3fadbb
...
d6576a5004
Author | SHA1 | Date | |
---|---|---|---|
d6576a5004 | |||
18c7ccd084 | |||
999e912021 | |||
926a5c3d86 |
7 changed files with 77 additions and 8 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
10
package.json
10
package.json
|
@ -21,10 +21,10 @@
|
||||||
"leaflet-defaulticon-compatibility": "^0.1.2"
|
"leaflet-defaulticon-compatibility": "^0.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cloudflare/workers-types": "^4.20241112.0",
|
"@cloudflare/workers-types": "^4.20241127.0",
|
||||||
"@sveltejs/adapter-cloudflare": "^4.7.4",
|
"@sveltejs/adapter-cloudflare": "^4.7.4",
|
||||||
"@sveltejs/kit": "^2.8.4",
|
"@sveltejs/kit": "^2.8.5",
|
||||||
"@sveltejs/vite-plugin-svelte": "^4.0.2",
|
"@sveltejs/vite-plugin-svelte": "^5.0.1",
|
||||||
"@types/eslint": "^9.6.1",
|
"@types/eslint": "^9.6.1",
|
||||||
"@types/leaflet": "^1.9.14",
|
"@types/leaflet": "^1.9.14",
|
||||||
"eslint": "^9.15.0",
|
"eslint": "^9.15.0",
|
||||||
|
@ -33,11 +33,11 @@
|
||||||
"globals": "^15.12.0",
|
"globals": "^15.12.0",
|
||||||
"prettier": "^3.4.1",
|
"prettier": "^3.4.1",
|
||||||
"prettier-plugin-svelte": "^3.3.2",
|
"prettier-plugin-svelte": "^3.3.2",
|
||||||
"svelte": "^5.2.8",
|
"svelte": "^5.2.11",
|
||||||
"svelte-check": "^4.1.0",
|
"svelte-check": "^4.1.0",
|
||||||
"typescript": "^5.7.2",
|
"typescript": "^5.7.2",
|
||||||
"typescript-eslint": "^8.16.0",
|
"typescript-eslint": "^8.16.0",
|
||||||
"vite": "^5.4.11"
|
"vite": "^6.0.1"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
|
|
22
src/app.css
22
src/app.css
|
@ -1,8 +1,30 @@
|
||||||
@import "@fontsource-variable/inter";
|
@import "@fontsource-variable/inter";
|
||||||
@import "@fontsource-variable/inter/wght-italic.css";
|
@import "@fontsource-variable/inter/wght-italic.css";
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--background-color: white;
|
||||||
|
--text-color: black;
|
||||||
|
--accent-color: #0077b8;
|
||||||
|
color-scheme: light;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--background-color: #16191d;
|
||||||
|
--text-color: #f8f9fa;
|
||||||
|
--accent-color: #a5d8ff;
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Inter Variable", sans-serif;
|
font-family: "Inter Variable", sans-serif;
|
||||||
|
background-color: var(--background-color);
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contents {
|
.contents {
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
const zoom = 13;
|
const zoom = 13;
|
||||||
const center: [number, number] = [45.742858495, 4.86163814];
|
const center: [number, number] = [45.742858495, 4.86163814];
|
||||||
|
|
||||||
|
const metroIcon = new L.Icon({ iconUrl: "/metro.svg", iconSize: [29, 15] });
|
||||||
|
const tramIcon = new L.Icon({ iconUrl: "/tram.svg", iconSize: [29, 15] });
|
||||||
|
|
||||||
let mapPromise = $state(fetchMap());
|
let mapPromise = $state(fetchMap());
|
||||||
let gamePromise = $state(fetchGame());
|
let gamePromise = $state(fetchGame());
|
||||||
let isChecking = $state(false);
|
let isChecking = $state(false);
|
||||||
|
@ -53,8 +56,10 @@
|
||||||
mapData.lines.forEach(([feature, color]) => {
|
mapData.lines.forEach(([feature, color]) => {
|
||||||
L.geoJSON(feature, { style: { color } }).addTo(map!);
|
L.geoJSON(feature, { style: { color } }).addTo(map!);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const icon = $page.url.searchParams.get("stops_type") === "tram" ? tramIcon : metroIcon;
|
||||||
mapData.stops.forEach((coords) => {
|
mapData.stops.forEach((coords) => {
|
||||||
const marker = L.marker(coords).addTo(map!);
|
const marker = L.marker(coords, { icon }).addTo(map!);
|
||||||
marker.on("click", (e) => setMarker(e.latlng));
|
marker.on("click", (e) => setMarker(e.latlng));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
<h1>Score total: {totalScore}</h1>
|
<h1>Score total: {totalScore}</h1>
|
||||||
|
|
||||||
<span>Mode: <b>{mode}</b></span>
|
<span>Mode: <b>{mode}</b> - Arrêts: <b>{stops_type}</b></span>
|
||||||
|
|
||||||
{#if name !== null}
|
{#if name !== null}
|
||||||
<span>Joué par {name}</span>
|
<span>Joué par {name}</span>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
td {
|
td {
|
||||||
border: 1px solid black;
|
border: 1px solid var(--text-color);
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
static/metro.svg
Normal file
21
static/metro.svg
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="138" height="72" id="svg2" version="1.1" inkscape:version="0.48.1 " sodipodi:docname="_logo-generic.svg">
|
||||||
|
<defs id="defs4"/>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6568542" inkscape:cx="65.794397" inkscape:cy="47.944674" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1280" inkscape:window-height="968" inkscape:window-x="-4" inkscape:window-y="-4" inkscape:window-maximized="1"/>
|
||||||
|
<metadata id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
<dc:title/>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g inkscape:groupmode="layer" id="layer1" inkscape:label="Calque">
|
||||||
|
<flowRoot xml:space="preserve" id="flowRoot2988" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><flowRegion id="flowRegion2990"><rect id="rect2992" width="60" height="46" x="9" y="9"/></flowRegion><flowPara id="flowPara2994"/></flowRoot> <path style="fill:#ee1c25;fill-opacity:1;stroke:none" d="M 10.306041,-9.708713e-5 128,0 c 11.1875,18.5 10,36 10,36 0,0 0.82757,18.63169 -10,36 l -117.702238,9.7e-5 c -11.5644706,-18.863868 -9.93826201,-36 -9.93826201,-36 0,0 -1.91764309,-16.028869 9.94654101,-36.00019408713 z" id="rect3764" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccc"/>
|
||||||
|
<g transform="translate(-7.7333374,1.1003853)" style="font-size:70px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Confluence;-inkscape-font-specification:Confluence Bold" id="flowRoot3766">
|
||||||
|
<path d="m 51.363037,9.3035893 -1.890564,53.6920167 10.010376,0 0.350342,-38.430786 1.540222,5.039367 10.00824,33.391419 10.010376,0 9.801025,-32.620239 1.749573,-5.810547 0.350342,38.430786 10.010371,0 -1.82006,-53.5510255 -12.531132,0 -11.409606,36.7495725 c -0.420159,1.399959 -0.677219,2.379775 -0.77118,2.939453 -0.0926,0.747694 -0.162386,1.587944 -0.20935,2.520752 l -0.209351,0 c -0.09403,-1.213366 -0.187309,-2.099901 -0.279846,-2.659607 -0.09403,-0.700669 -0.351086,-1.680485 -0.771179,-2.939453 L 63.892029,9.3035893 z" style="" id="path3784"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3 KiB |
21
static/tram.svg
Normal file
21
static/tram.svg
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="138" height="72" id="svg2" version="1.1" inkscape:version="0.48.1 " sodipodi:docname="lyon tcl logo-metro-full.svg">
|
||||||
|
<defs id="defs4"/>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6568542" inkscape:cx="65.794397" inkscape:cy="47.944674" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1280" inkscape:window-height="968" inkscape:window-x="-4" inkscape:window-y="-4" inkscape:window-maximized="1"/>
|
||||||
|
<metadata id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
<dc:title/>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g inkscape:groupmode="layer" id="layer1" inkscape:label="Calque">
|
||||||
|
<flowRoot xml:space="preserve" id="flowRoot2988" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><flowRegion id="flowRegion2990"><rect id="rect2992" width="60" height="46" x="9" y="9"/></flowRegion><flowPara id="flowPara2994"/></flowRoot> <path style="fill:#ee1c25;fill-opacity:1;stroke:none" d="M 10.306041,-9.708713e-5 128,0 c 11.1875,18.5 10,36 10,36 0,0 0.82757,18.63169 -10,36 l -117.702238,9.7e-5 c -11.5644706,-18.863868 -9.93826201,-36 -9.93826201,-36 0,0 -1.91764309,-16.028869 9.94654101,-36.00019408713 z" id="rect3764" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccc"/>
|
||||||
|
<g transform="translate(-7.7333374,1.1003853)" style="font-size:70px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Confluence;-inkscape-font-specification:Confluence Bold" id="flowRoot3766">
|
||||||
|
<path d="m 72.112244,17.214051 0,45.640564 9.170837,0 0,-45.640564 14.13971,0 0,-7.9104617 -37.450257,0 0,7.9104617 z" style="" id="path3787"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue