123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <template>
- <article class="card card-thematique search-card">
- <header>
- <a
- :href="item.path"
- @click.prevent="openThematique"
- >
- <h1>{{ item.title }}</h1>
- <h4>{{ item.short_description }}</h4>
- </a>
- </header>
- <section class="images" v-switcher>
- <figure
- v-for="(img, index) in item.images"
- :key="img.url"
- class="lazy"
- v-lazy="index"
- >
- <img
- :data-src="img.style_cardmedium_url"
- :title="img.title"
- />
- <img
- class="blank"
- :src="blanksrc"
- @click.prevent="openThematique"
- >
- </figure>
- </section>
-
- </article>
- </template>
- <script>
- import { mapState, mapActions } from 'vuex'
- import cardMixins from 'vuejs/components/cardMixins'
- export default {
- name: "Card",
- props: ['item'],
- mixins: [cardMixins],
-
-
-
- data() {
- return {
- blanksrc:`${drupalSettings.path.themePath}/assets/img/blank.gif`,
-
- lightbox_index: null,
- alias: this.item.path.replace(/^.*\/thematique\//g, '')
- }
- },
-
-
-
-
-
- methods: {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- openThematique (e) {
- console.log('openThematique', e, this.alias)
- this.$router.push({
- name:`thematique`,
- params: { alias:this.alias, id: this.item.id }
-
-
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|