Skip to content

Commit

Permalink
Add banner to the different pages
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofVDB1 committed Dec 16, 2023
1 parent bff02ac commit 88df455
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 15 deletions.
8 changes: 6 additions & 2 deletions components/banner/banner.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<template>
<div class="banner">
<span class="banner__title"> Hello world </span>
<span class="banner__title"> {{ title }} </span>
<span class="banner__content"> {{ content }} </span>
</div>
</template>

<script setup lang="ts" name="banner"></script>
<script setup lang="ts" name="banner">
import type { Banner } from '~/types/banner'
defineProps<Banner>()
</script>
<style scoped lang="scss" src="./style.scss" />
26 changes: 20 additions & 6 deletions components/banner/style.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
.banner {
@extend %page-container;
position: relative;
grid-template-areas: '. . articles articles articles articles articles articles articles articles . .';

grid-template-areas:
". title title title title title title title title title title ."
". content content content content content content content content content content .";
width: 100%;
height: 100%;
min-height: 20rem;
min-height: 30rem;
grid-gap: calc($spacing-base * 2) 0;

@media (min-width: $break-md) {
grid-template-areas:
". . title title title title title title title title . ."
". . content content content content content content content content . .";
}

background-color: $color-red;
background-color: $color-yellow;

&__title {
grid-area: articles;
color: $color-white;
@extend %h3;
grid-area: title;
font-size: $font-size-title-md;
}

&__content {
@extend %body-copy-2;
grid-area: content;
overflow: scroll
}
}
6 changes: 5 additions & 1 deletion content/geudenstraat/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
{
"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."
}
]
],
"banner": {
"title": "Meer te weten komen over de Geudenstraat?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508"
}
}
6 changes: 5 additions & 1 deletion content/geudenstraat/kamer-1/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@
"title": "Eigen douche",
"value": "Ja"
}
]
],
"banner": {
"title": "Interesse in deze kamer?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508. Vergeet zeker niet de kamer te vermelden waarin je interesse hebt."
}
}
6 changes: 5 additions & 1 deletion content/geudenstraat/kamer-2/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@
"title": "Eigen douche",
"value": "Ja"
}
]
],
"banner": {
"title": "Interesse in deze kamer?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508. Vergeet zeker niet de kamer te vermelden waarin je interesse hebt."
}
}
6 changes: 5 additions & 1 deletion content/sloefke/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
{
"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."
}
]
],
"banner": {
"title": "Meer te weten komen over het Sloefke?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508"
}
}
6 changes: 5 additions & 1 deletion content/sloefke/kamer-1/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@
"title": "Eigen douche",
"value": "Ja"
}
]
],
"banner": {
"title": "Interesse in deze kamer?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508. Vergeet zeker niet de kamer te vermelden waarin je interesse hebt."
}
}
6 changes: 5 additions & 1 deletion content/sloefke/kamer-2/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@
"title": "Eigen douche",
"value": "Ja"
}
]
],
"banner": {
"title": "Interesse in deze kamer?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508. Vergeet zeker niet de kamer te vermelden waarin je interesse hebt."
}
}
6 changes: 5 additions & 1 deletion content/sloefke/kamer-3/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@
"title": "Eigen douche",
"value": "Ja"
}
]
],
"banner": {
"title": "Interesse in deze kamer?",
"content": "Neem contact met ons op via email op het adres [email protected] of telefonisch op +32476271508. Vergeet zeker niet de kamer te vermelden waarin je interesse hebt."
}
}
1 change: 1 addition & 0 deletions 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" />
<banner v-if="data?.content?.banner" v-bind="data?.content?.banner" />
<c-footer />
</template>

Expand Down
1 change: 1 addition & 0 deletions pages/sloefke/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</typography>
<room-details :details="data?.details" />
<image-gallery :images="data?.images" />
<banner v-if="data?.banner" v-bind="data?.banner" />
<c-footer />
</template>

Expand Down
1 change: 1 addition & 0 deletions pages/sloefke/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" />
<banner v-if="data?.content?.banner" v-bind="data?.content?.banner" />
<c-footer />
</template>

Expand Down
5 changes: 5 additions & 0 deletions types/banner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

export type Banner = {
title?: string,
content?: string
}
2 changes: 2 additions & 0 deletions types/room.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Card } from "~/types/card";
import type { Paragraph } from "~/types/paragraph";
import type { Image } from "~/types/image";
import type { Banner } from "~/types/banner";

export interface Room extends Card {
paragraphs?: Paragraph[];
images?: Image[];
details?: RoomDetail[]
banner?: Banner
}

export interface RoomDetail {
Expand Down
2 changes: 2 additions & 0 deletions types/studentHouse.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { Header } from "~/types/header";
import type { Room } from "~/types/room";
import type { Paragraph } from "~/types/paragraph";
import type { Banner } from "~/types/banner";

export interface StudentHouse {
header: Header;
rooms: Room[];
paragraphs: Paragraph[];
banner?: Banner;
}

0 comments on commit 88df455

Please sign in to comment.