diff --git a/components/SectionTitle.vue b/components/SectionTitle.vue index 026f933..72506e5 100644 --- a/components/SectionTitle.vue +++ b/components/SectionTitle.vue @@ -21,9 +21,9 @@ const props = defineProps({ text-align: center; display: flex; align-items: center; + font-size: min(2.5em, 5svw); > h2 { - font-size: min(2.5rem, 5svw); font-weight: bold; margin: 5% 0 0 25%; color: var(--thick-font-color); diff --git a/pages/event/[id].vue b/pages/event/[id].vue index c288dfb..e2df6e1 100644 --- a/pages/event/[id].vue +++ b/pages/event/[id].vue @@ -18,6 +18,9 @@ if (Number.isNaN(id)) { const event = await useFetch(`/api/event/${id}`).then((res) => { return res.data.value as Event; }); +if (!event) { + await useRouter().push("/"); +} useHead({ title: `${event?.event_name ?? ""} | 23常盤祭公式HP~未来航路~`, meta: [ @@ -28,9 +31,9 @@ useHead({ ], }); -const urls = []; // swiperの複数の画像のURLを格納する配列 +const urls: string[] = []; // swiperの複数の画像のURLを格納する配列 -for (let i = 0; i < event?.activity_images; i++) { +for (let i = 1; i <= event?.activity_images; i++) { urls.push( "https://storage.googleapis.com/tokiwa23-assets/icons/" + event.id + @@ -43,57 +46,62 @@ for (let i = 0; i < event?.activity_images; i++) {