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

@@ -18,12 +18,12 @@
"format": "prettier --write src/" "format": "prettier --write src/"
}, },
"dependencies": { "dependencies": {
"@tailwindcss/vite": "^4.1.13", "@tailwindcss/vite": "^4.1.14",
"@vue-leaflet/vue-leaflet": "^0.10.1", "@vue-leaflet/vue-leaflet": "^0.10.1",
"leaflet": "^1.9.4", "leaflet": "^1.9.4",
"pinia": "^3.0.3", "pinia": "^3.0.3",
"tailwindcss": "^4.1.13", "tailwindcss": "^4.1.14",
"vue": "^3.5.21", "vue": "^3.5.22",
"vue-leaflet-markercluster": "^0.6.1", "vue-leaflet-markercluster": "^0.6.1",
"vue-router": "^4.5.1" "vue-router": "^4.5.1"
}, },
@@ -31,22 +31,22 @@
"@prettier/plugin-oxc": "^0.0.4", "@prettier/plugin-oxc": "^0.0.4",
"@tsconfig/node22": "^22.0.2", "@tsconfig/node22": "^22.0.2",
"@types/leaflet": "^1.9.20", "@types/leaflet": "^1.9.20",
"@types/node": "^24.5.1", "@types/node": "^24.6.2",
"@vitejs/plugin-vue": "^6.0.1", "@vitejs/plugin-vue": "^6.0.1",
"@vue/eslint-config-prettier": "^10.2.0", "@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.6.0", "@vue/eslint-config-typescript": "^14.6.0",
"@vue/tsconfig": "^0.8.1", "@vue/tsconfig": "^0.8.1",
"eslint": "^9.35.0", "eslint": "^9.37.0",
"eslint-plugin-oxlint": "~1.16.0", "eslint-plugin-oxlint": "~1.19.0",
"eslint-plugin-vue": "~10.4.0", "eslint-plugin-vue": "~10.5.0",
"jiti": "^2.5.1", "jiti": "^2.6.1",
"npm-run-all2": "^8.0.4", "npm-run-all2": "^8.0.4",
"oxlint": "~1.16.0", "oxlint": "~1.19.0",
"prettier": "3.6.2", "prettier": "3.6.2",
"sass-embedded": "^1.92.1", "sass-embedded": "^1.93.2",
"typescript": "~5.9.2", "typescript": "~5.9.3",
"vite": "npm:rolldown-vite@^7.1.10", "vite": "npm:rolldown-vite@^7.1.15",
"vite-plugin-vue-devtools": "^8.0.2", "vite-plugin-vue-devtools": "^8.0.2",
"vue-tsc": "^3.0.7" "vue-tsc": "^3.1.0"
} }
} }

1380
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

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" 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 type FoodType = "mixed" | "asian" | "creole" | "vegetarian" | "italian" | "fast-food" | "street-food" | "burgers" | "seafood" | "creperie" | "eastern"
export interface ReviewMarker { export interface DefaultMarker {
coords: PointTuple coords: PointTuple
title?: string title?: string
type?: MarkerType }
export interface ReviewMarker extends DefaultMarker {
type?: ReviewType
food?: FoodType food?: FoodType
reviews?: Review[] reviews?: Review[]
closed?: boolean closed?: boolean
@@ -14,5 +17,5 @@ export interface ReviewMarker {
export interface Review { export interface Review {
text?: string 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", title: "Frencheez",
coords: [48.114769618169206, -1.6791796367468956], coords: [48.114769618169206, -1.6791796367468956],
@@ -1232,7 +1255,7 @@ const markers: ReviewMarker[] = [
reviews: [ reviews: [
{ {
grade: 0.9, 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."
} }
] ]
}, },