<template>
<Stories :stories="items" />
</template>
<script>
import Stories from "vue-stories-instagram";
export default {
components: { Stories },
data: () => ({
items: [
{
username: "Jessica Valentine",
picture: "https://randomuser.me/api/portraits/men/61.jpg",
time: "12h",
images: [
{
url: "https://randomwordgenerator.com/img/picture-generator/57e7d4414d51a814f1dc8460962e33791c3ad6e04e50744172287cd09e49cd_640.jpg",
viewed: true,
},
{
url: "https://randomwordgenerator.com/img/picture-generator/55e4d5474350b10ff3d8992cc12c30771037dbf852547849712a73d5954d_640.jpg",
viewed: true,
},
{
url: "https://randomwordgenerator.com/img/picture-generator/54e2d3414950a914f1dc8460962e33791c3ad6e04e5074417d2e72d29e4ecd_640.jpg",
viewed: false,
},
{
url: "https://cdn.videvo.net/videvo_files/video/free/2014-12/large_watermarked/Metal_Wind_Chimes_at_Sunset_preview.mp4",
viewed: false,
type: 'video',
},
],
},
]
})
};
</script>
<template>
<Stories :stories="items"
:showInnerContent="true"
:showOuterContent="true" >
<template v-slot:innerContent="{ story }">
<div class="property" v-if="story.property">
<div class="property__image">
<img :src="story.property.picture" alt=""/>
</div>
<div class="property__description">
<div class="property__price">{{ story.property.price }}</div>
<div class="property__location">{{ story.property.location }}</div>
</div>
</div>
</template>
<template v-slot:outerContent="{ story }">
<div v-if="story.info" class="story-info">
<div class="story-info__description">
<div class="story-info__price">{{ story.info.price }}</div>
<div class="story-info__location">{{ story.info.location }}</div>
</div>
<ul class="actions">
<li class="actions__item">
<img width="28" height="28" src="~/assets/images/icons/ic_comment.svg" alt="" class="actions__icon">
<div class="actions__text">{{ story.info.comment }}</div>
</li>
<li class="actions__item">
<img width="28" height="28" src="~/assets/images/icons/ic_favorite.svg" alt="" class="actions__icon">
<div class="actions__text">{{ story.info.like }}</div>
</li>
</ul>
</div>
</template>
</Stories>
</template>
<script>
import Stories from "vue-insta-stories";
export default {
components: { Stories },
data: () => ({
items: [ {
username: "Jessica Valentine",
picture: "https://randomuser.me/api/portraits/men/61.jpg",
time: "12h",
images: [
{
url: "https://randomwordgenerator.com/img/picture-generator/57e7d4414d51a814f1dc8460962e33791c3ad6e04e50744172287cd09e49cd_640.jpg",
viewed: true,
},
{
url: "https://randomwordgenerator.com/img/picture-generator/55e4d5474350b10ff3d8992cc12c30771037dbf852547849712a73d5954d_640.jpg",
viewed: true,
},
{
url: "https://randomwordgenerator.com/img/picture-generator/54e2d3414950a914f1dc8460962e33791c3ad6e04e5074417d2e72d29e4ecd_640.jpg",
viewed: false,
},
{
url: "https://cdn.videvo.net/videvo_files/video/free/2014-12/large_watermarked/Metal_Wind_Chimes_at_Sunset_preview.mp4",
viewed: false,
type: 'video',
},
],
property: {
picture: 'https://randomwordgenerator.com/img/picture-generator/57e7d4414d51a814f1dc8460962e33791c3ad6e04e50744172287cd09e49cd_640.jpg',
price: '$599,000',
location: '415 SW 30th Rd, Miami, FL',
},
info: {
price: '$599,000',
location: '415 SW 30th Rd, Miami, FL',
comment: '125',
like: '400',
},
}]
})
};
</script>