Skip to content

Commit

Permalink
feat: open full-size image
Browse files Browse the repository at this point in the history
  • Loading branch information
AloisSeckar committed Jan 27, 2024
1 parent e42e857 commit c099ec2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion assets/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"images" : {
"title" : "Obrázky",
"total" : "Celkem obrázků",
"no-dscr" : "Popis není k dispozici..."
"no-dscr" : "Popis není k dispozici...",
"full-size" : "Klikněte pro zobrazení v plné velikosti"
},
"books" : {
"total" : "Celkem knih",
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"images" : {
"title" : "Images",
"total" : "Total images",
"no-dscr" : "Descripion not available..."
"no-dscr" : "Descripion not available...",
"full-size" : "Click to open full-size image"
},
"books" : {
"total" : "Total books",
Expand Down
20 changes: 13 additions & 7 deletions components/item/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@
<hr class="mb-2">
<ItemImageNav :item="item" :editable="editable" />
<div class="mx-auto max-w-[60%]">
<NuxtImg
class="my-2 inline-block w-full h-auto border"
provider="cloudinary"
:src="useRuntimeConfig().public.cloudinary.folder + item.image"
:alt="item.name"
:title="item.name"
/>
<NuxtLink
:to="useRuntimeConfig().public.cloudinary.baseURL + useRuntimeConfig().public.cloudinary.folder + item.image"
:external="true"
target="_blank"
>
<NuxtImg
class="my-2 inline-block w-full h-auto border"
provider="cloudinary"
:src="useRuntimeConfig().public.cloudinary.folder + item.image"
:alt="item.name"
:title="useT('images.full-size')"
/>
</NuxtLink>
</div>
<ItemImageNav :item="item" :editable="editable" />
</div>
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineNuxtConfig({
lang: 'en',
debug: false,
cloudinary: {
baseURL: 'https://res.cloudinary.com/dxn3gzvtm/image/upload/',
preset: 'elrhistory',
folder: 'elrhistory'
},
Expand Down

0 comments on commit c099ec2

Please sign in to comment.