Compare commits

...

6 commits

22 changed files with 903 additions and 17 deletions

View file

@ -60,4 +60,11 @@ Tout espace qui est en mixité choisie sans mec-cis
Les endroits oú l'on peut jouer au badmington
* **badmington**=true (booleen)
* **badmington**=true (booleen)
## Zone interdite ou protégées
Les endorit oú il ne faut pas aller
* **zone-interdite**=true
* **description-interdiction** Une longue description qui remplacera le générique "Veuillez ne pas circuler ici" (texte)

View file

@ -6,6 +6,6 @@
{ "type": "Feature", "properties": { "tout-venant": true, "recyclage": false, "compost caca": false, "compost vegetal": false, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091632273753862, 47.541964182561429 ] } },
{ "type": "Feature", "properties": { "tout-venant": false, "recyclage": true, "compost caca": false, "compost vegetal": false, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091609674840965, 47.541963379645793 ] } },
{ "type": "Feature", "properties": { "tout-venant": false, "recyclage": false, "compost caca": true, "compost vegetal": false, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091148822106654, 47.542307623733166 ] } },
{ "type": "Feature", "properties": { "tout-venant": false, "recyclage": false, "compost caca": false, "compost vegetal": true, "poubelle": false }, "geometry": { "type": "Point", "coordinates": [ -2.091149910988561, 47.542277486881417 ] } }
{ "type": "Feature", "properties": { "tout-venant": false, "recyclage": false, "compost caca": false, "compost vegetal": true, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091149910988561, 47.542277486881417 ] } }
]
}

View file

