Spaces:
Running
Running
Update index.html
Browse files- index.html +81 -155
index.html
CHANGED
|
@@ -11,60 +11,28 @@
|
|
| 11 |
--primary-color: #5d5b54;
|
| 12 |
--accent-color: #d4a373;
|
| 13 |
--border-color: #e0ddd5;
|
| 14 |
-
--variation-bg: #faf9f6;
|
| 15 |
}
|
| 16 |
|
| 17 |
-
body {
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
margin: 0; padding: 0; line-height: 1.6;
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
nav {
|
| 25 |
-
position: sticky; top: 0; background: rgba(249, 247, 242, 0.9);
|
| 26 |
-
backdrop-filter: blur(10px); padding: 20px; text-align: center;
|
| 27 |
-
border-bottom: 1px solid var(--border-color); z-index: 100;
|
| 28 |
-
}
|
| 29 |
-
nav a { margin: 0 15px; text-decoration: none; color: var(--primary-color); font-weight: 500; font-size: 0.9rem; transition: 0.2s; cursor: pointer; }
|
| 30 |
-
nav a:hover { color: var(--accent-color); }
|
| 31 |
-
|
| 32 |
-
header { text-align: center; padding: 60px 20px; }
|
| 33 |
h1 { font-weight: 300; letter-spacing: 8px; color: var(--accent-color); margin: 0; }
|
| 34 |
-
.sub-title { font-size: 0.9rem; color: #999; margin-top: 10px; }
|
| 35 |
|
| 36 |
-
.container { max-width: 1000px; margin: 0 auto; padding:
|
| 37 |
section { display: none; }
|
| 38 |
-
section.active { display: block;
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
.table-wrapper { background: var(--card-bg); border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
|
| 47 |
-
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
| 48 |
-
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #f1f1f1; }
|
| 49 |
-
th { background: #f1eee6; font-size: 0.9rem; color: #777; font-weight: 500; }
|
| 50 |
-
|
| 51 |
.word-cell { font-weight: bold; color: var(--accent-color); width: 25%; }
|
| 52 |
-
.
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
.variation-row { background-color: var(--variation-bg); }
|
| 56 |
-
.variation-mark { color: #ccc; margin-right: 8px; }
|
| 57 |
-
|
| 58 |
-
/* ๋ฌธ๋ฒ & ์์นด์ด๋ธ ์คํ์ผ ๋์ผ */
|
| 59 |
-
.card { background: var(--card-bg); padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); margin-bottom: 20px; }
|
| 60 |
-
.archive-layout { display: flex; gap: 30px; }
|
| 61 |
-
.story-list { width: 250px; flex-shrink: 0; }
|
| 62 |
-
.story-item { padding: 15px; background: var(--card-bg); margin-bottom: 10px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border-color); font-size: 0.9rem; }
|
| 63 |
-
.story-item.active { border-color: var(--accent-color); color: var(--accent-color); background: #fdfcf9; }
|
| 64 |
-
.story-content { flex: 1; background: var(--card-bg); padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); min-height: 400px; }
|
| 65 |
-
.story-line { margin-bottom: 25px; }
|
| 66 |
-
.huiucl-text { font-size: 1.2rem; color: var(--accent-color); font-weight: 600; margin-bottom: 5px; }
|
| 67 |
-
.korean-text { font-size: 1rem; color: #777; border-left: 2px solid var(--border-color); padding-left: 15px; }
|
| 68 |
</style>
|
| 69 |
</head>
|
| 70 |
<body>
|
|
@@ -72,170 +40,128 @@
|
|
| 72 |
<nav>
|
| 73 |
<a onclick="showSection('dictionary')">DICTIONARY</a>
|
| 74 |
<a onclick="showSection('grammar')">GRAMMAR</a>
|
| 75 |
-
<a onclick="showSection('archive')">ARCHIVE</a>
|
| 76 |
</nav>
|
| 77 |
|
| 78 |
<header>
|
| 79 |
<h1>HUIUCL</h1>
|
| 80 |
-
<div
|
| 81 |
</header>
|
| 82 |
|
| 83 |
<div class="container">
|
| 84 |
<section id="dictionary" class="active">
|
| 85 |
-
<
|
| 86 |
-
<input type="text" id="searchInput" placeholder="HUIUCL ๋จ์ด, ํ๊ตญ์ด ๋ป, ๋๋ ์๋ฌธ ์๋ฏธ ๊ฒ์..." onkeyup="renderTable()">
|
| 87 |
-
</div>
|
| 88 |
<div class="table-wrapper">
|
| 89 |
<table>
|
| 90 |
<thead>
|
| 91 |
<tr>
|
| 92 |
-
<th
|
| 93 |
-
<th
|
| 94 |
-
<th
|
| 95 |
</tr>
|
| 96 |
</thead>
|
| 97 |
-
<tbody id="dictBody">
|
| 98 |
-
</tbody>
|
| 99 |
</table>
|
| 100 |
</div>
|
| 101 |
</section>
|
| 102 |
|
| 103 |
<section id="grammar">
|
| 104 |
-
<div class="card">
|
| 105 |
-
<h2
|
| 106 |
-
<div id="
|
| 107 |
-
</div>
|
| 108 |
-
</div>
|
| 109 |
-
</section>
|
| 110 |
-
|
| 111 |
-
<section id="archive">
|
| 112 |
-
<div class="archive-layout">
|
| 113 |
-
<div class="story-list">
|
| 114 |
-
<div class="story-item active" onclick="loadStory(0, this)">01. ํ์ (Clama)</div>
|
| 115 |
-
<div class="story-item" onclick="loadStory(1, this)">02. ์ค๋น ์ค...</div>
|
| 116 |
-
</div>
|
| 117 |
-
<div class="story-content" id="storyViewer"></div>
|
| 118 |
</div>
|
| 119 |
</section>
|
| 120 |
</div>
|
| 121 |
|
| 122 |
<script>
|
| 123 |
-
let
|
| 124 |
|
| 125 |
function showSection(id) {
|
| 126 |
document.querySelectorAll('section').forEach(s => s.classList.remove('active'));
|
| 127 |
document.getElementById(id).classList.add('active');
|
| 128 |
}
|
| 129 |
|
| 130 |
-
//
|
| 131 |
window.onload = () => {
|
| 132 |
fetch('Huiucl.json')
|
| 133 |
.then(res => res.json())
|
| 134 |
.then(data => {
|
| 135 |
-
|
| 136 |
-
loadGrammar();
|
| 137 |
renderTable();
|
| 138 |
-
|
| 139 |
})
|
| 140 |
-
.catch(err =>
|
|
|
|
|
|
|
| 141 |
};
|
| 142 |
|
| 143 |
-
// ์ฌ์ ๋ ๋๋ง ๋ก์ง
|
| 144 |
function renderTable() {
|
|
|
|
| 145 |
const body = document.getElementById('dictBody');
|
| 146 |
-
const search = document.getElementById('searchInput').value.toLowerCase();
|
| 147 |
body.innerHTML = '';
|
| 148 |
|
| 149 |
-
//
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
|
|
|
| 163 |
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
|
|
|
| 171 |
}
|
|
|
|
|
|
|
|
|
|
| 172 |
}
|
| 173 |
}
|
| 174 |
}
|
|
|
|
|
|
|
| 175 |
}
|
| 176 |
|
| 177 |
-
function
|
| 178 |
const body = document.getElementById('dictBody');
|
| 179 |
const row = body.insertRow();
|
| 180 |
-
if (
|
| 181 |
-
|
| 182 |
row.innerHTML = `
|
| 183 |
-
<td class="word-cell">${
|
| 184 |
-
<td
|
| 185 |
-
<td
|
| 186 |
`;
|
| 187 |
}
|
| 188 |
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
const set = conlangData.Settings;
|
| 195 |
-
let html = `
|
| 196 |
-
<h3>Syntax (์ด์)</h3>
|
| 197 |
-
<p>๊ธฐ๋ณธ ์ด์: ${set.Syntax.Word_Order.join(' / ')}</p>
|
| 198 |
-
<p>${set.Syntax.Imperative["2"]}</p>
|
| 199 |
-
<hr style="border:0; border-top:1px solid #eee; margin:20px 0;">
|
| 200 |
-
<h3>Phonology (์์ฑ)</h3>
|
| 201 |
-
<p><strong>Vowels:</strong> ${Object.keys(set.Phonology.Vowels).join(', ')}</p>
|
| 202 |
-
<p><strong>Consonants:</strong> ${Object.keys(set.Phonology.Consonants).join(', ')} (c=[k'], t=[t'])</p>
|
| 203 |
-
`;
|
| 204 |
-
container.innerHTML = html;
|
| 205 |
-
}
|
| 206 |
-
|
| 207 |
-
// ์์นด์ด๋ธ ๋ก์ง
|
| 208 |
-
const stories = [
|
| 209 |
-
{
|
| 210 |
-
title: "๊ธฐ๋ก 01: ํ์",
|
| 211 |
-
lines: [
|
| 212 |
-
{ h: "unal cinicl si hamolhilasna clamam..", k: "์ฐ์ฃผ์ ํ๋ชฐํ๋ผ์ค๋๊ฐ ํ์ด๋ฌ๋ค." },
|
| 213 |
-
{ h: "su u clum hoct.", k: "๊ทธ๋ ์ ์ด์๋ค." }
|
| 214 |
-
]
|
| 215 |
-
},
|
| 216 |
-
{
|
| 217 |
-
title: "๊ธฐ๋ก 02: ์ค๋น ์ค",
|
| 218 |
-
lines: [{ h: "...", k: "๋ค์ ๋ฐ์ดํฐ ์
๋ฐ์ดํธ๋ฅผ ๊ธฐ๋ค๋ ค์ฃผ์ธ์." }]
|
| 219 |
}
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
story.lines.forEach(line => {
|
| 230 |
-
html += `
|
| 231 |
-
<div class="story-line">
|
| 232 |
-
<div class="huiucl-text">${line.h}</div>
|
| 233 |
-
<div class="korean-text">${line.k}</div>
|
| 234 |
-
</div>`;
|
| 235 |
-
});
|
| 236 |
-
document.getElementById('storyViewer').innerHTML = html;
|
| 237 |
}
|
| 238 |
</script>
|
| 239 |
-
|
| 240 |
</body>
|
| 241 |
</html>
|
|
|
|
| 11 |
--primary-color: #5d5b54;
|
| 12 |
--accent-color: #d4a373;
|
| 13 |
--border-color: #e0ddd5;
|
|
|
|
| 14 |
}
|
| 15 |
|
| 16 |
+
body { font-family: 'Pretendard', sans-serif; background-color: var(--bg-color); color: var(--primary-color); margin: 0; line-height: 1.6; }
|
| 17 |
+
nav { position: sticky; top: 0; background: rgba(249, 247, 242, 0.9); backdrop-filter: blur(10px); padding: 15px; text-align: center; border-bottom: 1px solid var(--border-color); z-index: 100; }
|
| 18 |
+
nav a { margin: 0 15px; text-decoration: none; color: var(--primary-color); font-weight: 600; cursor: pointer; }
|
| 19 |
+
header { text-align: center; padding: 40px 20px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
h1 { font-weight: 300; letter-spacing: 8px; color: var(--accent-color); margin: 0; }
|
|
|
|
| 21 |
|
| 22 |
+
.container { max-width: 1000px; margin: 0 auto; padding: 20px; }
|
| 23 |
section { display: none; }
|
| 24 |
+
section.active { display: block; }
|
| 25 |
+
|
| 26 |
+
/* ์ฌ์ ์คํ์ผ */
|
| 27 |
+
.search-box { width: 100%; padding: 15px 25px; border: 1px solid var(--border-color); border-radius: 30px; font-size: 1rem; margin-bottom: 25px; box-sizing: border-box; outline: none; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
|
| 28 |
+
.table-wrapper { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
|
| 29 |
+
table { width: 100%; border-collapse: collapse; }
|
| 30 |
+
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #eee; }
|
| 31 |
+
th { background: #f1eee6; color: #777; font-size: 0.9rem; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
.word-cell { font-weight: bold; color: var(--accent-color); width: 25%; }
|
| 33 |
+
.variation-row { background: #faf9f6; font-size: 0.95rem; }
|
| 34 |
+
|
| 35 |
+
.card { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.02); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
</style>
|
| 37 |
</head>
|
| 38 |
<body>
|
|
|
|
| 40 |
<nav>
|
| 41 |
<a onclick="showSection('dictionary')">DICTIONARY</a>
|
| 42 |
<a onclick="showSection('grammar')">GRAMMAR</a>
|
|
|
|
| 43 |
</nav>
|
| 44 |
|
| 45 |
<header>
|
| 46 |
<h1>HUIUCL</h1>
|
| 47 |
+
<div style="color:#999; font-size:0.8rem; margin-top:5px;">SYSTEM ARCHIVE v2.0</div>
|
| 48 |
</header>
|
| 49 |
|
| 50 |
<div class="container">
|
| 51 |
<section id="dictionary" class="active">
|
| 52 |
+
<input type="text" id="searchInput" class="search-box" placeholder="๋จ์ด, ๋ป, ํ์์ด๋ฅผ ์
๋ ฅํ์ธ์..." oninput="renderTable()">
|
|
|
|
|
|
|
| 53 |
<div class="table-wrapper">
|
| 54 |
<table>
|
| 55 |
<thead>
|
| 56 |
<tr>
|
| 57 |
+
<th>๋จ์ด</th>
|
| 58 |
+
<th>์๋ฏธ (KO)</th>
|
| 59 |
+
<th>Meaning (EN)</th>
|
| 60 |
</tr>
|
| 61 |
</thead>
|
| 62 |
+
<tbody id="dictBody"></tbody>
|
|
|
|
| 63 |
</table>
|
| 64 |
</div>
|
| 65 |
</section>
|
| 66 |
|
| 67 |
<section id="grammar">
|
| 68 |
+
<div class="card" id="grammarBox">
|
| 69 |
+
<h2>Grammar Settings</h2>
|
| 70 |
+
<div id="settingsContent">๋ฐ์ดํฐ๋ฅผ ๋ถ๋ฌ์ค๋ ์ค...</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
</div>
|
| 72 |
</section>
|
| 73 |
</div>
|
| 74 |
|
| 75 |
<script>
|
| 76 |
+
let rawData = {};
|
| 77 |
|
| 78 |
function showSection(id) {
|
| 79 |
document.querySelectorAll('section').forEach(s => s.classList.remove('active'));
|
| 80 |
document.getElementById(id).classList.add('active');
|
| 81 |
}
|
| 82 |
|
| 83 |
+
// JSON ๋ก๋
|
| 84 |
window.onload = () => {
|
| 85 |
fetch('Huiucl.json')
|
| 86 |
.then(res => res.json())
|
| 87 |
.then(data => {
|
| 88 |
+
rawData = data;
|
|
|
|
| 89 |
renderTable();
|
| 90 |
+
renderGrammar();
|
| 91 |
})
|
| 92 |
+
.catch(err => {
|
| 93 |
+
document.getElementById('dictBody').innerHTML = '<tr><td colspan="3" style="text-align:center; padding:50px;">JSON ํ์ผ์ ์ฐพ์ ์ ์์ต๋๋ค. (Huiucl.json ํ์ธ)</td></tr>';
|
| 94 |
+
});
|
| 95 |
};
|
| 96 |
|
|
|
|
| 97 |
function renderTable() {
|
| 98 |
+
const query = document.getElementById('searchInput').value.toLowerCase();
|
| 99 |
const body = document.getElementById('dictBody');
|
|
|
|
| 100 |
body.innerHTML = '';
|
| 101 |
|
| 102 |
+
// ์ฌ๊ท์ ์ผ๋ก ๋จ์ด ๋ฐ์ดํฐ๋ฅผ ์ฐพ๋ ํจ์
|
| 103 |
+
function findEntries(obj) {
|
| 104 |
+
for (let key in obj) {
|
| 105 |
+
const item = obj[key];
|
| 106 |
+
|
| 107 |
+
// ๋จ์ด ์ํธ๋ฆฌ ์กฐ๊ฑด: meaning_ko ํ๋๊ฐ ์์ ๋
|
| 108 |
+
if (item && typeof item === 'object' && item.meaning_ko) {
|
| 109 |
+
const word = key;
|
| 110 |
+
const kor = item.meaning_ko;
|
| 111 |
+
const eng = item.meaning_en || '';
|
| 112 |
+
|
| 113 |
+
// ๊ฒ์ ์กฐ๊ฑด ๋์กฐ
|
| 114 |
+
if (word.toLowerCase().includes(query) || kor.includes(query) || eng.toLowerCase().includes(query)) {
|
| 115 |
+
appendRow(word, kor, eng, false);
|
| 116 |
+
}
|
| 117 |
|
| 118 |
+
// ํ์์ด(derivations) ์ํ
|
| 119 |
+
if (item.derivations) {
|
| 120 |
+
for (let dKey in item.derivations) {
|
| 121 |
+
const dMean = item.derivations[dKey];
|
| 122 |
+
if (dKey.toLowerCase().includes(query) || dMean.toLowerCase().includes(query)) {
|
| 123 |
+
appendRow(dKey, dMean, '-', true);
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
}
|
| 127 |
+
} else if (item && typeof item === 'object' && key !== "Settings") {
|
| 128 |
+
// ๋ ๊น์ ๊ณ์ธต์ด ์๋ค๋ฉด ๋ค์ ํ์
|
| 129 |
+
findEntries(item);
|
| 130 |
}
|
| 131 |
}
|
| 132 |
}
|
| 133 |
+
|
| 134 |
+
findEntries(rawData);
|
| 135 |
}
|
| 136 |
|
| 137 |
+
function appendRow(word, kor, eng, isSub) {
|
| 138 |
const body = document.getElementById('dictBody');
|
| 139 |
const row = body.insertRow();
|
| 140 |
+
if (isSub) row.className = 'variation-row';
|
| 141 |
+
|
| 142 |
row.innerHTML = `
|
| 143 |
+
<td class="word-cell">${isSub ? 'โ ' : ''}${word}</td>
|
| 144 |
+
<td>${kor}</td>
|
| 145 |
+
<td style="color:#aaa; font-size:0.85rem;">${eng}</td>
|
| 146 |
`;
|
| 147 |
}
|
| 148 |
|
| 149 |
+
function renderGrammar() {
|
| 150 |
+
const target = document.getElementById('settingsContent');
|
| 151 |
+
if (!rawData.Settings) {
|
| 152 |
+
target.innerHTML = "์ค์ ๋ฐ์ดํฐ๊ฐ ์์ต๋๋ค.";
|
| 153 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
}
|
| 155 |
+
const s = rawData.Settings;
|
| 156 |
+
target.innerHTML = `
|
| 157 |
+
<h3>Phonology</h3>
|
| 158 |
+
<p>Vowels: ${Object.keys(s.Phonology.Vowels).join(', ')}</p>
|
| 159 |
+
<p>Consonants: ${Object.keys(s.Phonology.Consonants).join(', ')}</p>
|
| 160 |
+
<h3>Syntax</h3>
|
| 161 |
+
<p>Order: ${s.Syntax.Word_Order.join(', ')}</p>
|
| 162 |
+
<p>${s.Syntax.Imperative["2"]}</p>
|
| 163 |
+
`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
}
|
| 165 |
</script>
|
|
|
|
| 166 |
</body>
|
| 167 |
</html>
|