diff --git a/assets/amenities-btn.svg b/assets/amenities-btn.svg index 69a848a..3ee8e70 100644 --- a/assets/amenities-btn.svg +++ b/assets/amenities-btn.svg @@ -9,13 +9,12 @@ id="svg1" xml:space="preserve" inkscape:version="1.4 (e7c3feb100, 2024-10-09)" - sodipodi:docname="mockup.svg" + sodipodi:docname="amenities-btn.svg" inkscape:export-filename="assets/neon-border-image-corner.svg" inkscape:export-xdpi="96" inkscape:export-ydpi="96" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">Piscine++++++++++++Piscine de l'AntenneAu centre de la pelouse d'entree sur le site, a cote des jeux pour enfantGrand atelier de nage libre, tous cyborg accepteEVENEMENTS A VENIRNage libre3 Juil17:00-19:00 hr { margin-top: 1ex; } +#map .highlight-point-icon.point-feature img ~ h3 { + opacity: clamp(0, calc( var(--zoom-level) - 20 ), 1) ; +} + +#map .highlight-point-icon img { + opacity: clamp(0, calc( var(--zoom-level) - 17 ), 1) ; +} + #map .highlight-point-icon:not(.active) { opacity: 0; @@ -407,6 +415,18 @@ camp-feature .feature-widgets > * { margin-bottom: 2em; } +camp-feature .feature-widgets > p:first-child { + margin-top: 0; +} + +camp-feature .feature-widgets > p + p { + margin-top: -1em; +} + +camp-feature .feature-widgets .author-widget { + text-align: right; +} + camp-feature .widget > :first-child { margin-top: 0; } diff --git a/icons/radio.svg b/icons/radio.svg new file mode 100644 index 0000000..027e87c --- /dev/null +++ b/icons/radio.svg @@ -0,0 +1,86 @@ + + + + diff --git a/icons/search.svg b/icons/search.svg index 535d2ef..254d935 100644 --- a/icons/search.svg +++ b/icons/search.svg @@ -9,10 +9,9 @@ id="svg1" xml:space="preserve" inkscape:version="1.4 (e7c3feb100, 2024-10-09)" - sodipodi:docname="mockup.svg" + sodipodi:docname="search.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">Piscine++++++Piscine de l'AntenneAu centre de la pelouse d'entree sur le site, a cote des jeux pour enfantGrand atelier de nage libre, tous cyborg accepteEVENEMENTS A VENIRNage libre3 Juil17:00-19:00 + id="g8-8-8-7" + style="display:inline;stroke:#ffffff;stroke-opacity:1" + transform="matrix(1.8234232,0,0,1.8234232,1726.3702,1887.3328)"> diff --git a/index.html b/index.html index 3301234..f3b1c38 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,8 @@ - + + diff --git a/js/feature-widgets/author.js b/js/feature-widgets/author.js new file mode 100644 index 0000000..c5ad8c1 --- /dev/null +++ b/js/feature-widgets/author.js @@ -0,0 +1,13 @@ +export function authorWidget(feature){ + if(feature.properties["village"] && feature.properties["author"]){ + let content = document.createElement("p") + content.classList.add("widget") + content.classList.add("author-widget") + + let em = document.createElement("em") + em.textContent = "— " + feature.properties["author"] + + content.append(em) + return content + } +} \ No newline at end of file diff --git a/js/feature-widgets/description.js b/js/feature-widgets/description.js new file mode 100644 index 0000000..4c48f75 --- /dev/null +++ b/js/feature-widgets/description.js @@ -0,0 +1,17 @@ +export function descriptionWiget(feature){ + if(feature.properties["description"]){ + let content = document.createElement("p") + content.classList.add("widget") + content.classList.add("description-widget") + + let lines = feature.properties["description"].split(/\r?\n/) + .flatMap((it, i, arr) => i < arr.length-1 ? + [document.createTextNode(it), document.createElement("br")] : + [document.createTextNode(it)] + ); + + content.replaceChildren(...lines) + + return content + } +} \ No newline at end of file diff --git a/js/feature-widgets/feature-widgets.js b/js/feature-widgets/feature-widgets.js index 4de408d..3c47501 100644 --- a/js/feature-widgets/feature-widgets.js +++ b/js/feature-widgets/feature-widgets.js @@ -1,8 +1,10 @@ +import { authorWidget } from "./author.js" import { campingCarsWidget } from "./camping-cars.js" import { capaciteDortoirWidget } from "./capacite-dortoir.js" import { capaciteEspaceWidget } from "./capacite-espace.js" import { capaciteParkingWidget } from "./capacite-parking.js" import { deposeMinuteWidget } from "./depose-minute.js" +import { descriptionWiget } from "./description.js" import { mixiteChoisieWidget } from "./mixite-choisie.js" import { upcomingTalksWidget } from "./upcoming-talks.js" import { zoneInterditeWidget } from "./zone-interdite.js" @@ -11,6 +13,9 @@ export const FEATURE_WIDGETS = [ // Boxes mixiteChoisieWidget, zoneInterditeWidget, + // Description + descriptionWiget, + authorWidget, // Other deposeMinuteWidget, campingCarsWidget, diff --git a/js/feature-widgets/mixite-choisie.js b/js/feature-widgets/mixite-choisie.js index a8ab513..797000c 100644 --- a/js/feature-widgets/mixite-choisie.js +++ b/js/feature-widgets/mixite-choisie.js @@ -1,5 +1,5 @@ export function mixiteChoisieWidget(feature){ - if(feature.properties["mixite-choisie"]){ + if(feature.properties["mixite-choisie"] || feature.properties["non-mixte"]){ let content = document.createElement("div") content.classList.add("mixite-choisie-widget") content.classList.add("widget") @@ -15,7 +15,7 @@ export function mixiteChoisieWidget(feature){ content.append(description) } else { let p = document.createElement("p") - p.textContent = `Cet espace est en mixité choisie sans mecs cis` + p.textContent = `Cet espace est en mixité choisie sans homme cisgenre` content.append(p) } diff --git a/js/index.js b/js/index.js index b7009d8..aa21708 100644 --- a/js/index.js +++ b/js/index.js @@ -214,6 +214,7 @@ document.getElementById("explore-toggle-btn").addEventListener("click", () => { function bindButtonToCategory(button, category){ button.addEventListener("click", e => { e.preventDefault() + document.querySelector("#explore > details").open = false openFeature(...places.featuresByCategory[category]); }) } @@ -223,6 +224,7 @@ bindButtonToCategory(document.getElementById("explore-on-schedule"), "on-schedul bindButtonToCategory(document.getElementById("explore-dodo"), "dodo") bindButtonToCategory(document.getElementById("explore-bin"), "bin") bindButtonToCategory(document.getElementById("explore-toilets"), "toilets") +bindButtonToCategory(document.getElementById("explore-care"), "care") document.getElementById("logo").addEventListener("click", e => { openFeature() diff --git a/js/map.js b/js/map.js index c59032c..a6afaac 100644 --- a/js/map.js +++ b/js/map.js @@ -135,9 +135,15 @@ export async function init_places(places_db){ contentEl.append(nameEl) } + let classlist = ["highlight-point-icon"] + + if((!feature.parentFeature && feature.geometry.type == "Point") || feature.parentFeature?.geometry.type == "Point"){ + classlist.push("point-feature") + } + return L.marker(latlng, { icon: L.divIcon({ - className: "highlight-point-icon", + className: classlist.join(" "), html: contentEl, iconSize: [0, 0] }) diff --git a/js/places.js b/js/places.js index a76902e..c587c14 100644 --- a/js/places.js +++ b/js/places.js @@ -12,8 +12,9 @@ const CATEGORIES = { "drinking-water": (feature) => feature.properties["eau potable"] || feature.properties["douches"] || feature.properties["toilettes"], "bin": (feature) => feature.properties["poubelle"], "dodo": (feature) => feature.properties["n couchage"] > 0 || feature.properties["camping"], - "on-schedule": (feature) => feature.properties["pretalx-room-id"] || feature.properties["pretalx-room-id"] == 0, - "toilets": (feature) => feature.properties["toilettes"] || feature.properties["douches"] + "on-schedule": (feature) => feature.properties["pretalx-room-id"] || feature.properties["pretalx-room-id"] == 0 || feature.properties["village"], + "toilets": (feature) => feature.properties["toilettes"] || feature.properties["douches"], + "care": (feature) => feature.properties["medic"] || feature.properties["care"] } /** @@ -269,6 +270,7 @@ export class PlaceDatabase extends EventTarget { default_database.loadGeojson(new URL("../couches/eau-potable.geojson", import.meta.url), {batch: true}), default_database.loadGeojson(new URL("../couches/espace-camp.geojson", import.meta.url), {batch: true}), default_database.loadGeojson(new URL("../couches/espacemiam.geojson", import.meta.url), {batch: true}), + default_database.loadGeojson(new URL("../couches/installations-permanentes.geojson", import.meta.url), {batch: true}), default_database.loadGeojson(new URL("../couches/marabouts.geojson", import.meta.url), {batch: true}), default_database.loadGeojson(new URL("../couches/medic.geojson", import.meta.url), {batch: true}), default_database.loadGeojson(new URL("../couches/parkings.geojson", import.meta.url), {batch: true}), diff --git a/js/symbols.js b/js/symbols.js index bdcb816..e20b9c1 100644 --- a/js/symbols.js +++ b/js/symbols.js @@ -76,6 +76,10 @@ function getBaseSymbolForFeature(feature){ return STAGE_SYMBOL } + if(feature.properties["village"]){ + return VILLAGE_SYMBOL + } + if(feature.properties["bar"]){ return DRINKS_SYMBOL; } @@ -92,6 +96,10 @@ function getBaseSymbolForFeature(feature){ return SHIFTS_SYMBOL } + if(feature.properties["autogestion"] == "radio"){ + return RADIO_SYMBOL + } + if(feature.properties["dons"]){ return MONEY_SYMBOL } @@ -251,6 +259,7 @@ export const BADMINGTON_SYMBOL = new MapSymbol() export const MEDIC_SYMBOL = new MapSymbol() { MEDIC_SYMBOL.markerUrl = new URL("../icons/medic.svg", import.meta.url) + MEDIC_SYMBOL.genericName = "Médic" MEDIC_SYMBOL.borderColor = "white" MEDIC_SYMBOL.indexSynonyms = [ "medic", @@ -441,6 +450,17 @@ export const SHIFTS_SYMBOL = new MapSymbol() ] } +export const RADIO_SYMBOL = new MapSymbol() +{ + RADIO_SYMBOL.genericName = "Radio" + RADIO_SYMBOL.markerUrl = new URL("../icons/radio.svg", import.meta.url) + RADIO_SYMBOL.indexSynonyms = [ + "radio", + "fm", + "91.8", + ] +} + export const SCHEDULE_SYMBOL = new MapSymbol() { SCHEDULE_SYMBOL.genericName = "Programmation" @@ -506,4 +526,16 @@ export const DRINKS_SYMBOL = new MapSymbol() "kefir", "maté" ] +} + +export const VILLAGE_SYMBOL = new MapSymbol() +{ + VILLAGE_SYMBOL.genericName = "Installation permanente" + VILLAGE_SYMBOL.markerUrl = new URL("../icons/default-marker.svg", import.meta.url) + VILLAGE_SYMBOL.backgroundColor = "white" + VILLAGE_SYMBOL.borderColor = "white" + VILLAGE_SYMBOL.indexSynonyms = [ + "village", + "installation" + ] } \ No newline at end of file diff --git a/map-light.qgz b/map-light.qgz index bc0ffb2..1230263 100644 Binary files a/map-light.qgz and b/map-light.qgz differ