|
1 | 1 | <script setup lang="ts"> |
2 | 2 | import { ref, watch, nextTick, onUnmounted, computed } from 'vue'; |
3 | 3 | import { useI18n } from 'vue-i18n'; |
| 4 | +import { Icon } from '@iconify/vue'; |
4 | 5 | import { createFocusTrap, type FocusTrap } from 'focus-trap'; |
5 | 6 | import fallbackBannerImage from '../images/community_background_2x.png?url'; |
6 | 7 |
|
@@ -60,6 +61,13 @@ onUnmounted(() => { |
60 | 61 | :aria-label="t('nav.info_modal_title')" |
61 | 62 | class="info-modal" |
62 | 63 | > |
| 64 | + <button |
| 65 | + class="info-modal-close" |
| 66 | + :aria-label="t('nav.info_modal_back_to_map')" |
| 67 | + @click="handleClose()" |
| 68 | + > |
| 69 | + <Icon icon="bi:x-lg" width="1.125em" height="1.125em" aria-hidden="true" /> |
| 70 | + </button> |
63 | 71 | <img |
64 | 72 | :src="bannerImage" |
65 | 73 | class="info-modal-banner" |
@@ -111,6 +119,33 @@ onUnmounted(() => { |
111 | 119 | overflow: hidden; |
112 | 120 | } |
113 | 121 |
|
| 122 | +.info-modal-close { |
| 123 | + position: absolute; |
| 124 | + top: var(--spacing-sm); |
| 125 | + right: var(--spacing-sm); |
| 126 | + z-index: 1; |
| 127 | + width: 32px; |
| 128 | + height: 32px; |
| 129 | + display: flex; |
| 130 | + align-items: center; |
| 131 | + justify-content: center; |
| 132 | + background: rgba(0, 0, 0, 0.35); |
| 133 | + color: #fff; |
| 134 | + border: none; |
| 135 | + border-radius: 50%; |
| 136 | + cursor: pointer; |
| 137 | + transition: background-color 0.15s ease; |
| 138 | +} |
| 139 | +
|
| 140 | +.info-modal-close:hover { |
| 141 | + background: rgba(0, 0, 0, 0.55); |
| 142 | +} |
| 143 | +
|
| 144 | +.info-modal-close:focus-visible { |
| 145 | + outline: 2px solid var(--color-focus); |
| 146 | + outline-offset: 2px; |
| 147 | +} |
| 148 | +
|
114 | 149 | .info-modal-banner { |
115 | 150 | display: block; |
116 | 151 | width: 100%; |
|
0 commit comments