From e86999e454e41411e0f1a35626b0660560846c90 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Wed, 30 Jan 2019 16:59:31 +0000 Subject: [PATCH] proper svg icons --- assets/svg/chevron-left.svg | 12 ++++----- assets/svg/chevron.svg | 6 ----- assets/svg/close-wide.svg | 16 ++++++++++++ components/GalleryImageViewer.vue | 42 ++++++++++++++++++++++++++----- 4 files changed, 58 insertions(+), 18 deletions(-) delete mode 100644 assets/svg/chevron.svg create mode 100644 assets/svg/close-wide.svg 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); + } +}