50 lines
1.2 KiB
Vue
50 lines
1.2 KiB
Vue
<script>
|
|
import appIcon from '@components/AppIcon';
|
|
import projectMapLink from '@components/ProjectMapLink';
|
|
|
|
export default {
|
|
components: {
|
|
appIcon,
|
|
projectMapLink
|
|
},
|
|
props: {
|
|
options: Object,
|
|
type: String
|
|
},
|
|
emits: ['opening-lightbox'],
|
|
inject: ['lang', 'isMobile', 'lightbox'],
|
|
methods: {
|
|
openMedia() {
|
|
this.$emit('opening-lightbox', this.options);
|
|
this.lightbox.open(this.options.id_media, this.type);
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<a
|
|
class="media-link drill"
|
|
:href="options.media_path"
|
|
@click.prevent="openMedia"
|
|
>
|
|
<img
|
|
:src="options.thumb_path"
|
|
:width="options.width"
|
|
:height="options.height"
|
|
:title="lang.get((options.subtype == 'video')?'media.click_watch':'media.click_zoom')"
|
|
class="clickable"
|
|
/>
|
|
<span class="drill-icon"><appIcon :icon="'drill-'+options.subtype" /></span>
|
|
<div v-if="options.comment && type == 'post'" class="comment">
|
|
<p>
|
|
<appIcon icon="post" :text="options.comment" size="lg" />
|
|
</p>
|
|
<p v-if="!isMobile() && options.latitude && options.longitude">
|
|
<appIcon icon="coords" margin="right" size="lg" />
|
|
<projectMapLink :options="options" />
|
|
</p>
|
|
</div>
|
|
</a>
|
|
</template>
|