2019-07-24 17:20:44 +02:00
|
|
|
<template>
|
|
|
|
<article class="showroom">
|
2022-09-19 15:58:11 +02:00
|
|
|
<section class="images" v-switcher>
|
|
|
|
|
|
|
|
<!-- <figure v-html="item.field_visuels"></figure> -->
|
|
|
|
<figure
|
|
|
|
v-for="(img, index) in item.images"
|
|
|
|
:key="img.url"
|
|
|
|
class="lazy"
|
|
|
|
v-lazy="index"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
:data-src="img.style_showroomhome.url"
|
|
|
|
@click="setLightBox(index)"
|
|
|
|
/>
|
|
|
|
</figure>
|
2019-07-24 17:20:44 +02:00
|
|
|
</section>
|
|
|
|
<section class="content">
|
2022-09-19 15:58:11 +02:00
|
|
|
<header>
|
|
|
|
<h1>{{item.name}}</h1>
|
|
|
|
</header>
|
|
|
|
<section class="description" v-html="item.description" />
|
|
|
|
<address>
|
|
|
|
<span v-if="item.address.organization">{{ item.address.organization }}</br></span>
|
|
|
|
<span v-if="item.address.address_line1">{{ item.address.address_line1 }}</br></span>
|
|
|
|
<span v-if="item.address.locality">{{ item.address.locality }}</br></span>
|
|
|
|
<span v-if="item.country.country_name">{{ item.country.country_name }}</span>
|
|
|
|
</address>
|
|
|
|
<div class="phone" v-html="item.phone" />
|
|
|
|
<a class="email" :href="'mailto:'+item.email" v-html="item.email" />
|
|
|
|
<div class="website">
|
|
|
|
<a _target="_blank" :href="item.website.url">{{ item.website.title }}</a>
|
|
|
|
</div>
|
2019-07-24 17:20:44 +02:00
|
|
|
</section>
|
|
|
|
</article>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-09-19 15:58:11 +02:00
|
|
|
import { mapState, mapActions } from 'vuex'
|
|
|
|
|
2021-09-16 21:40:18 +02:00
|
|
|
// import JSONAPI from 'vuejs/api/json-axios'
|
2019-07-24 17:20:44 +02:00
|
|
|
import router from 'vuejs/route'
|
|
|
|
|
2022-09-19 15:58:11 +02:00
|
|
|
import cardMixins from 'vuejs/components/cardMixins'
|
|
|
|
|
2019-07-24 17:20:44 +02:00
|
|
|
let basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "Showroom",
|
|
|
|
router,
|
2022-09-19 15:58:11 +02:00
|
|
|
mixins: [cardMixins],
|
2019-07-24 17:20:44 +02:00
|
|
|
props: ['item'],
|
|
|
|
// data(){
|
|
|
|
// return {
|
|
|
|
// alias: this.item.view_node.replace(/^.?\/showroom\//g, '')
|
|
|
|
// }
|
|
|
|
// },
|
2022-09-19 15:58:11 +02:00
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
coolLightBoxItems: state => state.Common.coolLightBoxItems,
|
|
|
|
coolLightBoxIndex: state => state.Common.coolLightBoxIndex
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
...mapActions({
|
|
|
|
setcoolLightBoxItems: 'Common/setcoolLightBoxItems',
|
|
|
|
setcoolLightBoxIndex: 'Common/setcoolLightBoxIndex'
|
|
|
|
}),
|
|
|
|
setLightBox (index) {
|
|
|
|
this.setcoolLightBoxItems(this.item.images)
|
|
|
|
this.setcoolLightBoxIndex(index)
|
|
|
|
}
|
|
|
|
}
|
2019-07-24 17:20:44 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
</style>
|