mirror of
https://github.com/jung-geun/NFD2NFC.git
synced 2026-08-07 09:14:04 +09:00
feat(web): GitHub Pages 기반 NFD→NFC 파일명 변환 웹앱 추가
설치 없이 브라우저에서 한글 파일명을 NFC 로 정규화할 수 있는 웹 도구. 파일/폴더 드롭 → 모든 path segment 를 독립적으로 NFC 변환 → fflate 스트리밍 ZIP 다운로드. UTF-8 flag(bit 11) 자동 설정으로 Windows Explorer 에서 정상 표시. 기존 src/core/filter.ts 의 shouldNormalize 를 그대로 재사용. 빌드는 web/ 디렉토리의 별도 Vite 설정으로 격리되어 Electron 빌드에 영향 없음. main 브랜치 push 시 .github/workflows/pages.yml 이 https://jung-geun.github.io/NFD2NFC/ 로 자동 배포. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
257
web/src/styles.css
Normal file
257
web/src/styles.css
Normal file
@@ -0,0 +1,257 @@
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
--bg: #fafafa;
|
||||
--fg: #1a1a1a;
|
||||
--muted: #6b7280;
|
||||
--border: #e5e7eb;
|
||||
--accent: #2563eb;
|
||||
--accent-fg: #ffffff;
|
||||
--warn-bg: #fef3c7;
|
||||
--warn-fg: #92400e;
|
||||
--success-bg: #d1fae5;
|
||||
--success-fg: #065f46;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #0f1115;
|
||||
--fg: #f3f4f6;
|
||||
--muted: #9ca3af;
|
||||
--border: #2a2f3a;
|
||||
--accent: #3b82f6;
|
||||
--accent-fg: #ffffff;
|
||||
--warn-bg: #422006;
|
||||
--warn-fg: #fcd34d;
|
||||
--success-bg: #064e3b;
|
||||
--success-fg: #a7f3d0;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', Roboto, 'Helvetica Neue',
|
||||
'Malgun Gothic', sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.app {
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 48px 24px 32px;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
max-width: 720px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
header p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
max-width: 720px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dropzone {
|
||||
border: 2px dashed var(--border);
|
||||
border-radius: 16px;
|
||||
padding: 64px 24px;
|
||||
text-align: center;
|
||||
background: transparent;
|
||||
transition:
|
||||
border-color 120ms,
|
||||
background 120ms;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropzone:hover,
|
||||
.dropzone.active {
|
||||
border-color: var(--accent);
|
||||
background: color-mix(in srgb, var(--accent) 6%, transparent);
|
||||
}
|
||||
|
||||
.dropzone.busy {
|
||||
cursor: progress;
|
||||
opacity: 0.7;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.dropzone h2 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dropzone p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.dropzone .hint {
|
||||
margin-top: 16px;
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.dropzone input[type='file'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-top: 24px;
|
||||
padding: 24px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
background: color-mix(in srgb, var(--fg) 3%, transparent);
|
||||
}
|
||||
|
||||
.status h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.status .progress-track {
|
||||
height: 8px;
|
||||
border-radius: 999px;
|
||||
background: var(--border);
|
||||
overflow: hidden;
|
||||
margin: 12px 0 8px;
|
||||
}
|
||||
|
||||
.status .progress-fill {
|
||||
height: 100%;
|
||||
background: var(--accent);
|
||||
transition: width 120ms ease-out;
|
||||
}
|
||||
|
||||
.status .progress-label {
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
button.primary {
|
||||
background: var(--accent);
|
||||
color: var(--accent-fg);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
padding: 12px 20px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button.primary:hover {
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
|
||||
button.link {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--accent);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
padding: 8px 4px;
|
||||
}
|
||||
|
||||
button.link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.warn,
|
||||
.success,
|
||||
.error {
|
||||
margin-top: 12px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 10px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.warn {
|
||||
background: var(--warn-bg);
|
||||
color: var(--warn-fg);
|
||||
}
|
||||
|
||||
.success {
|
||||
background: var(--success-bg);
|
||||
color: var(--success-fg);
|
||||
}
|
||||
|
||||
.error {
|
||||
background: #fee2e2;
|
||||
color: #991b1b;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.error {
|
||||
background: #450a0a;
|
||||
color: #fca5a5;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 48px;
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
text-align: center;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.stats {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
margin-top: 8px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.stats strong {
|
||||
color: var(--fg);
|
||||
font-weight: 600;
|
||||
margin-right: 4px;
|
||||
}
|
||||
Reference in New Issue
Block a user