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,
|
||||
'active': false,
|
||||
'textId': null,
|
||||
'imageStyle': null,
|
||||
}
|
||||
},
|
||||
props: ['pin'],
|
||||
template: '#pin-template',
|
||||
mounted: function() {
|
||||
this.imageStyle = {
|
||||
width: this.pin.image.thumbnail.width + 'px',
|
||||
height: this.pin.image.thumbnail.height + 'px',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getInlineStyle: function() {
|
||||
return {};
|
||||
@@ -47,7 +54,7 @@ Vue.component('pin-container', {
|
||||
return {
|
||||
"windowWidth": null,
|
||||
"blockWidth": "240px",
|
||||
"blockMargin": "240px",
|
||||
"blockMargin": "15px",
|
||||
"pins": [],
|
||||
};
|
||||
},
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<a :href="pin.image.image" class="lightbox">
|
||||
<a :href="pin.image.image" class="lightbox" :style="imageStyle">
|
||||
<div class="image-wrapper">
|
||||
<img :src="pin.image.thumbnail.image" v-on:load="onImageLoad">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user