mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 05:11:31 -05:00
display of external recipes
This commit is contained in:
28
vue/src/components/ImageViewer.vue
Normal file
28
vue/src/components/ImageViewer.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<img :src="pdfUrl" width="100%" height="700px" :alt="_('External Recipe Image')">
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {GettextMixin, resolveDjangoUrl} from "@/utils/utils";
|
||||
|
||||
|
||||
export default {
|
||||
name: 'ImageViewer',
|
||||
mixins: [
|
||||
GettextMixin,
|
||||
],
|
||||
props: {
|
||||
recipe: Object,
|
||||
},
|
||||
computed: {
|
||||
pdfUrl: function() {
|
||||
return resolveDjangoUrl('api_get_recipe_file', (this.recipe.id))
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user