Skip to content

Commit

Permalink
Hide monthly events on contact page
Browse files Browse the repository at this point in the history
  • Loading branch information
casperboone committed Jan 5, 2025
1 parent f2d9ae9 commit da90ffd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
18 changes: 16 additions & 2 deletions dwhdelft.nl/components/pages/contact/OpeningHours.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
<i18n lang="yaml">
en:
monthly_events: Besides the regular opening hours, there are also various [monthly events](/#recurring-events-monthly) at DWH.
nl:
monthly_events: Naast de vaste openingstijden zijn er ook diverse [maandelijkse activiteiten](/#recurring-events-monthly) bij DWH.
</i18n>

<script setup>
const { tt } = useT()
import Markdown from '#shared/components/Markdown.vue'
const { t, tt } = useT()
const openingHours = (await useAsyncData(() => queryContent('opening_hours').findOne())).data.value.events
const openingHours = (await useAsyncData(() => queryContent('opening_hours').findOne())).data.value.events.filter(
(event) => !('monthly' in event)
)
</script>

<template>
Expand All @@ -26,4 +37,7 @@ const openingHours = (await useAsyncData(() => queryContent('opening_hours').fin
</div>
</li>
</ul>
<div class="mt-6 w-80 text-gray-800">
<Markdown :content="t('monthly_events')" />
</div>
</template>
2 changes: 1 addition & 1 deletion dwhdelft.nl/components/pages/home/RecurringEvents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const openingHoursMonthly = openingHours.value.events.filter((o) => 'monthly' in
</table>

<!-- Monthly events -->
<h2 class="text-5xl font-medium leading-tight text-brand-500 md:mb-6 md:text-center">
<h2 id="recurring-events-monthly" class="text-5xl font-medium leading-tight text-brand-500 md:mb-6 md:text-center">
<Markdown :content="t('announcement_month')" />
</h2>

Expand Down
4 changes: 2 additions & 2 deletions dwhdelft.nl/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const instagramChannels = [
<a href="#join-dwh" class="block">
<ElementsPrimaryButton>{{ t('hero.leftButton') }}</ElementsPrimaryButton>
</a>
<a href="#recurring_events" class="block">
<a href="#recurring-events" class="block">
<ElementsSecondaryButton>{{ t('hero.rightButton') }}</ElementsSecondaryButton>
</a>
</div>
Expand Down Expand Up @@ -88,7 +88,7 @@ const instagramChannels = [
<PagesHomeJoinOptions />
</section>

<section id="recurring_events" class="bg-white">
<section id="recurring-events" class="bg-white">
<PagesHomeRecurringEvents />
</section>

Expand Down

0 comments on commit da90ffd

Please sign in to comment.