mirror of
https://github.com/pinry/pinry.git
synced 2025-11-16 09:55:50 +01:00
Feature: Add style for image
This commit is contained in:
committed by
Isaac Bythewood
parent
db2d7ce9ef
commit
c335a3dcb8
@@ -13,10 +13,17 @@ Vue.component('pin', {
|
|||||||
'editable': true,
|
'editable': true,
|
||||||
'active': false,
|
'active': false,
|
||||||
'textId': null,
|
'textId': null,
|
||||||
|
'imageStyle': null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: ['pin'],
|
props: ['pin'],
|
||||||
template: '#pin-template',
|
template: '#pin-template',
|
||||||
|
mounted: function() {
|
||||||
|
this.imageStyle = {
|
||||||
|
width: this.pin.image.thumbnail.width + 'px',
|
||||||
|
height: this.pin.image.thumbnail.height + 'px',
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInlineStyle: function() {
|
getInlineStyle: function() {
|
||||||
return {};
|
return {};
|
||||||
@@ -47,7 +54,7 @@ Vue.component('pin-container', {
|
|||||||
return {
|
return {
|
||||||
"windowWidth": null,
|
"windowWidth": null,
|
||||||
"blockWidth": "240px",
|
"blockWidth": "240px",
|
||||||
"blockMargin": "240px",
|
"blockMargin": "15px",
|
||||||
"pins": [],
|
"pins": [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<a :href="pin.image.image" class="lightbox">
|
<a :href="pin.image.image" class="lightbox" :style="imageStyle">
|
||||||
<div class="image-wrapper">
|
<div class="image-wrapper">
|
||||||
<img :src="pin.image.thumbnail.image" v-on:load="onImageLoad">
|
<img :src="pin.image.thumbnail.image" v-on:load="onImageLoad">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user