mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-10-19 03:52:00 -04:00
33 lines
914 B
Vue
33 lines
914 B
Vue
<template>
|
|
<a
|
|
:href="buildImageUrl(id, bigSize)"
|
|
target="_blank"
|
|
rel="noopener"
|
|
class="d-inline-block"
|
|
@click.prevent="store.lightboxUrl = buildImageUrl(id, bigSize)"
|
|
>
|
|
<img :src="buildImageUrl(id, smallSize)" class="border rounded-2" :style="`height: ${size}; width: auto;`" loading="lazy">
|
|
</a>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue';
|
|
import { buildImageUrl } from '../src/helpers.ts';
|
|
import { useMainStore } from '../store/index.ts';
|
|
|
|
export default defineComponent({
|
|
props: {
|
|
id: { required: true, type: String },
|
|
smallSize: { default: 'thumb', type: String },
|
|
bigSize: { default: 'big', type: String },
|
|
size: { default: 'auto', type: String },
|
|
},
|
|
setup() {
|
|
return {
|
|
store: useMainStore(),
|
|
};
|
|
},
|
|
methods: { buildImageUrl },
|
|
});
|
|
</script>
|