diff --git a/.env.sample b/.env.sample index 73338d8d4..5950dd0f6 100644 --- a/.env.sample +++ b/.env.sample @@ -1,3 +1,3 @@ CONFIG=vidos-config.json -NUXT_PUBLIC_SENTRY_DSN= -NUXT_PUBLIC_SENTRY_ENVIRONMENT=production +SENTRY_DSN= +SENTRY_ENVIRONMENT=production diff --git a/README.md b/README.md index 164a6c303..080d20b86 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Full entry points documentation available on [api.yml](public/api.yaml) and on s * Full page: `/`, `/{poi_Id}`, `/{category_ids}/` and `/{category_ids}/{poi_id}`. * Parameters: * `boundary`: an alternative boundary key from settings `polygons_extra`. + * `clipingPolygonSlug`: POI filtering by polygon (key from settings `polygons_extra`). * Embedded: `/embedded/`, same subpath and parameters as full page. * POI: * details: `/poi/{id}/details`. @@ -82,7 +83,7 @@ yarn start ``` cp .env.sample .env docker compose build -docker-compose -f docker compose.yml run --rm vido yarn build-config +docker compose run --rm vido yarn build-config docker compose up -d ``` @@ -108,7 +109,23 @@ Header set Content-Security-Policy "frame-ancestors *" Vido is mainly building using: - [MapLibre GL JS](https://maplibre.org/maplibre-gl-js-docs/api/map/) -- [Nxut3](https://nuxt.com/) and [Vue3](https://vuejs.org/), using the Options API +- [Nuxt 3](https://nuxt.com/) and [Vue 3](https://vuejs.org/), using both Options API / Composition API + +### Setup hooks + +Ensure that `core.hooksPath` is properly setup ! + +From your project root run: + +```bash +git config core.hooksPath .git/hooks/ +``` + +Then update your hooks with the following command: + +```bash +yarn dlx simple-git-hooks +``` ``` # serve with hot reload at localhost:3000 diff --git a/components/Fields/Coordinates.vue b/components/Fields/Coordinates.vue index 2706e443b..8f1e04934 100644 --- a/components/Fields/Coordinates.vue +++ b/components/Fields/Coordinates.vue @@ -5,7 +5,6 @@ import type { PropType } from 'vue' import { defineNuxtComponent } from '#app' import ExternalLink from '~/components/UI/ExternalLink.vue' import { coordinatesHref } from '~/lib/coordinates' -import { isIOS } from '~/utils/isIOS' export function isCoordinatesEmpty(geom: GeoJSON.Geometry): boolean { return !(geom && geom.type === 'Point' && geom.coordinates) @@ -30,9 +29,7 @@ export default defineNuxtComponent({ }, mounted() { - // isOS is client side only - this.href - = isIOS !== undefined ? coordinatesHref(this.geom, isIOS()) : undefined + this.href = coordinatesHref(this.geom) }, }) diff --git a/components/Fields/Field.vue b/components/Fields/Field.vue index 7eee6309d..f5d164b0c 100644 --- a/components/Fields/Field.vue +++ b/components/Fields/Field.vue @@ -10,7 +10,8 @@ import DateRange, { isDateRangeEmpty } from '~/components/Fields/DateRange.vue' import Facebook from '~/components/Fields/Facebook.vue' import LinkedIn from '~/components/Fields/LinkedIn.vue' import Instagram from '~/components/Fields/Instagram.vue' -import OpeningHours, { isOpeningHoursSupportedOsmTags } from '~/components/Fields/OpeningHours.vue' +import OpeningHours from '~/components/Fields/OpeningHours.vue' +import { isOpeningHoursSupportedOsmTags } from '~/composables/useOpeningHours' import Phone from '~/components/Fields/Phone.vue' import RoutesField from '~/components/Fields/RoutesField.vue' import Stars from '~/components/Fields/Stars.vue' @@ -313,7 +314,7 @@ export default defineNuxtComponent({ " :href="properties[field.field]" class="d-inline-block pa-2 rounded-lg" - :style="{ backgroundColor: colorfill, color: '#ffffff' }" + :style="{ color: '#ffffff' }" > {{ fieldTranslateK(field.field) }} diff --git a/components/Fields/OpeningHours.vue b/components/Fields/OpeningHours.vue index 7909a4fed..b178d1489 100644 --- a/components/Fields/OpeningHours.vue +++ b/components/Fields/OpeningHours.vue @@ -1,193 +1,149 @@ - diff --git a/components/Layout/Header.vue b/components/Layout/Header.vue index 97729d7e5..0b5ffae2d 100644 --- a/components/Layout/Header.vue +++ b/components/Layout/Header.vue @@ -28,7 +28,10 @@ export default defineNuxtComponent({ ...mapState(siteStore, ['locale']), mainUrl(): string { - return (this.locale && this.theme.main_url?.[this.locale]) || '' + return (this.locale && this.theme.main_url?.[this.locale]) || '/' + }, + target() { + return (this.locale && this.theme.main_url?.[this.locale]) ? '_blank' : '_self' }, }, }) @@ -39,6 +42,7 @@ export default defineNuxtComponent({