|
| 1 | +<script setup lang="ts"> |
| 2 | +import { GOODS as enGoods } from "../../../i18n/en/goods"; |
| 3 | +import { GOODS as jaGoods } from "../../../i18n/ja/goods"; |
| 4 | +import StorePreOrderButton from "./_components/StorePreOrderButton.vue"; |
| 5 | +import StoreItemCard from "./_components/StoreItemCard.vue"; |
| 6 | +import { |
| 7 | + computed, |
| 8 | + useI18n, |
| 9 | + definePageMeta, |
| 10 | + useRuntimeConfig, |
| 11 | + // NOTE: import useHead to avoid `useHead is not defined` error |
| 12 | + // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 13 | + useHead, |
| 14 | + useSeoMeta, |
| 15 | + defineOgImage, |
| 16 | +} from "#imports"; |
| 17 | +import { VFSection, JaStore, EnStore } from "#components"; |
| 18 | +
|
| 19 | +definePageMeta({ prerender: true }); |
| 20 | +const { t, locale } = useI18n(); |
| 21 | +
|
| 22 | +const runtimeConfig = useRuntimeConfig(); |
| 23 | +
|
| 24 | +const goods = computed(() => locale.value === "en" ? enGoods : jaGoods); |
| 25 | +const indent = computed(() => locale.value === "en" ? "0.7em" : "0.25em"); |
| 26 | +
|
| 27 | +defineOgImage({ |
| 28 | + component: "root", |
| 29 | + url: `${runtimeConfig.public.siteUrl}images/og/store.png`, |
| 30 | +}); |
| 31 | +
|
| 32 | +useSeoMeta({ |
| 33 | + title: t("store.title"), |
| 34 | + ogTitle: t("store.title"), |
| 35 | + description: t("store.description"), |
| 36 | + ogDescription: t("store.description"), |
| 37 | +}); |
| 38 | +</script> |
| 39 | + |
| 40 | +<template> |
| 41 | + <div id="pages-store"> |
| 42 | + <h1>{{ $t('store.title') }}</h1> |
| 43 | + |
| 44 | + <VFSection :title="t('store.panel.title')"> |
| 45 | + <component :is="locale === 'ja' ? JaStore : EnStore"> |
| 46 | + <template #button> |
| 47 | + <div class="store-button-container"> |
| 48 | + <StorePreOrderButton /> |
| 49 | + </div> |
| 50 | + </template> |
| 51 | + <template #goods> |
| 52 | + <ul class="store-item-list"> |
| 53 | + <StoreItemCard |
| 54 | + v-for="item in goods" |
| 55 | + :key="item.id" |
| 56 | + :item="item" |
| 57 | + /> |
| 58 | + </ul> |
| 59 | + </template> |
| 60 | + </component> |
| 61 | + </VFSection> |
| 62 | + </div> |
| 63 | +</template> |
| 64 | + |
| 65 | +<style scoped> |
| 66 | +@import "~/assets/styles/custom-media-query.css"; |
| 67 | +
|
| 68 | +#pages-store{ |
| 69 | + display: grid; |
| 70 | + row-gap: 1.5rem; |
| 71 | +
|
| 72 | + @media (--mobile) { |
| 73 | + row-gap: 1rem; |
| 74 | + } |
| 75 | +
|
| 76 | + h1 { |
| 77 | + font-family: "ClashDisplay-Semibold"; |
| 78 | + font-size: 3rem; |
| 79 | + padding: 7.5rem 0; |
| 80 | + margin: 0; |
| 81 | +
|
| 82 | + @media (--mobile) { |
| 83 | + padding: 2.5rem 0.75rem; |
| 84 | + } |
| 85 | + } |
| 86 | +
|
| 87 | + .store-button-container { |
| 88 | + text-align: center; |
| 89 | + margin-top: 1.5rem; |
| 90 | + margin-bottom: 2rem; |
| 91 | +
|
| 92 | + @media (--mobile) { |
| 93 | + margin-top: 1rem; |
| 94 | + margin-bottom: 1.5rem; |
| 95 | + } |
| 96 | + } |
| 97 | +
|
| 98 | + .store-item-list { |
| 99 | + display: grid; |
| 100 | + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); |
| 101 | + gap: 1.5rem; |
| 102 | + margin-bottom: 2.5rem; |
| 103 | +
|
| 104 | + @media (--mobile) { |
| 105 | + row-gap: 2rem; |
| 106 | + } |
| 107 | + } |
| 108 | +
|
| 109 | + :deep(.divider) { |
| 110 | + border: 0; |
| 111 | + border-top: 1px solid var(--color-divider); |
| 112 | + margin: 2rem 0; |
| 113 | +
|
| 114 | + @media (--mobile) { |
| 115 | + margin: 1.5rem 0; |
| 116 | + } |
| 117 | + } |
| 118 | +
|
| 119 | + :deep(.store-note) { |
| 120 | + text-indent: -1.25em; |
| 121 | + margin-left: 1.25em; |
| 122 | +
|
| 123 | + span { |
| 124 | + margin-right: v-bind(indent); |
| 125 | + } |
| 126 | + } |
| 127 | +} |
| 128 | +</style> |
0 commit comments