aboutsummaryrefslogtreecommitdiff
path: root/src/components/still-image
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-03-12 02:31:33 +0300
committerHenry Jameson <me@hjkos.com>2018-03-12 02:31:33 +0300
commit0c4dc26808c3bb7508bf9005f3c3430f1c7e2039 (patch)
tree4bf42b369fd8a90246272c36f04b9f478ebc2db3 /src/components/still-image
parent5efd8a4aa6cd4deca287781be24083fc468c563a (diff)
after nine years of development, hopefully, it has been worth the weight
Diffstat (limited to 'src/components/still-image')
-rw-r--r--src/components/still-image/still-image.js7
-rw-r--r--src/components/still-image/still-image.vue14
2 files changed, 16 insertions, 5 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js
index f0b25265..0839aca5 100644
--- a/src/components/still-image/still-image.js
+++ b/src/components/still-image/still-image.js
@@ -4,9 +4,14 @@ const StillImage = {
'referrerpolicy',
'mimetype'
],
+ data () {
+ return {
+ stopGifs: this.$store.state.config.stopGifs
+ }
+ },
computed: {
animated () {
- return this.mimetype === 'image/gif' || this.src.endsWith('.gif')
+ return this.stopGifs && (this.mimetype === 'image/gif' || this.src.endsWith('.gif'))
}
},
methods: {
diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue
index 91d7f77a..5695c554 100644
--- a/src/components/still-image/still-image.vue
+++ b/src/components/still-image/still-image.vue
@@ -12,17 +12,23 @@
.still-image {
position: relative;
line-height: 0;
-
+ overflow: hidden;
+
&:hover canvas {
display: none;
}
-
+
+ img {
+ width: 100%;
+ height: 100%
+ }
+
&.animated {
&:hover::before,
img {
- visibility: hidden
+ visibility: hidden;
}
-
+
&:hover img {
visibility: visible
}