메타 태그 body 적용 완료
This commit is contained in:
2026-10-20 13:07:14 +09:00
parent 74d8cea5a8
commit 9f27300fe6
19 changed files with 593 additions and 115 deletions
+33
View File
@@ -190,6 +190,7 @@
v-for="subj in subjects"
:key="subj.name"
type="button"
:data-subject="subj.name"
@click="formData.subject = subj.name"
:class="[
'py-2.5 px-2 rounded-xl text-xs sm:text-sm font-bold transition border',
@@ -478,11 +479,43 @@ const currentNotice = ref(rollingMessages[0])
let rollingIdx = 0
onMounted(() => {
// 외부 모달에서 과목 선택 시 반응형 폼 자동 동기화
if (typeof window !== 'undefined') {
window.addEventListener('select-subject', (e) => {
if (e.detail && e.detail.subject) {
const target = e.detail.subject;
try {
if (typeof subjects !== 'undefined' && Array.isArray(subjects)) {
const found = subjects.find(s => s.name === target || s.label.startsWith(target));
if (found) formData.subject = found.name;
} else if (typeof subjectOptions !== 'undefined' && Array.isArray(subjectOptions)) {
const found = subjectOptions.find(s => s === target || s.startsWith(target));
if (found) formData.subject = found;
} else {
formData.subject = target;
}
} catch (_) {
formData.subject = target;
}
}
});
}
formData.grade = currentGradeOptions.value[1] || currentGradeOptions.value[0]
setInterval(() => {
rollingIdx = (rollingIdx + 1) % rollingMessages.length
currentNotice.value = rollingMessages[rollingIdx]
}, 3500)
// 외부 컴포넌트(과목 갤러리 모달 등)에서 과목 선택 시 반응형 폼 자동 동기화
window.addEventListener('select-subject', (e) => {
if (e.detail && e.detail.subject) {
const target = e.detail.subject
const found = subjects.find(s => s.name === target || s.label.startsWith(target))
if (found) {
formData.subject = found.name
}
}
})
})
const subjects = [