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">
|
|
|
|
<img :src="baseUrl + slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%" />
|
|
|
|
</template>
|
|
|
|
<template #thumbnail="slotProps">
|
|
|
|
<img :src="baseUrl + slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" />
|
|
|
|
</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-09 20:47:59 +00:00
|
|
|
],
|
2022-12-27 07:23:26 +00:00
|
|
|
baseUrl: process.dev ? '' : '/primevue-nuxt'
|
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>
|