Updated package and restaurant data

This commit is contained in:
Alexis
2025-10-05 14:52:35 +02:00
parent b8db5ff17c
commit a3dbc5623b
5 changed files with 808 additions and 660 deletions

View File

@@ -0,0 +1,26 @@
<script setup lang="ts">
import type { DefaultMarker } from '@/models/Markers';
import { LMarker, LPopup, LIcon } from '@vue-leaflet/vue-leaflet'
import type { Marker, PointTuple } from 'leaflet';
import { computed, ref } from 'vue';
defineProps<{
marker: DefaultMarker
}>()
const iconSize = ref<PointTuple>([38, 38])
const iconAnchor = computed<PointTuple>(() => [iconSize.value[0] / 2, iconSize.value[1]])
const popupOffset = [0, iconSize.value[0] * -0.66]
</script>
<template>
<LMarker :lat-lng="marker.coords">
<LPopup :options="{ offset: popupOffset, maxWidth: 380, minWidth: 180 }">
<div class="spacing">
<h2 class="font-bold text-[1.2em] leading-5">
{{ marker.title }}
</h2>
</div>
</LPopup>
</LMarker>
</template>

View File

@@ -1,12 +1,15 @@
import type { PointTuple } from "leaflet"
export type MarkerType = "restaurant" | "bar" | "bakery" | "tea-shop" | "coffee-shop" | "ice-cream"
export type ReviewType = "restaurant" | "bar" | "bakery" | "tea-shop" | "coffee-shop" | "ice-cream"
export type FoodType = "mixed" | "asian" | "creole" | "vegetarian" | "italian" | "fast-food" | "street-food" | "burgers" | "seafood" | "creperie" | "eastern"
export interface ReviewMarker {
export interface DefaultMarker {
coords: PointTuple
title?: string
type?: MarkerType
}
export interface ReviewMarker extends DefaultMarker {
type?: ReviewType
food?: FoodType
reviews?: Review[]
closed?: boolean
@@ -14,5 +17,5 @@ export interface ReviewMarker {
export interface Review {
text?: string
grade: number
grade?: number
}

View File

@@ -1130,6 +1130,29 @@ const markers: ReviewMarker[] = [
}
]
},
{
title: "Kôlochô",
coords: [48.11488165818657, -1.678557210653959],
type: "restaurant",
food: "eastern",
reviews: [
{
grade: 4.4
}
]
},
{
title: "Pizzabio",
coords: [48.11467545427892, -1.6568704800997238],
type: "restaurant",
food: "italian",
reviews: [
{
grade: 4.0,
text: "L'endroit ne paye pas de mine, mais les pizzas végétariennes sont délicieuses et très nourrissantes."
}
]
},
{
title: "Frencheez",
coords: [48.114769618169206, -1.6791796367468956],
@@ -1232,7 +1255,7 @@ const markers: ReviewMarker[] = [
reviews: [
{
grade: 0.9,
text: "J'ai rarement goûté à un kebab aussi fade, plastique, sans saveur et gras de ma vie."
text: "J'ai rarement goûté à un kebab aussi fade, plastique et gras de ma vie."
}
]
},