Compare commits

..

No commits in common. "4c7f4357d2ba203d846a528898412547bee5f145" and "75666740eef75d8fd57d90f714ee0c88381647ec" have entirely different histories.

3 changed files with 8 additions and 20 deletions

View File

@ -1,7 +1,7 @@
--- ---
import type { Input as Props } from 'types'; import type { Input as Props } from 'types';
const {value, checked ,name, label, autocomplete, placeholder, divClass, inputClass} = Astro.props; const { checked ,name, label, autocomplete, placeholder, divClass, inputClass} = Astro.props;
--- ---
@ -14,7 +14,6 @@ const {value, checked ,name, label, autocomplete, placeholder, divClass, inputCl
name={name} name={name}
id={name} id={name}
checked={checked} checked={checked}
value={value}
autocomplete={autocomplete} autocomplete={autocomplete}
placeholder={placeholder} placeholder={placeholder}
class={"mr-2 size-5 " + inputClass} class={"mr-2 size-5 " + inputClass}

View File

@ -32,8 +32,7 @@ const metadata = {
<p class="text-center text-xl mb-3">Type POI :</p> <p class="text-center text-xl mb-3">Type POI :</p>
<CheckBox <CheckBox
label="Bar, Pub, Café,..." label="Bar, Pub, Café,..."
name="filter" name="drink"
value="drink"
checked checked
/> />
</div> </div>
@ -41,8 +40,7 @@ const metadata = {
<p class="text-center text-xl mb-3">Source :</p> <p class="text-center text-xl mb-3">Source :</p>
<CheckBox <CheckBox
label="Open Trip Maps" label="Open Trip Maps"
name="filter" name="otm"
value="otm"
checked checked
/> />
</div> </div>
@ -130,14 +128,7 @@ const metadata = {
tags += "- " + element + "<br/>" tags += "- " + element + "<br/>"
}) })
const poiMarker = L.marker([element.geometry.coordinates[1],element.geometry.coordinates[0]],icon) const poiMarker = L.marker([element.geometry.coordinates[1],element.geometry.coordinates[0]],icon)
.bindPopup(`<b>${prop.name}</b><br/>note : ${prop.rate} <br/>tags:<br/> ${tags} <p>favori : <p> <input type="checkbox" name="like" id=${element.id}/>`) .bindPopup(`<b>${prop.name}</b><br/>note : ${prop.rate} <br/>tags:<br/> ${tags}`)
.on("click", () => {
document.querySelectorAll<HTMLInputElement>('input[name="like"]').forEach(e => {
e.addEventListener("click", () => {
console.log("poeut");
})
})
})
poiMarker.addTo(map) poiMarker.addTo(map)
poiMarkers.push(poiMarker) poiMarkers.push(poiMarker)
}) })
@ -158,7 +149,7 @@ const metadata = {
} }
} }
// envent pour lancer la recherche // envent pour lancer la recherche
const cooldown = 400 const cooldown = 1000
sender() sender()
let timeoutHandle = window.setTimeout(sender, cooldown) let timeoutHandle = window.setTimeout(sender, cooldown)
@ -177,9 +168,9 @@ const metadata = {
} }
}) })
document.querySelectorAll<HTMLInputElement>("input[name='filter']").forEach(e =>{ document.querySelectorAll<HTMLInputElement>("input[type='checkbox']").forEach(e =>{
e.addEventListener("click", () => { e.addEventListener("click", () => {
switch (e.value) { switch (e.name) {
case "drink": case "drink":
drink = e.checked drink = e.checked
break; break;
@ -204,5 +195,4 @@ const metadata = {
searchBox() searchBox()
}) })
}) })
</script> </script>

View File

@ -162,7 +162,7 @@ export interface Testimonial {
} }
export interface Input { export interface Input {
type?: HTMLInputTypeAttribute type: HTMLInputTypeAttribute
name: string name: string
label?: string label?: string
autocomplete?: string autocomplete?: string
@ -170,7 +170,6 @@ export interface Input {
divClass?: string divClass?: string
inputClass?: string inputClass?: string
checked?: bool checked?: bool
value?:string
} }
export interface Textarea { export interface Textarea {