@@ -263,6 +263,7 @@ button { cursor: pointer; }
|
|||||||
.form-footer { display: flex; justify-content: center; gap: 8px; padding-top: 26px; }
|
.form-footer { display: flex; justify-content: center; gap: 8px; padding-top: 26px; }
|
||||||
|
|
||||||
.detail-card { padding-bottom: 24px; }
|
.detail-card { padding-bottom: 24px; }
|
||||||
|
.is-editing .detail-head, .is-editing .detail-body, .is-editing .comment-box { display: none; }
|
||||||
.detail-head { padding: 23px 22px 20px; border-bottom: 1px solid var(--line); }
|
.detail-head { padding: 23px 22px 20px; border-bottom: 1px solid var(--line); }
|
||||||
.detail-title-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
.detail-title-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
||||||
.detail-title-line h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
|
.detail-title-line h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
|
||||||
@@ -346,6 +347,9 @@ button { cursor: pointer; }
|
|||||||
.qa-list-page .sub-nav a.disabled-tab:hover, .egbim-page .sub-nav a.disabled-tab:hover { background: transparent; color: #fff; }
|
.qa-list-page .sub-nav a.disabled-tab:hover, .egbim-page .sub-nav a.disabled-tab:hover { background: transparent; color: #fff; }
|
||||||
.qa-list-page .page-shell { width: calc(100% - 80px); max-width: 1200px; padding: 51px 0 62px; margin-right: auto; margin-left: auto; }
|
.qa-list-page .page-shell { width: calc(100% - 80px); max-width: 1200px; padding: 51px 0 62px; margin-right: auto; margin-left: auto; }
|
||||||
.egbim-page .page-shell { padding-top: 51px; }
|
.egbim-page .page-shell { padding-top: 51px; }
|
||||||
|
.egbim-page .section-heading { display: block; margin-bottom: 40px; text-align: center; }
|
||||||
|
.egbim-page .section-heading h2 { font-size: 30px; }
|
||||||
|
.egbim-page .section-heading p { display: none; }
|
||||||
.qa-list-heading { margin: 0 0 40px; text-align: center; }
|
.qa-list-heading { margin: 0 0 40px; text-align: center; }
|
||||||
.qa-list-heading h1 { margin: 0; font-size: 30px; line-height: 1.35; letter-spacing: -.06em; }
|
.qa-list-heading h1 { margin: 0; font-size: 30px; line-height: 1.35; letter-spacing: -.06em; }
|
||||||
.qa-list-page .filter-panel { padding: 0; margin: 0 0 40px; border: 0; background: transparent; }
|
.qa-list-page .filter-panel { padding: 0; margin: 0 0 40px; border: 0; background: transparent; }
|
||||||
|
|||||||
+9
-2
@@ -245,6 +245,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function normalizePageHeading() {
|
||||||
|
qsa('.egbim-page .section-heading h2').forEach(function (heading) { heading.textContent = '문의하기(Q&A)'; });
|
||||||
|
qsa('.egbim-page .section-heading p').forEach(function (description) { description.remove(); });
|
||||||
|
}
|
||||||
|
|
||||||
function showToast(message) {
|
function showToast(message) {
|
||||||
const toast = qs('#toast');
|
const toast = qs('#toast');
|
||||||
if (!toast) return;
|
if (!toast) return;
|
||||||
@@ -449,10 +454,11 @@
|
|||||||
editError.hidden = true;
|
editError.hidden = true;
|
||||||
editError.style.display = 'none';
|
editError.style.display = 'none';
|
||||||
editForm.hidden = false;
|
editForm.hidden = false;
|
||||||
|
detail.classList.add('is-editing');
|
||||||
editForm.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
editForm.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||||
});
|
});
|
||||||
const editCancel = qs('#editCancel');
|
const editCancel = qs('#editCancel');
|
||||||
if (editCancel && editForm) editCancel.addEventListener('click', function () { editForm.hidden = true; });
|
if (editCancel && editForm) editCancel.addEventListener('click', function () { editForm.hidden = true; detail.classList.remove('is-editing'); });
|
||||||
if (editForm) editForm.addEventListener('submit', async function (event) {
|
if (editForm) editForm.addEventListener('submit', async function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
editError.hidden = true;
|
editError.hidden = true;
|
||||||
@@ -485,6 +491,7 @@
|
|||||||
qs('[data-detail-content]').textContent = post.content;
|
qs('[data-detail-content]').textContent = post.content;
|
||||||
qs('[data-detail-secret]').hidden = !post.secret;
|
qs('[data-detail-secret]').hidden = !post.secret;
|
||||||
editForm.hidden = true;
|
editForm.hidden = true;
|
||||||
|
detail.classList.remove('is-editing');
|
||||||
showToast('문의가 수정되었습니다.');
|
showToast('문의가 수정되었습니다.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
editError.textContent = error.message || '문의 수정에 실패했습니다.';
|
editError.textContent = error.message || '문의 수정에 실패했습니다.';
|
||||||
@@ -614,5 +621,5 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () { bindGlobal(); initList(); initWrite(); initDetail(); });
|
document.addEventListener('DOMContentLoaded', function () { normalizePageHeading(); bindGlobal(); initList(); initWrite(); initDetail(); });
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user