Reuse common dateStyle

This commit is contained in:
2025-08-14 20:20:54 +02:00
parent 24f933fbaa
commit 5146e8e490
7 changed files with 24 additions and 69 deletions
+3 -12
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { DataTableColumnSource } from 'vuestic-ui';
import NumberCard from '~/components/showcase/NumberCard.vue';
import { fullDate } from '~~/server/utils/date';
definePageMeta({
// TODO: re-enable perms
@@ -55,19 +56,9 @@ const columns = leaderboardColumns.map((c) =>
<h1 class="text-7xl">{{ t('page.showcase.showcase_for') }}</h1>
<h1 class="text-9xl font-bold">{{ data.name || name }}</h1>
<p v-if="data.start || data.end" class="flex flex-row gap-4 text-4xl">
<span v-if="data.start">{{
d(data.start, {
dateStyle: 'medium',
timeStyle: 'medium'
})
}}</span
<span v-if="data.start">{{ d(data.start, fullDate) }}</span
><span v-if="data.start && data.end"> </span
><span v-if="data.end">{{
d(data.end, {
dateStyle: 'medium',
timeStyle: 'medium'
})
}}</span>
><span v-if="data.end">{{ d(data.end, fullDate) }}</span>
</p>
</div>
</section>