Reuse common dateStyle
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user