diff --git a/components/Fields/Field.vue b/components/Fields/Field.vue index f5d164b0..807af690 100644 --- a/components/Fields/Field.vue +++ b/components/Fields/Field.vue @@ -314,7 +314,7 @@ export default defineNuxtComponent({ " :href="properties[field.field]" class="d-inline-block pa-2 rounded-lg" - :style="{ color: '#ffffff' }" + :style="{ backgroundColor: colorfill, color: '#ffffff' }" > {{ fieldTranslateK(field.field) }} diff --git a/pages/embedded.vue b/pages/embedded.vue index cef2ab64..862a07ff 100644 --- a/pages/embedded.vue +++ b/pages/embedded.vue @@ -22,7 +22,7 @@ const { $trackingInit } = useNuxtApp() const boundaryGeojson = ref() const poiId = ref() const categoryIds = ref() -const categoryIdsRegex = /^(?:(?cartocode:[a-zA-Z0-9]{2})|(?ref:[a-z0-9-]+:[a-zA-Z0-9]+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ +const categoryIdsRegex = /^(?:(?cartocode:\w{2})|(?ref:[\w-]+:\w+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ // // Hooks diff --git a/pages/embedded/[p1]/[poiId].vue b/pages/embedded/[p1]/[poiId].vue index 1d28a2c1..c87b1d0d 100644 --- a/pages/embedded/[p1]/[poiId].vue +++ b/pages/embedded/[p1]/[poiId].vue @@ -4,8 +4,8 @@ // definePageMeta({ validate: ({ params }) => { - const regexForCategoryIds = /^(?:(?cartocode:[a-zA-Z0-9]{2})|(?ref:[a-z0-9-]+:[a-zA-Z0-9]+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ - const regexForPOIIds = /^(?:cartocode:[a-zA-Z0-9]{2}|ref:[a-z0-9-]+:[a-zA-Z0-9]+|osm:[nwr]\d+|\d+)$/ + const regexForCategoryIds = /^(?:(?cartocode:\w{2})|(?ref:[\w-]+:\w+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ + const regexForPOIIds = /^(?:cartocode:\w{2}|ref:[\w-]+:\w+|osm:[nwr]\d+|\d+)$/ const match = params.p1.toString().match(regexForCategoryIds) if (match?.groups && (match.groups.cartocode || match.groups.reference || match.groups.osm)) { diff --git a/pages/embedded/[p1]/index.vue b/pages/embedded/[p1]/index.vue index 80620bd1..82741f75 100644 --- a/pages/embedded/[p1]/index.vue +++ b/pages/embedded/[p1]/index.vue @@ -4,7 +4,7 @@ // definePageMeta({ validate: ({ params }) => { - const regexForIds = /^(?:cartocode:[a-zA-Z0-9]{2}|ref:[a-z0-9-]+:[a-zA-Z0-9]+|osm:[nwr]\d+|\d+(?:,\d+)*)$/ + const regexForIds = /^(?:cartocode:\w{2}|ref:[\w-]+:\w+|osm:[nwr]\d+|\d+(?:,\d+)*)$/ return regexForIds.test(params.p1.toString()) }, diff --git a/pages/index.vue b/pages/index.vue index 34084d98..4c2d1d74 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -22,7 +22,7 @@ const { $trackingInit } = useNuxtApp() const boundaryGeojson = ref() const poiId = ref() const categoryIds = ref() -const categoryIdsRegex = /^(?:(?cartocode:[a-zA-Z0-9]{2})|(?ref:[a-z0-9-]+:[a-zA-Z0-9]+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ +const categoryIdsRegex = /^(?:(?cartocode:\w{2})|(?ref:[\w-]+:\w+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ // // Hooks diff --git a/pages/index/[p1]/[poiId].vue b/pages/index/[p1]/[poiId].vue index 1d28a2c1..c87b1d0d 100644 --- a/pages/index/[p1]/[poiId].vue +++ b/pages/index/[p1]/[poiId].vue @@ -4,8 +4,8 @@ // definePageMeta({ validate: ({ params }) => { - const regexForCategoryIds = /^(?:(?cartocode:[a-zA-Z0-9]{2})|(?ref:[a-z0-9-]+:[a-zA-Z0-9]+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ - const regexForPOIIds = /^(?:cartocode:[a-zA-Z0-9]{2}|ref:[a-z0-9-]+:[a-zA-Z0-9]+|osm:[nwr]\d+|\d+)$/ + const regexForCategoryIds = /^(?:(?cartocode:\w{2})|(?ref:[\w-]+:\w+)|(?osm:[nwr]\d+)|\d+(?:,\d+)*)$/ + const regexForPOIIds = /^(?:cartocode:\w{2}|ref:[\w-]+:\w+|osm:[nwr]\d+|\d+)$/ const match = params.p1.toString().match(regexForCategoryIds) if (match?.groups && (match.groups.cartocode || match.groups.reference || match.groups.osm)) { diff --git a/pages/index/[p1]/index.vue b/pages/index/[p1]/index.vue index 80620bd1..82741f75 100644 --- a/pages/index/[p1]/index.vue +++ b/pages/index/[p1]/index.vue @@ -4,7 +4,7 @@ // definePageMeta({ validate: ({ params }) => { - const regexForIds = /^(?:cartocode:[a-zA-Z0-9]{2}|ref:[a-z0-9-]+:[a-zA-Z0-9]+|osm:[nwr]\d+|\d+(?:,\d+)*)$/ + const regexForIds = /^(?:cartocode:\w{2}|ref:[\w-]+:\w+|osm:[nwr]\d+|\d+(?:,\d+)*)$/ return regexForIds.test(params.p1.toString()) },