Skip to content

Commit

Permalink
Added some room detail images
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofVDB1 committed Dec 5, 2023
1 parent 53396bb commit 49f1b0e
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 50 deletions.
24 changes: 14 additions & 10 deletions components/image-gallery/image-gallery.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<template>
<custom-carousel
class="image-gallery"
:wrapAround="true"
:items-to-show="1.9"
:wrapAround="false"
snap-align="center"
>
<custom-slide v-for="(image, index) in images" :key="index">
<a @click="() => showImg(index, images)">
<NuxtImg
class="image-gallery__image"
:src="image?.src"
format="webp"
placeholder
/>
</a>
<div class="image-gallery__test">
<a @click="() => showImg(index, images)">
<NuxtImg
class="image-gallery__image"
:src="image?.src"
format="png"
placeholder
/>
</a>
</div>
</custom-slide>

<template #addons>
Expand All @@ -25,6 +27,8 @@
:imgs="imgsRef"
:index="indexRef"
@hide="onHide"
:rotateDisabled="true"
:moveDisabled="true"
/>
</template>

Expand Down
4 changes: 3 additions & 1 deletion components/image-gallery/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

@extend %page-container;
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;


&__image {
cursor: pointer;
display: block;
object-fit: contain;
object-fit: cover;

width: 100%;
height: 100%;
Expand Down
11 changes: 0 additions & 11 deletions content/geudenstraat/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,5 @@
{
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
],
"images": [
{
"src": "/images/image.jpeg"
},
{
"src": "/images/image.jpeg"
},
{
"src": "/images/image.jpeg"
}
]
}
6 changes: 3 additions & 3 deletions content/geudenstraat/kamer-1/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
],
"images": [
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test2.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test3.jpeg"
}
],
"details": [
Expand Down
6 changes: 3 additions & 3 deletions content/geudenstraat/kamer-2/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
],
"images": [
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test2.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test3.jpeg"
}
],
"details": [
Expand Down
11 changes: 0 additions & 11 deletions content/sloefke/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,5 @@
{
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
],
"images": [
{
"src": "/images/image.jpeg"
},
{
"src": "/images/image.jpeg"
},
{
"src": "/images/image.jpeg"
}
]
}
6 changes: 3 additions & 3 deletions content/sloefke/kamer-1/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
],
"images": [
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test2.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test3.jpeg"
}
],
"details": [
Expand Down
6 changes: 3 additions & 3 deletions content/sloefke/kamer-2/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
],
"images": [
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test2.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test3.jpeg"
}
],
"details": [
Expand Down
6 changes: 3 additions & 3 deletions content/sloefke/kamer-3/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
],
"images": [
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test2.jpeg"
},
{
"src": "/images/image.jpeg"
"src": "/images/sloefke/kamer-1/test3.jpeg"
}
],
"details": [
Expand Down
6 changes: 5 additions & 1 deletion pages/geudenstraat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</template>
</typography>
<cards :items="data?.rooms" title="Onze studentenkamers" />
<c-footer />
</template>

<script lang="ts" setup>
Expand All @@ -28,7 +29,10 @@ const { data } = await useAsyncData('data', async () => {
const [data, roomData] = await Promise.all([
queryContent<StudentHouse>('geudenstraat/configuration').find(),
// skip 1 because the first item is the configuration of the index
queryContent<Room>('/geudenstraat').where({ _extension: 'json' }).skip(1).find(),
queryContent<Room>('/geudenstraat')
.where({ _extension: 'json' })
.skip(1)
.find(),
])
return {
Expand Down
1 change: 0 additions & 1 deletion pages/sloefke/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</typography>
<room-details :details="data?.details" />
<image-gallery :images="data?.images" />
<!-- <lightbox /> -->
<c-footer />
</template>

Expand Down
Binary file added public/images/sloefke/kamer-1/test.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/sloefke/kamer-1/test2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/sloefke/kamer-1/test3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 49f1b0e

Please sign in to comment.