OpenLab-NLP commited on
Commit
db34979
ยท
verified ยท
1 Parent(s): aff5f11

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +178 -171
index.html CHANGED
@@ -2,87 +2,99 @@
2
  <html lang="ko">
3
  <head>
4
  <meta charset="UTF-8">
5
- <title>HUIUCL CORE ARCHIVE v5.0</title>
 
6
  <style>
7
  :root {
8
- --bg: #f5f3f0;
9
- --card: #ffffff;
10
- --accent: #a68b6a;
11
- --primary: #2c2c2c;
12
- --secondary: #767676;
13
- --border: #e0ddd5;
14
  }
15
 
16
- body { font-family: 'Pretendard', -apple-system, sans-serif; background: var(--bg); color: var(--primary); margin: 0; line-height: 1.6; }
17
-
18
- /* Navigation */
19
- nav { background: var(--primary); padding: 1rem 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 15px rgba(0,0,0,0.1); }
20
- .nav-container { max-width: 1100px; margin: 0 auto; display: flex; justify-content: center; gap: 40px; }
21
- nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem; letter-spacing: 2px; cursor: pointer; opacity: 0.7; transition: 0.3s; }
22
- nav a:hover, nav a.active { opacity: 1; color: var(--accent); }
23
-
24
- /* Header */
25
- header { background: #fff; padding: 60px 20px; text-align: center; border-bottom: 1px solid var(--border); }
26
- h1 { margin: 0; letter-spacing: 12px; font-weight: 200; color: var(--primary); font-size: 2.5rem; }
27
- .sub-header { color: var(--secondary); font-size: 0.8rem; margin-top: 15px; letter-spacing: 3px; text-transform: uppercase; }
28
-
29
- .container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
30
-
31
- /* Dictionary Styling */
32
- .search-box { width: 100%; padding: 20px 30px; border: 1px solid var(--border); border-radius: 40px; font-size: 1.1rem; box-sizing: border-box; outline: none; background: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.03); transition: 0.3s; margin-bottom: 30px; }
33
- .search-box:focus { border-color: var(--accent); box-shadow: 0 5px 25px rgba(166, 139, 106, 0.15); }
34
-
35
- .table-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.04); border: 1px solid var(--border); }
36
- table { width: 100%; border-collapse: collapse; table-layout: fixed; }
37
- th { background: #faf9f7; padding: 20px; text-align: left; font-size: 0.75rem; color: #999; letter-spacing: 1px; border-bottom: 2px solid var(--border); }
38
- td { padding: 20px; border-bottom: 1px solid var(--border); vertical-align: top; word-break: break-all; }
39
-
40
- .word-cell { width: 25%; font-size: 1.2rem; font-weight: 700; color: var(--primary); }
41
- .meaning-cell { width: 55%; }
42
- .path-cell { width: 20%; text-align: right; font-size: 0.7rem; color: #bbb; text-transform: uppercase; }
43
-
44
- .ko-text { font-size: 1.1rem; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
45
- .en-text { font-size: 0.95rem; color: var(--secondary); }
46
- .usage-box { margin-top: 12px; padding: 12px; background: #fdfcfb; border: 1px solid #f0eee9; border-left: 4px solid var(--accent); font-size: 0.85rem; color: #555; }
47
-
48
- /* Grammar Section Styling */
49
- .grammar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); gap: 20px; }
50
- .grammar-card { background: #fff; padding: 30px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 5px 15px rgba(0,0,0,0.02); }
51
- .grammar-card h2 { margin-top: 0; font-size: 1.3rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 20px; font-weight: 400; }
52
- .rule-item { margin-bottom: 15px; }
53
- .rule-name { font-weight: 700; color: var(--primary); display: block; margin-bottom: 3px; font-size: 0.95rem; }
54
- .rule-desc { font-size: 0.9rem; color: var(--secondary); display: block; }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  section { display: none; }
57
- section.active { display: block; animation: fadeIn 0.4s ease-out; }
 
58
  @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  </style>
60
  </head>
61
  <body>
62
 
63
  <nav>
64
- <div class="nav-container">
65
- <a id="btn-dict" class="active" onclick="showTab('dictionary')">DICTIONARY</a>
66
- <a id="btn-gram" onclick="showTab('grammar')">GRAMMAR</a>
67
- </div>
68
  </nav>
69
 
70
  <header>
71
  <h1>HUIUCL</h1>
72
- <div class="sub-header">Systemized Linguistic Archive v5.0</div>
73
  </header>
74
 
75
  <div class="container">
76
  <section id="dictionary" class="active">
77
- <input type="text" id="searchInput" class="search-box" placeholder="Search words, meanings, or categories..." oninput="render()">
78
- <div class="table-card">
 
 
 
 
 
79
  <table>
80
  <thead>
81
- <tr>
82
- <th>WORD</th>
83
- <th>MEANING & USAGE</th>
84
- <th style="text-align:right">CATEGORY</th>
85
- </tr>
86
  </thead>
87
  <tbody id="dictBody"></tbody>
88
  </table>
@@ -90,146 +102,141 @@
90
  </section>
91
 
92
  <section id="grammar">
93
- <div id="grammarContent" class="grammar-grid">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  </div>
 
 
 
95
  </section>
96
  </div>
97
 
98
  <script>
99
- let db = {};
 
100
 
101
- function showTab(id) {
 
102
  document.querySelectorAll('section').forEach(s => s.classList.remove('active'));
103
- document.querySelectorAll('nav a').forEach(a => a.classList.remove('active'));
104
  document.getElementById(id).classList.add('active');
105
- document.getElementById('btn-' + (id === 'dictionary' ? 'dict' : 'gram')).classList.add('active');
106
  }
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  window.onload = () => {
 
109
  fetch('Huiucl.json')
110
  .then(res => res.json())
111
  .then(data => {
112
- db = data;
113
- render();
114
- renderGrammar();
115
- })
116
- .catch(err => console.error("JSON ๋กœ๋“œ ์‹คํŒจ:", err));
117
  };
118
 
119
- function render() {
120
- const query = document.getElementById('searchInput').value.toLowerCase();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  const body = document.getElementById('dictBody');
 
122
  body.innerHTML = '';
123
-
124
- for (const cat in db) {
125
- if (cat === "Settings") continue;
126
- processCategory(db[cat], cat, query);
127
- }
128
  }
129
 
130
- function processCategory(obj, path, query) {
131
- if (path.includes("Grammar_Rules")) return;
132
-
133
  for (const key in obj) {
134
- const val = obj[key];
135
- if (!val) continue;
136
-
137
- const info = getInfo(key, val);
138
-
139
- if (info.isWord) {
140
- if ((info.word + info.ko + info.en + path).toLowerCase().includes(query)) {
141
- appendRow(info, path);
142
- }
143
- // ํŒŒ์ƒ์–ด ์ฒ˜๋ฆฌ
144
- if (val.derivations) {
145
- for (const dk in val.derivations) {
146
- appendRow({ word: dk, ko: val.derivations[dk], en: "", usage: "" }, path, true);
147
- }
148
- }
149
- // ์‹œ์ œ ๋ณ€ํ˜• ๋“ฑ ๋‚ด๋ถ€ ์žฌ๊ท€
150
- if (typeof val === 'object' && val.tense_variants) {
151
- processCategory(val.tense_variants, path + " > " + key, query);
152
- }
153
- } else if (typeof val === 'object') {
154
- processCategory(val, path + " > " + key, query);
155
  }
156
  }
157
  }
158
 
159
- function getInfo(key, val) {
160
- let res = { isWord: false, word: key, ko: "", en: "", usage: "" };
161
-
162
- if (typeof val === 'string') {
163
- res.isWord = true;
164
- res.ko = val;
165
- } else if (typeof val === 'object') {
166
- // morpheme ํ‚ค๊ฐ€ ์žˆ์œผ๋ฉด ๊ทธ๊ฒƒ์„ ๋‹จ์–ด๋กœ ์ทจ๊ธ‰
167
- if (val.morpheme) res.word = val.morpheme;
168
-
169
- res.ko = val.meaning_ko || val.ko || val.๋œป || val.definition || "";
170
- res.en = val.meaning_en || val.en || "";
171
- res.usage = val.usage || val.note || "";
172
-
173
- // ๊ฐ์ฒด ์•ˆ์˜ ๊ฐ์ฒด ์—๋Ÿฌ ๋ฐฉ์ง€ (๊ฐ•์ œ ๋ฌธ์ž์—ดํ™”)
174
- const clean = (v) => (typeof v === 'object' ? (v.ko || v.meaning_ko || v.en || JSON.stringify(v)) : v);
175
- res.ko = clean(res.ko);
176
- res.en = clean(res.en);
177
- res.usage = clean(res.usage);
178
-
179
- if (res.ko || res.en) res.isWord = true;
180
  }
181
- return res;
182
  }
183
 
184
- function appendRow(info, path, isSub) {
185
- const body = document.getElementById('dictBody');
186
- const row = body.insertRow();
187
- if (isSub) row.style.background = "#fcfcfc";
188
-
189
- let meaningHtml = `<div class="ko-text">${info.ko}</div>`;
190
- if (info.en) meaningHtml += `<div class="en-text">${info.en}</div>`;
191
- if (info.usage) meaningHtml += `<div class="usage-box"><strong>NOTE:</strong> ${info.usage}</div>`;
192
-
193
- row.innerHTML = `
194
- <td class="word-cell" style="${isSub ? 'padding-left:40px; font-size:1rem; opacity:0.7;' : ''}">
195
- ${isSub ? 'โ†ณ ' : ''}${info.word}
196
- </td>
197
- <td class="meaning-cell">${meaningHtml}</td>
198
- <td class="path-cell">${path}</td>
199
- `;
200
- }
201
-
202
- function renderGrammar() {
203
- const container = document.getElementById('grammarContent');
204
- let html = "";
205
-
206
- // 1. Settings ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ
207
- if (db.Settings) {
208
- html += `<div class="grammar-card">
209
- <h2>General System</h2>
210
- <div class="rule-item"><span class="rule-name">Word Order</span><span class="rule-desc">${db.Settings.Syntax.Word_Order.join(', ')}</span></div>
211
- <div class="rule-item"><span class="rule-name">Imperative</span><span class="rule-desc">${db.Settings.Syntax.Imperative["2"]}</span></div>
212
- <div class="rule-item"><span class="rule-name">Phonology</span><span class="rule-desc">Vowels: ${Object.keys(db.Settings.Phonology.Vowels).join(', ')} / Consonants: ${Object.keys(db.Settings.Phonology.Consonants).join(', ')}</span></div>
213
- </div>`;
214
- }
215
-
216
- // 2. ํŠธ๋ฆฌ ์ „์ฒด๋ฅผ ๋’ค์ ธ์„œ Grammar_Rules ์ˆ˜์ง‘
217
- function collect(obj, path) {
218
- for (const key in obj) {
219
- if (key === "Grammar_Rules") {
220
- html += `<div class="grammar-card"><h2>${path} Rules</h2>`;
221
- for (const r in obj[key]) {
222
- html += `<div class="rule-item"><span class="rule-name">${r}</span><span class="rule-desc">${obj[key][r]}</span></div>`;
223
- }
224
- html += `</div>`;
225
- } else if (typeof obj[key] === 'object' && key !== "Settings") {
226
- collect(obj[key], path ? path + " > " + key : key);
227
- }
228
- }
229
- }
230
- collect(db, "");
231
- container.innerHTML = html || "<p style='grid-column: 1/-1; text-align:center; padding:50px;'>No grammar rules found.</p>";
232
  }
233
  </script>
 
234
  </body>
235
- </html>
 
2
  <html lang="ko">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>HUIUCL Online Archive</title>
7
  <style>
8
  :root {
9
+ --bg-color: #f9f7f2;
10
+ --card-bg: #ffffff;
11
+ --primary-color: #5d5b54;
12
+ --accent-color: #d4a373;
13
+ --border-color: #e0ddd5;
14
+ --variation-bg: #faf9f6;
15
  }
16
 
17
+ body {
18
+ font-family: 'Pretendard', sans-serif;
19
+ background-color: var(--bg-color);
20
+ color: var(--primary-color);
21
+ margin: 0; padding: 0; line-height: 1.6;
22
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ /* ๋„ค๋น„๊ฒŒ์ด์…˜: ARCHIVE๋ฅผ ๋งจ ๋’ค๋กœ ์ด๋™ */
25
+ nav {
26
+ position: sticky; top: 0; background: rgba(249, 247, 242, 0.9);
27
+ backdrop-filter: blur(10px); padding: 20px; text-align: center;
28
+ border-bottom: 1px solid var(--border-color); z-index: 100;
29
+ }
30
+ nav a { margin: 0 15px; text-decoration: none; color: var(--primary-color); font-weight: 500; font-size: 0.9rem; transition: 0.2s; }
31
+ nav a:hover { color: var(--accent-color); }
32
+
33
+ header { text-align: center; padding: 60px 20px; }
34
+ h1 { font-weight: 300; letter-spacing: 8px; color: var(--accent-color); margin: 0; }
35
+ .sub-title { font-size: 0.9rem; color: #999; margin-top: 10px; }
36
+
37
+ .container { max-width: 900px; margin: 0 auto; padding: 0 20px 100px; }
38
  section { display: none; }
39
+ section.active { display: block; animation: fadeIn 0.5s; }
40
+
41
  @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
42
+
43
+ /* ์‚ฌ์ „(DICTIONARY) ์Šคํƒ€์ผ */
44
+ .search-container { margin-bottom: 30px; display: flex; gap: 10px; }
45
+ input[type="text"] { flex: 1; padding: 12px 24px; border: 1px solid var(--border-color); border-radius: 30px; outline: none; }
46
+ .filter-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 30px; }
47
+ button { background: var(--card-bg); border: 1px solid var(--border-color); padding: 6px 16px; cursor: pointer; border-radius: 20px; font-size: 0.85rem; }
48
+ button.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }
49
+ .table-wrapper { background: var(--card-bg); border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
50
+ table { width: 100%; border-collapse: collapse; }
51
+ th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--bg-color); }
52
+ th { background: #f1eee6; font-size: 0.9rem; color: #777; }
53
+ .word-cell { font-weight: bold; color: var(--accent-color); }
54
+
55
+ /* ๋ฌธ๋ฒ•(GRAMMAR) ์Šคํƒ€์ผ */
56
+ .card { background: var(--card-bg); padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); margin-bottom: 20px; }
57
+
58
+ /* ์•„์นด์ด๋ธŒ(ARCHIVE) ์Šคํƒ€์ผ: ๋ฆฌ์ŠคํŠธ & ๋ทฐ์–ด */
59
+ .archive-layout { display: flex; gap: 30px; }
60
+ .story-list { width: 250px; flex-shrink: 0; }
61
+ .story-item {
62
+ padding: 15px; background: var(--card-bg); margin-bottom: 10px;
63
+ border-radius: 10px; cursor: pointer; border: 1px solid var(--border-color);
64
+ font-size: 0.9rem; transition: 0.2s;
65
+ }
66
+ .story-item:hover, .story-item.active { border-color: var(--accent-color); color: var(--accent-color); background: #fdfcf9; }
67
+ .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; }
68
+ .story-line { margin-bottom: 25px; }
69
+ .huiucl-text { font-size: 1.2rem; color: var(--accent-color); font-weight: 600; margin-bottom: 5px; }
70
+ .korean-text { font-size: 1rem; color: #777; border-left: 2px solid var(--border-color); padding-left: 15px; }
71
  </style>
72
  </head>
73
  <body>
74
 
75
  <nav>
76
+ <a href="#" onclick="showSection('dictionary')">DICTIONARY</a>
77
+ <a href="#" onclick="showSection('grammar')">GRAMMAR</a>
78
+ <a href="#" onclick="showSection('archive')">ARCHIVE</a>
 
79
  </nav>
80
 
81
  <header>
82
  <h1>HUIUCL</h1>
83
+ <div class="sub-title">v2.0 Revision - Artificial Language Project</div>
84
  </header>
85
 
86
  <div class="container">
87
  <section id="dictionary" class="active">
88
+ <div class="search-container">
89
+ <input type="text" id="searchInput" placeholder="๋‹จ์–ด ํ˜น์€ ์˜๋ฏธ ๊ฒ€์ƒ‰..." onkeyup="renderTable()">
90
+ </div>
91
+ <div class="filter-container" id="categoryButtons">
92
+ <button onclick="changeCategory('๋ชจ๋‘', this)" class="active">๋ชจ๋‘ ๋ณด๊ธฐ</button>
93
+ </div>
94
+ <div class="table-wrapper">
95
  <table>
96
  <thead>
97
+ <tr><th>๋‹จ์–ด</th><th>์˜๋ฏธ</th><th>๋ถ„๋ฅ˜</th></tr>
 
 
 
 
98
  </thead>
99
  <tbody id="dictBody"></tbody>
100
  </table>
 
102
  </section>
103
 
104
  <section id="grammar">
105
+ <div class="card">
106
+ <h2 style="font-weight: 300;">Basic Grammar</h2>
107
+ <p><strong>1. ์–ด์ˆœ:</strong> ์ฃผ์–ด-๋™์‚ฌ(SV) ๋˜๋Š” ์ฃผ์–ด-๋™์‚ฌ-๋ชฉ์ ์–ด(SVO)</p>
108
+ <p><strong>2. ๋ช…๋ น๋ฌธ:</strong> ๋™์‚ฌ๋ฅผ ๋งจ ์•ž์— ์œ„์น˜</p>
109
+ <p><strong>3. ์‹œ์ œ:</strong> ๊ณผ๊ฑฐํ˜• <code>-m</code>, ๋ฏธ๋ž˜ํ˜• <code>-n</code></p>
110
+ <hr style="border: 0; border-top: 1px solid var(--border-color); margin: 20px 0;">
111
+ <h3>Phoneme (์Œ์†Œ)</h3>
112
+ <p><strong>Vowels:</strong> a, i, u</p>
113
+ <p><strong>Consonants:</strong> m, n, s, h, l, c(ใ„ฒ), t(ใ„ธ)</p>
114
+ </div>
115
+ </section>
116
+
117
+ <section id="archive">
118
+ <div class="archive-layout">
119
+ <div class="story-list">
120
+ <div class="story-item active" onclick="loadStory(0, this)">01. ํƒ„์ƒ</div>
121
+ <div class="story-item" onclick="loadStory(1, this)">02. ์ค€๋น„ ์ค‘...</div>
122
  </div>
123
+ <div class="story-content" id="storyViewer">
124
+ </div>
125
+ </div>
126
  </section>
127
  </div>
128
 
129
  <script>
130
+ let conlangData = {};
131
+ let currentCategory = '๋ชจ๋‘';
132
 
133
+ // ์„น์…˜ ์ „ํ™˜
134
+ function showSection(id) {
135
  document.querySelectorAll('section').forEach(s => s.classList.remove('active'));
 
136
  document.getElementById(id).classList.add('active');
 
137
  }
138
 
139
+ // ์†Œ์„ค ๋ฐ์ดํ„ฐ ๋กœ๋“œ ๋ฐ ์ „ํ™˜
140
+ const stories = [
141
+ {
142
+ title: "๊ธฐ๋ก 01: ํƒ„์ƒ",
143
+ lines: [
144
+ { h: "unal cinicl si hamolhilasna clamam..", k: "์šฐ์ฃผ์™€ ํ•˜๋ชฐํžˆ๋ผ์Šค๋‚˜๊ฐ€ ํƒœ์–ด๋‚ฌ๋‹ค." },
145
+ { h: "su u clum hoct.", k: "๊ทธ๋Š” ์‹ ์ด์—ˆ๋‹ค." }
146
+ ]
147
+ },
148
+ {
149
+ title: "๊ธฐ๋ก 02: (๋‚ด์šฉ์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”)",
150
+ lines: [
151
+ { h: "...", k: "๋‹ค์Œ ์ด์•ผ๊ธฐ๋ฅผ ์ค€๋น„ ์ค‘์ž…๋‹ˆ๋‹ค." }
152
+ ]
153
+ }
154
+ ];
155
+
156
+ function loadStory(index, el) {
157
+ if(el) {
158
+ document.querySelectorAll('.story-item').forEach(item => item.classList.remove('active'));
159
+ el.classList.add('active');
160
+ }
161
+
162
+ const story = stories[index];
163
+ let html = `<h2 style="font-weight:300; margin-bottom:40px; text-align:center;">${story.title}</h2>`;
164
+ story.lines.forEach(line => {
165
+ html += `
166
+ <div class="story-line">
167
+ <div class="huiucl-text">${line.h}</div>
168
+ <div class="korean-text">${line.k}</div>
169
+ </div>`;
170
+ });
171
+ document.getElementById('storyViewer').innerHTML = html;
172
+ }
173
+
174
+ // ์ดˆ๊ธฐ ์‹คํ–‰
175
  window.onload = () => {
176
+ loadStory(0);
177
  fetch('Huiucl.json')
178
  .then(res => res.json())
179
  .then(data => {
180
+ conlangData = data;
181
+ initButtons();
182
+ renderTable();
183
+ });
 
184
  };
185
 
186
+ // --- ์‚ฌ์ „ ๋กœ์ง (๊ธฐ์กด๊ณผ ๋™์ผ) ---
187
+ function initButtons() {
188
+ const container = document.getElementById('categoryButtons');
189
+ Object.keys(conlangData).forEach(key => {
190
+ if (key === "์„ค์ •") return;
191
+ const btn = document.createElement('button');
192
+ btn.innerText = key;
193
+ btn.onclick = (e) => {
194
+ document.querySelectorAll('#categoryButtons button').forEach(b => b.classList.remove('active'));
195
+ e.target.classList.add('active');
196
+ currentCategory = key;
197
+ renderTable();
198
+ };
199
+ container.appendChild(btn);
200
+ });
201
+ }
202
+
203
+ function renderTable() {
204
  const body = document.getElementById('dictBody');
205
+ const search = document.getElementById('searchInput').value.toLowerCase();
206
  body.innerHTML = '';
207
+ const targets = currentCategory === '๋ชจ๋‘' ? Object.keys(conlangData).filter(k => k !== "์„ค์ •") : [currentCategory];
208
+ targets.forEach(cat => traverse(conlangData[cat], cat, search));
 
 
 
209
  }
210
 
211
+ function traverse(obj, path, search) {
 
 
212
  for (const key in obj) {
213
+ if (key === "์„ค์ •" || key === "๋ณ€ํ˜•") continue;
214
+ const item = obj[key];
215
+ if (item && typeof item === 'object' && item.hasOwnProperty('๋œป')) {
216
+ if (key.toLowerCase().includes(search) || item.๋œป.toLowerCase().includes(search)) addRow(key, item.๋œป, path, false);
217
+ if (item[key] && typeof item[key] === 'object') processVariations(item[key], `${path} > ${key}`, search);
218
+ } else if (typeof item === 'string') {
219
+ if (key.toLowerCase().includes(search) || item.toLowerCase().includes(search)) addRow(key, item, path, false);
220
+ } else if (typeof item === 'object') {
221
+ traverse(item, `${path} > ${key}`, search);
 
 
 
 
 
 
 
 
 
 
 
 
222
  }
223
  }
224
  }
225
 
226
+ function processVariations(vObj, path, search) {
227
+ for (const vKey in vObj) {
228
+ const vVal = vObj[vKey];
229
+ const meaning = typeof vVal === 'string' ? vVal : (vVal.๋œป || "");
230
+ if (vKey.toLowerCase().includes(search) || meaning.toLowerCase().includes(search)) addRow(vKey, meaning, path, true);
231
+ if (typeof vVal === 'object' && vVal[vKey]) processVariations(vVal[vKey], `${path} > ${vKey}`, search);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  }
 
233
  }
234
 
235
+ function addRow(word, meaning, path, isVar) {
236
+ const row = document.getElementById('dictBody').insertRow();
237
+ row.innerHTML = `<td class="word-cell">${isVar ? 'โ†ณ ' : ''}${word}</td><td>${meaning}</td><td style="font-size:0.7rem; color:#ccc;">${path}</td>`;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
  </script>
240
+
241
  </body>
242
+ </html>