after nine years of development, hopefully, it has been worth the weight

This commit is contained in:
Henry Jameson 2018-03-12 02:31:33 +03:00
parent 5efd8a4aa6
commit 0c4dc26808
11 changed files with 72 additions and 17 deletions

View file

@ -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: {

View file

@ -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
}