meta 정리
This commit is contained in:
@@ -59,10 +59,11 @@ import TabPanel from 'primevue/tabpanel';
|
||||
import TabList from 'primevue/tablist';
|
||||
import Tab from 'primevue/tab';
|
||||
import {ko} from 'primelocale/js/ko.js';
|
||||
|
||||
import { createHead } from '@vueuse/head'
|
||||
import AppHeader from './components/AppHeader.vue';
|
||||
const app = createApp(App)
|
||||
|
||||
const head = createHead()
|
||||
app.use(head)
|
||||
// Register PrimeVue
|
||||
app.use(PrimeVue, {
|
||||
theme: {
|
||||
|
||||
@@ -259,7 +259,7 @@ import MemberListCard from '@/components/public/MemberListCard.vue';
|
||||
import JoinDialog from '@/components/public/JoinDialog.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import PublicEventService from '@/services/PublicEventService';
|
||||
import Panel from 'primevue/panel';
|
||||
import { useHead } from '@vueuse/head';
|
||||
|
||||
const route = useRoute();
|
||||
const publicHash = route.params.publicHash;
|
||||
@@ -282,6 +282,32 @@ const isReady = computed(() => event.value.status === 'ready');
|
||||
const isActive = computed(() => event.value.status === 'active');
|
||||
const isFinished = computed(() => event.value.status === 'completed');
|
||||
|
||||
// description만 이벤트 정보로 동적으로 설정
|
||||
const eventDescriptionText = computed(() => {
|
||||
const e = event.value || {};
|
||||
let summary = '';
|
||||
if (e.startDate) {
|
||||
summary += `[기간] ${formatDate(e.startDate)}`;
|
||||
if (e.endDate) summary += ` ~ ${formatDate(e.endDate)}`;
|
||||
summary += '.\n';
|
||||
}
|
||||
if (e.description) summary += `[이벤트 내용] ${e.description}`;
|
||||
if (e.location) summary += `[장소] ${e.location}.\n`;
|
||||
if (e.registrationDeadline) summary += `[신청마감] ${formatDate(e.registrationDeadline)}.\n`;
|
||||
if (e.maxParticipants) summary += `[참가인원] ${e.maxParticipants}명\n`;
|
||||
|
||||
return summary || '이벤트 정보가 없습니다.';
|
||||
});
|
||||
|
||||
useHead({
|
||||
meta: [
|
||||
{ title: event.value.title },
|
||||
{ property: 'og:title', content: event.value.title },
|
||||
{ name: 'description', content: eventDescriptionText },
|
||||
{ property: 'og:description', content: eventDescriptionText }
|
||||
]
|
||||
});
|
||||
|
||||
// 신청 마감일시 체크
|
||||
const isRegistrationClosed = computed(() => {
|
||||
if (!event.value.registrationDeadline) return false;
|
||||
|
||||
Reference in New Issue
Block a user