diff --git a/assets/svg/chevron-left.svg b/assets/svg/chevron-left.svg index fd1124a..beeaa7c 100644 --- a/assets/svg/chevron-left.svg +++ b/assets/svg/chevron-left.svg @@ -1,18 +1,18 @@ diff --git a/assets/svg/chevron.svg b/assets/svg/chevron.svg deleted file mode 100644 index bf371c1..0000000 --- a/assets/svg/chevron.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/assets/svg/close-wide.svg b/assets/svg/close-wide.svg new file mode 100644 index 0000000..7806493 --- /dev/null +++ b/assets/svg/close-wide.svg @@ -0,0 +1,16 @@ + + + + diff --git a/components/GalleryImageViewer.vue b/components/GalleryImageViewer.vue index 6af8f8b..41ecc4c 100644 --- a/components/GalleryImageViewer.vue +++ b/components/GalleryImageViewer.vue @@ -27,8 +27,9 @@
- X + @click="$emit('close')" + > +
import ThumbNav from '@/components/ThumbNav' import imageLoader from '~/mixins/imageLoader.js' +import SVGIcon from '@/assets/svg/close-wide.svg' export default { components: { - ThumbNav + ThumbNav, + SVGIcon, }, mixins: [ imageLoader ], props: { @@ -170,10 +173,19 @@ export default { .close-viewer { z-index: 10; position: absolute; - top: 0; - right: 0; - font-size: 10em; + width: 3rem; + height: 3rem; + top: calc(#{$site-menu__header-height} + 2px); + right: 2px; cursor: pointer; + + transition: opacity .3s .2s; + opacity: .2; + + &:hover { + opacity: .4; + animation: rotate .3s ease-in-out 1; + } } .image-viewer { @@ -296,4 +308,22 @@ export default { opacity: 0.1; } } + +@keyframes rotate { + 0%, 100% { + transform: rotate(0deg); + } + + 30% { + transform: rotate(3deg); + } + + 60% { + transform: rotate(-1deg); + } + + 80% { + transform: rotate(1deg); + } +}