문의 영역 개편과 공유 미리보기 및 포트폴리오 표시 개선

- 메인 문의 영역을 이메일 주소와 복사 버튼으로 구성하고 복사 결과 안내를 추가
- 문의 폼 페이지를 별도로 보존하고 입력 검증, 파일 첨부 및 완료 안내 동작을 추가
- 제거된 문의 요소를 참조하던 공통 스크립트를 정리해 초기화 오류 방지
- 이메일 복사 버튼의 특수 문자 화살표를 공통 SVG로 통일
- 공유 시 특허증 대신 트론트 로고를 사용하도록 공유 메타 정보 지정
- 공통 스크립트와 포트폴리오 CSS에 버전 URL을 적용해 이전 CDN 캐시 우회
- 프로젝트 및 특허 영역의 자료 기준 안내와 소개서 보기 링크 제거
- 프로젝트 상세 페이지 8개의 상단 썸네일 화살표를 제거하고 마우스 반응 효과 유지
- 특허증 이미지 파일을 갱신하고 문의 구조와 동작 설명을 README에 반영

검증: 공통·이메일·문의 폼 JavaScript 문법 검사 및 변경 공백 검사 통과
확인: 버전이 붙은 운영 사이트 JS와 CSS가 로컬 파일과 동일함
참고: 문의 폼은 서버 전송 없이 화면 동작만 제공하며 이메일 주소는 임시 값 유지
This commit is contained in:
2026-10-06 15:59:27 +09:00
parent ecc3807cfa
commit 7b4badf5a4
19 changed files with 791 additions and 75 deletions

View File

@@ -1,27 +1,13 @@
/* TRONT static website. Contact details below are intentionally temporary. */
/* Shared interactions for the TRONT website. */
(() => {
'use strict';
const CONTACT = Object.freeze({
email: 'hello@tront.example', // Replace with the company's actual email.
phone: '053-000-0000', // Replace with the company's actual phone.
temporary: true // Set false after replacing both details.
});
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
const $ = (selector, root = document) => root.querySelector(selector);
const $$ = (selector, root = document) => [...root.querySelectorAll(selector)];
document.documentElement.classList.add('js-ready');
$('#copyright-year').textContent = new Date().getFullYear();
$$('[data-contact-email]').forEach(link => {
link.href = `mailto:${CONTACT.email}`;
if (link.closest('.contact-row')) link.textContent = CONTACT.email;
});
$$('[data-contact-phone]').forEach(link => {
link.href = `tel:${CONTACT.phone.replace(/[^+\d]/g, '')}`;
link.textContent = CONTACT.phone;
});
$('.contact-placeholder').hidden = !CONTACT.temporary;
// Mobile navigation is available without changing desktop navigation.
const menuButton = $('.menu-toggle');
@@ -252,28 +238,6 @@
});
});
let toastTimer;
function notify(message) {
const toast = $('.toast');
toast.textContent = message;
toast.classList.add('is-visible');
clearTimeout(toastTimer);
toastTimer = setTimeout(() => toast.classList.remove('is-visible'), 3200);
}
$('.copy-email').addEventListener('click', async () => {
try {
if (!navigator.clipboard?.writeText) throw new Error('Clipboard unavailable');
await navigator.clipboard.writeText(CONTACT.email);
notify('이메일 주소를 복사했습니다.');
} catch {
const range = document.createRange();
range.selectNodeContents($('.contact-row [data-contact-email]'));
const selection = window.getSelection();
selection.removeAllRanges(); selection.addRange(range);
notify('이메일 주소를 선택했습니다. 복사 단축키를 사용해 주세요.');
}
});
// Original Canvas artwork: an evolving, connected torus. No 3D library.
const canvas = $('#connection-canvas');
const ctx = canvas.getContext('2d');