diff --git a/packages/mapviewer/src/modules/i18n/locales/de.json b/packages/mapviewer/src/modules/i18n/locales/de.json index d0ab0eb2de..be33c84c11 100644 --- a/packages/mapviewer/src/modules/i18n/locales/de.json +++ b/packages/mapviewer/src/modules/i18n/locales/de.json @@ -27,6 +27,9 @@ "appcache_update_available": "Neue Version der Offline Funktion verfügbar. Wollen Sie sie laden?", "approx_abbr": "ca.", "are": "ARE", + "attribution_overflow_hide_sources": "Weitere Quellenangaben ausblenden", + "attribution_overflow_show_source": "Eine weitere Quellenangabe anzeigen", + "attribution_overflow_show_sources": "{count} weitere Quellenangaben anzeigen", "are_service_link_href": "http://www.are.admin.ch/index.html?lang=de", "are_service_link_label": "www.are.admin.ch", "area": "Fläche", diff --git a/packages/mapviewer/src/modules/i18n/locales/en.json b/packages/mapviewer/src/modules/i18n/locales/en.json index 456214aa50..dc82b2b898 100644 --- a/packages/mapviewer/src/modules/i18n/locales/en.json +++ b/packages/mapviewer/src/modules/i18n/locales/en.json @@ -27,6 +27,9 @@ "appcache_update_available": "A new version of offline function is available. Load it?", "approx_abbr": "approx.", "are": "ARE", + "attribution_overflow_hide_sources": "Hide additional attribution sources", + "attribution_overflow_show_source": "Show 1 more attribution source", + "attribution_overflow_show_sources": "Show {count} more attribution sources", "are_service_link_href": "http://www.are.admin.ch/index.html?lang=en", "are_service_link_label": "www.are.admin.ch", "area": "Area", diff --git a/packages/mapviewer/src/modules/i18n/locales/fr.json b/packages/mapviewer/src/modules/i18n/locales/fr.json index d7ed9f75bb..826fb33f2c 100644 --- a/packages/mapviewer/src/modules/i18n/locales/fr.json +++ b/packages/mapviewer/src/modules/i18n/locales/fr.json @@ -27,6 +27,9 @@ "appcache_update_available": "Une mise à jour du site est disponible. Voulez-vous l'utiliser?", "approx_abbr": "env.", "are": "ARE", + "attribution_overflow_hide_sources": "Masquer les autres sources d'attribution", + "attribution_overflow_show_source": "Afficher une autre source d'attribution", + "attribution_overflow_show_sources": "Afficher {count} autres sources d'attribution", "are_service_link_href": "http://www.are.admin.ch/index.html?lang=fr", "are_service_link_label": "www.are.admin.ch", "area": "Aire", diff --git a/packages/mapviewer/src/modules/i18n/locales/it.json b/packages/mapviewer/src/modules/i18n/locales/it.json index 9e95c5750e..eaf927f098 100644 --- a/packages/mapviewer/src/modules/i18n/locales/it.json +++ b/packages/mapviewer/src/modules/i18n/locales/it.json @@ -27,6 +27,9 @@ "appcache_update_available": "È a disposizione un aggiornamento del sito. Desiderate utilizzarlo?", "approx_abbr": "ca.", "are": "ARE", + "attribution_overflow_hide_sources": "Nascondi altre fonti di attribuzione", + "attribution_overflow_show_source": "Mostra un'altra fonte di attribuzione", + "attribution_overflow_show_sources": "Mostra altre {count} fonti di attribuzione", "are_service_link_href": "http://www.are.admin.ch/index.html?lang=it", "are_service_link_label": "www.are.admin.ch", "area": "Zona", diff --git a/packages/mapviewer/src/modules/i18n/locales/rm.json b/packages/mapviewer/src/modules/i18n/locales/rm.json index 62af07c544..43985511c3 100644 --- a/packages/mapviewer/src/modules/i18n/locales/rm.json +++ b/packages/mapviewer/src/modules/i18n/locales/rm.json @@ -27,6 +27,9 @@ "appcache_update_available": "Ina nova versiun stat a disposiziun offline. La vulais Vus chargiar giu?", "approx_abbr": "ca.", "are": "ARE", + "attribution_overflow_hide_sources": "Zuppentar ulteriuras funtaunas d'attribuziun", + "attribution_overflow_show_source": "Mussar ina ulteriura funtauna d'attribuziun", + "attribution_overflow_show_sources": "Mussar {count} ulteriuras funtaunas d'attribuziun", "are_service_link_href": "http://www.are.admin.ch/index.html?lang=de", "are_service_link_label": "www.are.admin.ch", "area": "Surfatscha", diff --git a/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionItem.vue b/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionItem.vue index debfb814a9..da4b0b9a2e 100644 --- a/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionItem.vue +++ b/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionItem.vue @@ -1,5 +1,5 @@ @@ -29,9 +33,15 @@ const { sourceId, sourceName, sourceUrl, hasDataDisclaimer, isLast } = definePro :id="`source-${sourceId}`" :href="sourceUrl" :target="sourceUrl ? '_blank' : null" + :rel="sourceUrl ? 'noopener noreferrer' : null" class="map-footer-attribution-source clear-no-ios-long-press" - :class="{ 'text-primary': hasDataDisclaimer, 'is-link': sourceUrl || hasDataDisclaimer }" + :class="{ + 'text-primary': hasDataDisclaimer, + 'is-link': sourceUrl || hasDataDisclaimer, + 'is-truncated': isTruncated, + }" :data-cy="`layer-copyright-${sourceName}`" + :title="sourceName" > {{ `${sourceName}${isLast ? '' : ','}` }} @@ -44,6 +54,15 @@ const { sourceId, sourceName, sourceUrl, hasDataDisclaimer, isLast } = definePro margin-left: 2px; color: $black; + &.is-truncated { + display: inline-block; + max-width: min(16rem, 28vw); + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; + white-space: nowrap; + } + &.is-link { text-decoration: none; &:hover { diff --git a/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionList.vue b/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionList.vue index b8458dec37..f9296c48cd 100644 --- a/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionList.vue +++ b/packages/mapviewer/src/modules/map/components/footer/MapFooterAttributionList.vue @@ -1,5 +1,5 @@ @@ -96,5 +182,18 @@ const sources = computed(() => { text-align: center; position: relative; pointer-events: all; + max-width: calc(100vw - 0.5rem); +} + +.map-footer-attribution-toggle { + font-size: inherit; + line-height: 1.2; +} + +.map-footer-attribution-expanded-list { + bottom: calc(100% + 0.25rem); + z-index: $zindex-desktop-footer-infobox; + max-width: min(24rem, calc(100vw - 1rem)); + max-height: 30vh; }