2022-09-09 20:41:18 +00:00
|
|
|
<template>
|
2022-12-19 11:57:07 +00:00
|
|
|
<div>
|
|
|
|
<Head>
|
|
|
|
<Title>Vue Gallery Component</Title>
|
|
|
|
<Meta name="description" content="Galleria is a content gallery component." />
|
|
|
|
</Head>
|
|
|
|
|
|
|
|
<div class="galleria-demo">
|
|
|
|
<div class="content-section introduction">
|
|
|
|
<div class="feature-intro">
|
|
|
|
<h1>Galleria</h1>
|
|
|
|
<p>Galleria is an advanced content gallery component.</p>
|
|
|
|
</div>
|
2022-09-09 20:41:18 +00:00
|
|
|
</div>
|
|
|
|
|
2022-12-19 11:57:07 +00:00
|
|
|
<div class="content-section implementation">
|
|
|
|
<div class="card">
|
|
|
|
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
|
|
|
|
<template #item="slotProps">
|
2023-02-06 16:14:52 +00:00
|
|
|
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%" />
|
2022-12-19 11:57:07 +00:00
|
|
|
</template>
|
|
|
|
<template #thumbnail="slotProps">
|
2023-02-06 16:14:52 +00:00
|
|
|
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" />
|
2022-12-19 11:57:07 +00:00
|
|
|
</template>
|
|
|
|
</Galleria>
|
|
|
|
</div>
|
2022-09-09 20:41:18 +00:00
|
|
|
</div>
|
|
|
|
|
2022-12-19 11:57:07 +00:00
|
|
|
<GalleriaDoc />
|
|
|
|
</div>
|
2022-09-09 20:41:18 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import PhotoService from '../../service/PhotoService';
|
|
|
|
import GalleriaDoc from './GalleriaDoc';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
images: null,
|
|
|
|
responsiveOptions: [
|
|
|
|
{
|
|
|
|
breakpoint: '1024px',
|
|
|
|
numVisible: 5
|
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '768px',
|
|
|
|
numVisible: 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '560px',
|
|
|
|
numVisible: 1
|
|
|
|
}
|
2022-12-27 20:54:26 +00:00
|
|
|
]
|
2022-09-09 20:41:18 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
galleriaService: null,
|
|
|
|
created() {
|
|
|
|
this.galleriaService = new PhotoService();
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.galleriaService.getImages().then((data) => (this.images = data));
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
GalleriaDoc: GalleriaDoc
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|