@ -200,7 +200,7 @@ body > hr {
grid-template-rows: 1fr;
}
#search-section:has( ~ #result-panel.empty) {
#search-section:has( ~ dialog:not([open])) {
position: fixed;
bottom: 5px;
left: 5px;
@ -240,6 +240,38 @@ body > hr {
/* PANEL */
#result-panel-dialog {
display: block;
position: relative;
padding: 0;
margin: 0;
border: none;
width: 100%;
}
#result-panel-dialog:not([open]) {
display: none;
}
#result-panel-dialog #close-result-panel-btn {
position: sticky;
top: 0px;
right: 0px;
padding: 15px;
border: none;
background: none;
cursor: pointer;
z-index: 100;
margin-left: auto;
margin-bottom: calc( ( 1.5em + 30px ) * -1);
display: block;
}
#close-result-panel-btn img {
height: 1.5em;
display: block;
}
#result-panel {
background: black;
border-image: url("../assets/neon-border-image.svg") 12;
@ -248,11 +280,6 @@ body > hr {
color: white;
}
#result-panel.empty,
#result-panel:empty{
display:none;
}
#result-panel > * {
padding: 1em;
margin: 0;
@ -327,4 +354,109 @@ camp-feature-short-header .feature-location {
camp-feature {
min-height: 25vh;
font-family: sans-serif;
}
camp-feature .feature-header {
margin-bottom: 1.5em;
}
camp-feature .feature-widgets {
display: grid;
grid-template-columns: max-content minmax(50%, 1fr);
grid-auto-rows: max-content;
grid-auto-flow: column;
}
camp-feature .feature-widgets > * {
grid-column: 1 / 3;
margin-bottom: 2em;
}
camp-feature .widget > :first-child {
margin-top: 0;
}
camp-feature .widget > :last-child {
margin-bottom: 0;
}
camp-feature .widget h2 {
font-size: 1em;
text-transform: uppercase;
margin-bottom: 1ex;
}
camp-feature .widget p {
margin-top: 1ex;
margin-bottom: 1ex;
line-height: 1.5;
}
.table-widget {
display: grid;
grid-template-columns: max-content minmax(50%, 1fr);
column-gap: 1ex;
row-gap: 1ex;
}
camp-feature .table-widget {
grid-template-columns: subgrid;
grid-column: 1 / 3;
}
.table-widget > * {
margin: 0 !important;
}
.table-widget > * {
grid-column: 2;
}
.table-widget > h2 {
grid-column: 1;
}
camp-feature .table-widget > h2 {
text-transform: none;
}
.box-widget {
--box-color: white;
border: solid 3px var(--box-color);
padding: 10px;
box-sizing: border-box;
}
.box-widget h2 {
float: left;
background-color: var(--box-color);
color: white;
padding: 5px 10px;
display: block;
width: fit-content;
position: relative;
font-size: 1em;
}
.box-widget p:first-of-type {
margin-top: 0;
}
.box-widget h2::after {
content: "";
width: 0; height: 0;
border-style: solid;
border-width: calc(1em + 17.667px) calc(1em + 10px) 0px 0px;
border-color: var(--box-color) transparent transparent transparent;
position: absolute;
right: calc((1em + 9px) * -1);
top: 0;
}
camp-feature .box-widget h2:first-child,
.box-widget h2 {
margin-left: -10px;
margin-top: -10px;
margin-right: 2em;
}

12
css/widgets.css Normal file
View file

@ -0,0 +1,12 @@
:root {
--verboten-color:#c51a00;
--mixite-choisie-color: #640aa4;
}
.zone-interdite-widget {
--box-color: var(--verboten-color);
}
.mixite-choisie-widget {
--box-color: var(--mixite-choisie-color);
}

53
icons/close.svg Normal file
View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="15.622803"
height="15.76709"
viewBox="0 0 15.622803 15.76709"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="mockup.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:zoom="0.80190072"
inkscape:cx="1174.0855"
inkscape:cy="1718.4172"
inkscape:window-width="2549"
inkscape:window-height="1367"
inkscape:window-x="56"
inkscape:window-y="50"
inkscape:window-maximized="0"
inkscape:current-layer="g32-8"><inkscape:page
x="0"
y="0"
width="15.622803"
height="15.76709"
id="page2"
margin="0"
bleed="0" /></sodipodi:namedview><defs
id="defs1" /><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Default Mobile"
transform="translate(-1493.8409,-1697.5114)"><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.84565;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
d="m 1508.8079,1712.6292 -14.3042,-14.45 7.0763,7.222 7.1362,-7.2422 -7.1362,7.2422 -7.0915,6.9854"
id="path23-6-2-3"
sodipodi:nodetypes="cccccc"
inkscape:export-filename="icons/close.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" /></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

88
icons/poubelle-caca.svg Normal file
View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="32"
height="32"
viewBox="0 0 32 32"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="poubelle-caca.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
inkscape:zoom="3.1432242"
inkscape:cx="32.450756"
inkscape:cy="19.565897"
inkscape:window-width="2560"
inkscape:window-height="1378"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g14" /><defs
id="defs1" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.93195;stroke-opacity:1"
id="rect3"
width="24.225895"
height="32"
x="3.8870773"
y="-0.041903432" /><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:5.00771;stroke-opacity:1"
id="rect3-5"
width="31.999977"
height="24.975895"
x="2.2888184e-05"
y="3.470149" /><rect
style="fill:#64340f;fill-opacity:1;stroke:none;stroke-width:2;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect2"
width="22.600895"
height="22.600895"
x="4.6995773"
y="4.657649" /><g
id="g6"
transform="matrix(0.76889988,0,0,0.76889988,2.8492624,4.0504748)"
style="display:none"><g
style="display:inline;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"
id="g7"
transform="matrix(1.1035493,0,0,1.1035493,3.8609577,1.7467033)"><path
d="M 7,19 H 4.815 A 1.83,1.83 0 0 1 3.245,18.119 1.785,1.785 0 0 1 3.241,16.335 L 7.196,9.5"
id="path1-5" /><path
d="m 11,19 h 8.203 a 1.83,1.83 0 0 0 1.556,-0.89 1.784,1.784 0 0 0 0,-1.775 l -1.226,-2.12"
id="path2-6" /><path
d="m 14,16 -3,3 3,3"
id="path3-2" /><path
d="M 8.293,13.596 7.196,9.5 3.1,10.598"
id="path4-9" /><path
d="M 9.344,5.811 10.437,3.919 A 1.83,1.83 0 0 1 11.985,3 1.784,1.784 0 0 1 13.531,3.888 l 3.943,6.843"
id="path5-1" /><path
d="m 13.378,9.633 4.096,1.098 1.097,-4.096"
id="path6" /></g></g><g
id="g14"
transform="translate(-0.12049839,0.58808831)"><path
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.495;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
d="m 8.3503451,21.19703 c 0.6185944,1.182679 3.2367469,2.121428 3.2367469,2.121428 l 9.056913,0.06423 c 0,0 3.042825,-0.972225 3.571996,-2.314128 0.529171,-1.341903 0.119536,-3.208945 -0.449634,-3.982472 -0.56917,-0.773527 -1.605836,-0.706568 -1.605836,-0.706568 0,0 0.352745,-0.830928 0.04088,-1.549506 -0.311861,-0.718577 -1.839419,-1.340998 -1.839419,-1.340998 0,0 1.100124,-1.348082 0.513868,-2.376637 -0.586256,-1.028555 -3.597891,-0.650251 -4.432106,-1.4773654 -0.834215,-0.8271142 -0.770802,-2.2481698 -0.770802,-2.2481698 0,0 -1.504187,0.6069828 -2.055469,1.4131353 -0.551282,0.8061525 -0.770801,3.2759049 -0.770801,3.2759049 0,0 -1.543107,0.183947 -2.05547,0.899268 C 10.278852,13.690473 10.534282,16 10.534282,16 c 0,0 -1.9935632,1.128038 -2.4910216,2.123094 -0.4974584,0.995056 -0.3115097,1.891257 0.3070847,3.073936 z"
id="path12"
sodipodi:nodetypes="zcczzczczzczczczz" /><path
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.495;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
d="m 12.846685,12.075884 c 0,0 1.302259,0.964914 2.111639,1.159492"
id="path13"
sodipodi:nodetypes="cc" /><path
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.495;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
d="m 22.160531,16.37952 c 0,0 -1.590071,1.10035 -2.699046,1.437332 -1.108975,0.336982 -2.775587,0.44799 -3.876634,0.39158 -1.101047,-0.05641 -2.662738,-0.548211 -2.662738,-0.548211"
id="path14"
sodipodi:nodetypes="czzc" /></g></g></svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="32"
height="32"
viewBox="0 0 32 32"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="poubelle-compost.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
inkscape:zoom="27.475793"
inkscape:cx="12.95686"
inkscape:cy="21.273271"
inkscape:window-width="2560"
inkscape:window-height="1378"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g12" /><defs
id="defs1" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.93195;stroke-opacity:1"
id="rect3"
width="24.225895"
height="32"
x="3.8870773"
y="-0.041903432" /><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:5.00771;stroke-opacity:1"
id="rect3-5"
width="31.999977"
height="24.975895"
x="2.2888184e-05"
y="3.470149" /><rect
style="fill:#64340f;fill-opacity:1;stroke:none;stroke-width:2;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect2"
width="22.600895"
height="22.600895"
x="4.6995773"
y="4.657649" /><g
id="g6"
transform="matrix(0.76889988,0,0,0.76889988,2.8492624,4.0504748)"
style="display:none"><g
style="display:inline;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"
id="g7"
transform="matrix(1.1035493,0,0,1.1035493,3.8609577,1.7467033)"><path
d="M 7,19 H 4.815 A 1.83,1.83 0 0 1 3.245,18.119 1.785,1.785 0 0 1 3.241,16.335 L 7.196,9.5"
id="path1-5" /><path
d="m 11,19 h 8.203 a 1.83,1.83 0 0 0 1.556,-0.89 1.784,1.784 0 0 0 0,-1.775 l -1.226,-2.12"
id="path2-6" /><path
d="m 14,16 -3,3 3,3"
id="path3-2" /><path
d="M 8.293,13.596 7.196,9.5 3.1,10.598"
id="path4-9" /><path
d="M 9.344,5.811 10.437,3.919 A 1.83,1.83 0 0 1 11.985,3 1.784,1.784 0 0 1 13.531,3.888 l 3.943,6.843"
id="path5-1" /><path
d="m 13.378,9.633 4.096,1.098 1.097,-4.096"
id="path6" /></g></g><g
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
id="g12"
transform="matrix(0.82341647,0,0,0.82341647,6.1643725,6.0803968)"><path
d="M 2.27,21.7 15.34,15 c 0,0 1.537471,-4.428403 -0.377041,-5.9535012 C 13.348181,7.7601687 9.521724,8.5070949 9.521724,8.5070949 Z M 8.64,14 7.2265816,12.682598 M 15.34,15 12.88,12.54"
id="path1"
style="stroke:#ffffff;stroke-linejoin:bevel;stroke-opacity:1;stroke-linecap:butt"
sodipodi:nodetypes="ccscccccc" /><path
d="M 22,9 18.5,7 15,9 l 3.5,2 z"
id="path2"
style="stroke:#ffffff;stroke-linejoin:bevel;stroke-opacity:1"
sodipodi:nodetypes="ccccc" /><path
d="M 15,2 13,5.5 15,9 17,5.5 Z"
id="path3"
style="stroke:#ffffff;stroke-width:1.99992;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="ccccc" /></g></g></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="32"
height="32"
viewBox="0 0 32 32"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="poubelle-recyclable.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
inkscape:zoom="20.443197"
inkscape:cx="2.8860457"
inkscape:cy="21.351846"
inkscape:window-width="2560"
inkscape:window-height="1378"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs1" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.93195;stroke-opacity:1"
id="rect3"
width="24.225895"
height="32"
x="3.8870773"
y="-0.041903432" /><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:5.00771;stroke-opacity:1"
id="rect3-5"
width="31.999977"
height="24.975895"
x="2.2888184e-05"
y="3.470149" /><rect
style="fill:#64340f;fill-opacity:1;stroke:none;stroke-width:2;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect2"
width="22.600895"
height="22.600895"
x="4.6995773"
y="4.657649" /><g
id="g6"
transform="matrix(0.76889988,0,0,0.76889988,2.8492624,4.0504748)"
style="display:none"><g
style="display:inline;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"
id="g7"
transform="matrix(1.1035493,0,0,1.1035493,3.8609577,1.7467033)"><path
d="M 7,19 H 4.815 A 1.83,1.83 0 0 1 3.245,18.119 1.785,1.785 0 0 1 3.241,16.335 L 7.196,9.5"
id="path1-5" /><path
d="m 11,19 h 8.203 a 1.83,1.83 0 0 0 1.556,-0.89 1.784,1.784 0 0 0 0,-1.775 l -1.226,-2.12"
id="path2-6" /><path
d="m 14,16 -3,3 3,3"
id="path3-2" /><path
d="M 8.293,13.596 7.196,9.5 3.1,10.598"
id="path4-9" /><path
d="M 9.344,5.811 10.437,3.919 A 1.83,1.83 0 0 1 11.985,3 1.784,1.784 0 0 1 13.531,3.888 l 3.943,6.843"
id="path5-1" /><path
d="m 13.378,9.633 4.096,1.098 1.097,-4.096"
id="path6" /></g></g><g
id="g12"
transform="rotate(4.7648625,13.108297,19.75243)"><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="m 13.220763,11.209732 2.122413,-4.0309721 5.301796,7.3202111"
id="path7"
sodipodi:nodetypes="ccc" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="m 21.700295,16.542066 2.483081,4.023417 -9.031716,0.949891"
id="path8"
sodipodi:nodetypes="ccc" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="M 13.19648,21.515374 8.0640631,21.855193 11.923894,13.454445"
id="path9"
sodipodi:nodetypes="ccc" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="m 8.448361,14.386118 3.475533,-0.931673 0.930826,3.475533"
id="path10" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="m 17.169438,13.567298 3.475534,0.931673 0.930825,-3.475533"
id="path11" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="m 17.697217,18.969818 -2.545557,2.545556 2.545557,2.545557"
id="path12" /></g></g></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

83
icons/poubelle.svg Normal file
View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="32"
height="32"
viewBox="0 0 32 32"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="poubelle.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
inkscape:zoom="8.1716289"
inkscape:cx="-9.9123444"
inkscape:cy="16.092263"
inkscape:window-width="2560"
inkscape:window-height="1378"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6" /><defs
id="defs1" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.93195;stroke-opacity:1"
id="rect3"
width="24.225895"
height="32"
x="3.8870773"
y="-0.041903432" /><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:5.00771;stroke-opacity:1"
id="rect3-5"
width="31.999977"
height="24.975895"
x="2.2888184e-05"
y="3.470149" /><rect
style="fill:#64340f;fill-opacity:1;stroke:none;stroke-width:2;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect2"
width="22.600895"
height="22.600895"
x="4.6995773"
y="4.657649" /><g
style="display:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"
id="g1"
transform="matrix(0.67141402,0,0,0.67141402,7.9430318,7.9430318)"
sodipodi:insensitive="true"><path
d="m 19,6 v 14 a 2,2 0 0 1 -2,2 H 7 A 2,2 0 0 1 5,20 V 6"
id="path1" /><path
d="M 3,6 H 21"
id="path2" /><path
d="M 8,6 V 4 a 2,2 0 0 1 2,-2 h 4 a 2,2 0 0 1 2,2 v 2"
id="path3" /></g><g
id="g6"
transform="matrix(0.906167,0,0,0.906167,1.6251471,2.6930131)"><path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2.2;stroke-linejoin:bevel;paint-order:stroke markers fill"
d="m 11.158157,12.64293 h 9.603985 L 19.35707,22.71414 h -6.71414 z"
id="path4" /><g
id="g5"
transform="rotate(-18.010543,12.011766,14.287886)"><path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
d="M 10.628688,8.6144458 24.341367,8.5858523"
id="path5"
sodipodi:nodetypes="cc" /><rect
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke markers fill"
id="rect5"
width="4.5828142"
height="1.441345"
x="15.19362"
y="7.1588039" /></g></g></g></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -6,6 +6,7 @@
<title>Carte Interhack Camp 2026</title>
<link rel="stylesheet" href="./js/lib/leaflet/leaflet.css">
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/widgets.css">
<script type="module" src="./js/index.js"></script>
<script type="module" src="./js/components/bidi-panel.js"></script>
</head>
@ -26,6 +27,11 @@
</button>
</form>
<camp-bidi-panel id="result-panel" ></camp-bidi-panel>
<dialog id="result-panel-dialog">
<button title="Fermer" id="close-result-panel-btn">
<img src="./icons/close.svg" alt="Icone de croix">
</button>
<camp-bidi-panel id="result-panel" ></camp-bidi-panel>
</dialog>
</body>
</html>

View file

@ -1,8 +1,10 @@
import "./feature-short-header.js"
import FEATURE_WIDGETS from "../feature-widgets/feature-widgets.js"
const TEMPLATE = document.createElement("template")
TEMPLATE.innerHTML = `
<camp-feature-short-header class="feature-header" ></camp-feature-short-header>
<div class="feature-widgets"></div
`
export class FeatureElement extends HTMLElement {
@ -19,6 +21,14 @@ export class FeatureElement extends HTMLElement {
let header = this.querySelector("camp-feature-short-header")
header.feature = this.feature
header.updateContent()
let widgetContainer = this.querySelector(".feature-widgets");
for(let widgetFn of FEATURE_WIDGETS){
let result = widgetFn(this.feature);
if(result !== undefined && result !== null){
widgetContainer.append(result)
}
}
}
}

View file

@ -0,0 +1,17 @@
export function campingCarsWidget(feature){
if(feature.properties["Parking"] && feature.properties["Camping-cars"]){
let content = document.createElement("div")
content.classList.add("widget")
content.classList.add("camping-cars-widget")
let h2 = document.createElement("h2")
h2.textContent = "Camtars et camping cars bienvenus"
content.append(h2)
let p = document.createElement("p")
p.textContent = `Vous pouvez dormir sur ce parking. Sur les autres aussi mais celui-ci est particulièrement approprié.`
content.append(p)
return content
}
}

View file

@ -0,0 +1,22 @@
export function capaciteDortoirWidget(feature){
if(feature.properties["n couchage"]){
let content = document.createElement("div")
content.classList.add("widget")
content.classList.add("table-widget")
content.classList.add("capacite-dortoir-widget")
let fielName = document.createElement("h2");
fielName.textContent = "Capacité :"
content.append(fielName)
let value = document.createElement("p");
if(feature.properties["n couchage"] > 1){
value.textContent = `${feature.properties["n couchage"]} lits`
} else {
value.textContent = `${feature.properties["n couchage"]} lit`
}
content.append(value)
return content
}
}

View file

@ -0,0 +1,28 @@
function exclude(feature){
return feature.properties["Parking"] ||
feature.properties["n couchage"];
}
export function capaciteEspaceWidget(feature){
let capacityValue = feature.properties["capacity"] || feature.properties["capacite"]
if((capacityValue !== undefined && capacityValue !== null) && !(exclude(feature))){
let content = document.createElement("div")
content.classList.add("widget")
content.classList.add("table-widget")
content.classList.add("capacite-espace-widget")
let fielName = document.createElement("h2");
fielName.textContent = "Capacité :"
content.append(fielName)
let value = document.createElement("p");
if(capacityValue > 1){
value.textContent = `${capacityValue} personnes`
} else {
value.textContent = `${capacityValue} personne`
}
content.append(value)
return content
}
}

View file

@ -0,0 +1,22 @@
export function capaciteParkingWidget(feature){
if(feature.properties["Parking"] && feature.properties["capacite"]){
let content = document.createElement("div")
content.classList.add("widget")
content.classList.add("table-widget")
content.classList.add("capacite-parking-widget")
let fielName = document.createElement("h2");
fielName.textContent = "Capacité :"
content.append(fielName)
let value = document.createElement("p");
if(feature.properties["capacite"] > 1){
value.textContent = `${feature.properties["capacite"]} places`
} else {
value.textContent = `${feature.properties["capacite"]} place`
}
content.append(value)
return content
}
}

View file

@ -0,0 +1,17 @@
export function deposeMinuteWidget(feature){
if(feature.properties["Parking"] && feature.properties["Depose-minute"]){
let content = document.createElement("div")
content.classList.add("widget")
content.classList.add("depose-minute-widget")
let h2 = document.createElement("h2")
h2.textContent = "Dépose minute"
content.append(h2)
let p = document.createElement("p")
p.textContent = `Ce parking est un dépose minute, veuillez laisser les places libres et ne pas y rester trop longtemps.`
content.append(p)
return content
}
}

View file

@ -0,0 +1,22 @@
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 { mixiteChoisieWidget } from "./mixite-choisie.js"
import { zoneInterditeWidget } from "./zone-interdite.js"
export const FEATURE_WIDGETS = [
// Boxes
mixiteChoisieWidget,
zoneInterditeWidget,
// Other
deposeMinuteWidget,
campingCarsWidget,
// Fields
capaciteParkingWidget,
capaciteDortoirWidget,
capaciteEspaceWidget,
]
export default FEATURE_WIDGETS

View file

@ -0,0 +1,24 @@
export function mixiteChoisieWidget(feature){
if(feature.properties["mixite-choisie"]){
let content = document.createElement("div")
content.classList.add("mixite-choisie-widget")
content.classList.add("widget")
content.classList.add("box-widget")
let h2 = document.createElement("h2")
h2.textContent = "Mixité choisie"
content.append(h2)
if(feature.properties["description-mixite-choisie"]){
let description = document.createElement("p")
description.textContent = feature.properties["description-mixite-choisie"]
content.append(description)
} else {
let p = document.createElement("p")
p.textContent = `Cet espace est en mixité choisie sans mecs cis`
content.append(p)
}
return content
}
}

View file

@ -0,0 +1,24 @@
export function zoneInterditeWidget(feature){
if(feature.properties["zone-interdite"] || feature.properties["autorisee"] === false){
let content = document.createElement("div")
content.classList.add("zone-interdite-widget")
content.classList.add("widget")
content.classList.add("box-widget")
let h2 = document.createElement("h2")
h2.textContent = "Zone interdite"
content.append(h2)
if(feature.properties["description-interdiction"]){
let description = document.createElement("p")
description.textContent = feature.properties["description-interdiction"]
content.append(description)
} else {
let p = document.createElement("p")
p.textContent = `Cette zone est interdite. Veuillez ne pas y entrer.`
content.append(p)
}
return content
}
}

View file

@ -25,6 +25,13 @@ const search_form = document.getElementById("search-section")
search_form.elements["query"].addEventListener("change", () => search_form.requestSubmit())
search_form.elements["query"].addEventListener("input", () => search_form.requestSubmit())
function showDefaultMapState(){
MAP.unhighlight_all()
for(let feature of places.featuresShownOnEmptyMap){
MAP.show(feature)
}
}
window.addEventListener("hashchange", () => {
let place_id = decodeURIComponent(location.hash.substring(1))
if (place_id) {
@ -32,8 +39,13 @@ window.addEventListener("hashchange", () => {
if (feature) {
MAP.highlight(place_id)
if(document.getElementById("search-result")) {
// If we have a search in progress, opening search item
openSearchResultItem(feature)
} else {
let foundIndex = null;
let panelChildren = document.getElementById("result-panel").children
for(let i = 0; i<panelChildren.length; i++) {
@ -45,25 +57,33 @@ window.addEventListener("hashchange", () => {
}
if(foundIndex != null){
// If a panel with this feature was already added to dom, scrolling to this item
document.getElementById("result-panel").setActiveChildrenIndex(foundIndex, {behavior: "instant"})
} else {
// If nothing was selected and there is no search result, opening feature only
openFeature(feature)
}
}
for(let feature_el of document.getElementById("result-panel").children) {
if(feature_el instanceof FeatureElement){
MAP.show(feature_el.feature)
if(document.getElementById("result-panel").children.length > 1){
for(let feature_el of document.getElementById("result-panel").children) {
if(feature_el instanceof FeatureElement){
MAP.show(feature_el.feature)
}
}
} else {
for(let feature of places.featuresShownOnEmptyMap){
MAP.show(feature)
}
}
}
} else {
MAP.unhighlight_all()
document.getElementById("result-panel").replaceChildren(null)
showDefaultMapState()
}
})
if(location.hash){
window.dispatchEvent(new Event("hashchange"))
}
window.dispatchEvent(new Event("hashchange"))
search_form.addEventListener("submit", e => {
e.preventDefault()
@ -104,6 +124,7 @@ search_form.addEventListener("submit", e => {
} else {
document.getElementById("search-result")?.remove()
showDefaultMapState()
}
}
@ -178,3 +199,37 @@ document.getElementById("result-panel").addEventListener("activePanelChange", e
}
}
})
{
const RESULT_PANEL = document.getElementById("result-panel")
/** @type {HTMLDialogElement} */
const RESULT_DIALOG = document.getElementById("result-panel-dialog")
function udpateDialogState(){
if(RESULT_PANEL.children.length > 0) {
// BUG d'accessibilité: Il ne faut pas modifier le focus lors de l'ouverture d'une modale
// Il est preferable de ne pas ouvrir la modale avant d'être sur que l'utilisateur·ice veux vraiment y aller
let active_element = document.activeElement;
RESULT_DIALOG.show()
if(active_element){
active_element.focus()
}
} else {
RESULT_DIALOG.close()
}
}
// Oberve changes in modal DOM
new MutationObserver(udpateDialogState).observe(RESULT_PANEL, {
childList: true
})
// Empty result panel on close
document.getElementById("close-result-panel-btn").addEventListener("click", e => {
updateActiveFeature(null)
document.getElementById("result-panel").replaceChildren()
})
//Init
udpateDialogState()
}

View file

@ -13,7 +13,12 @@ export const FEATURE_ID = Symbol("Feature id")
*/
export class PlaceDatabase extends EventTarget {
/** @type {Object<string, MapFeature>} */
featuresById = {}
/** @type {MapFeature[]} */
featuresShownOnEmptyMap = []
fullTextIndex = null
/**
@ -166,6 +171,9 @@ export class PlaceDatabase extends EventTarget {
buildIndex(){
let database = this;
this.featuresShownOnEmptyMap = []
let showOnEmptyMap = this.featuresShownOnEmptyMap
this.fullTextIndex = lunr(function(){
this.ref("id")
this.field("name")
@ -184,6 +192,10 @@ export class PlaceDatabase extends EventTarget {
synonyms.push(...sym.indexSynonyms)
}
if(feature.properties["show-on-empty-map"]){
showOnEmptyMap.push(feature)
}
this.add({
id,
name: feature.properties.name || sym.genericName,
@ -219,6 +231,7 @@ export class PlaceDatabase extends EventTarget {
default_database.loadGeojson(new URL("../couches/terrain-de-basket.geojson", import.meta.url), {batch: true}),
default_database.loadGeojson(new URL("../couches/wifi.geojson", import.meta.url), {batch: true}),
default_database.loadGeojson(new URL("../couches/zones-interdite.geojson", import.meta.url), {batch: true}),
default_database.loadGeojson(new URL("../couches/zones-protegees.geojson", import.meta.url), {batch: true}),
])
default_database.buildIndex()

View file

@ -71,7 +71,7 @@ function getBaseSymbolForFeature(feature){
return WIFI_SYMBOL
}
if(feature.properties["zone-interdite"]){
if(feature.properties["zone-interdite"] || feature.properties["autorisee"] === false){
return VERBOTEN_AREA_SYMBOL
}
@ -99,6 +99,19 @@ function getBaseSymbolForFeature(feature){
return DRINKING_WATER_SYMBOL
}
if(feature.properties["poubelle"]){
if(feature.properties["recyclage"]){
return RECYCLE_BIN_SYMBOL
}
if(feature.properties["compost vegetal"]){
return COMPOST_BIN_SYMBOL
}
if(feature.properties["compost caca"]){
return POOP_BIN_SYMBOL
}
return BIN_SYMBOL
}
if(feature.properties["batiment"] || feature.properties["piece-batiment"]){
return BUILDING_SYMBOL
}
@ -213,4 +226,56 @@ export const WIFI_SYMBOL = new MapSymbol()
{
WIFI_SYMBOL.genericName = "Wifi"
WIFI_SYMBOL.markerUrl = new URL("../icons/wifi.svg", import.meta.url)
}
export const BIN_SYMBOL = new MapSymbol()
{
BIN_SYMBOL.genericName = "Poubelle"
BIN_SYMBOL.markerUrl = new URL("../icons/poubelle.svg", import.meta.url)
BIN_SYMBOL.indexSynonyms = [
"poubelle",
"dechet",
"déchet"
]
}
export const RECYCLE_BIN_SYMBOL = new MapSymbol()
{
RECYCLE_BIN_SYMBOL.genericName = "Poubelle recyclable"
RECYCLE_BIN_SYMBOL.markerUrl = new URL("../icons/poubelle-recyclable.svg", import.meta.url)
RECYCLE_BIN_SYMBOL.indexSynonyms = [
"poubelle",
"dechet",
"déchet",
"recyclable",
'recyclage'
]
}
export const COMPOST_BIN_SYMBOL = new MapSymbol()
{
COMPOST_BIN_SYMBOL.genericName = "Compost"
COMPOST_BIN_SYMBOL.markerUrl = new URL("../icons/poubelle-compost.svg", import.meta.url)
COMPOST_BIN_SYMBOL.indexSynonyms = [
"poubelle",
"dechet",
"déchet",
"compost",
"épluchures"
]
}
export const POOP_BIN_SYMBOL = new MapSymbol()
{
POOP_BIN_SYMBOL.genericName = "Compost des toilettes sèches"
POOP_BIN_SYMBOL.markerUrl = new URL("../icons/poubelle-caca.svg", import.meta.url)
POOP_BIN_SYMBOL.indexSynonyms = [
"poubelle",
"dechet",
"déchet",
"compost",
"épluchures",
"toilettes sèches",
"caca"
]
}