From 9df68a1257f8798811914d85fafd23ebc6e1eb16 Mon Sep 17 00:00:00 2001 From: Tommmy Date: Wed, 22 Oct 2025 07:42:04 +0800 Subject: [PATCH] change: elements --- WordDictationStudentApp/.DS_Store | Bin 6148 -> 6148 bytes WordDictationStudentApp/dist/.DS_Store | Bin 8196 -> 8196 bytes .../Words.app/Contents/Info.plist | 2 +- .../Words.app/Contents/Resources/app.asar | Bin 286854 -> 288774 bytes .../student_app_fullscreen.html | 84 +++++++++++++++--- 5 files changed, 71 insertions(+), 15 deletions(-) diff --git a/WordDictationStudentApp/.DS_Store b/WordDictationStudentApp/.DS_Store index 3b8d2871055d28bba1e67fa1c8a2eeb62f033bfa..66db5e1e1bb6552c49697eff8357a45e55431c7a 100644 GIT binary patch delta 21 ccmZoMXffFEiG{<&z(PmC$kJrpF diff --git a/WordDictationStudentApp/dist/.DS_Store b/WordDictationStudentApp/dist/.DS_Store index d30a58d00b259e9d0841e4878a420fb8a2255908..edbd7ec5aae61f1892a075887d9fb0661ed4743d 100644 GIT binary patch delta 25 gcmZp1XmQxEK#;@Oz+6Yc$kJ@`J0bhc&jn@q0Bg_)ApigX delta 25 gcmZp1XmQxEK#;@4z(PmC$kJr;J0bhc&jn@q0BhU`ApigX diff --git a/WordDictationStudentApp/dist/CaptureAll-darwin-x64/Words.app/Contents/Info.plist b/WordDictationStudentApp/dist/CaptureAll-darwin-x64/Words.app/Contents/Info.plist index 4a6d6c0..430db1b 100644 --- a/WordDictationStudentApp/dist/CaptureAll-darwin-x64/Words.app/Contents/Info.plist +++ b/WordDictationStudentApp/dist/CaptureAll-darwin-x64/Words.app/Contents/Info.plist @@ -37,7 +37,7 @@ algorithm SHA256 hash - 75e5a9ebe3d6699e5358fe6723c0322596d795efc2b3f3371babb74fe0e8e238 + 818e25caaff3e6f16a05d4438d5c754ec44d4a108b3b5b133d0a837d752710a6 LSApplicationCategoryType diff --git a/WordDictationStudentApp/dist/CaptureAll-darwin-x64/Words.app/Contents/Resources/app.asar b/WordDictationStudentApp/dist/CaptureAll-darwin-x64/Words.app/Contents/Resources/app.asar index 1a3ad0117ab6811d9675c081664b61af4c9e977b..1dc43729c0d170780d81cbf89e916eac91942e9c 100644 GIT binary patch delta 1547 zcmbu9?N3`}7{&wl)2@XTTj+QddcYaRVq40~TG$XWGLsp!E}1O45IMA`t`XYW9s+ZT zLXela6$TyL!ep>);9iuMWLa5(HGI~L@ec@zoEDNLm}vIFnBa4I5Qh4}#3rZdIp=xq z>w13oeYI;z)AdX zTWGSBnF`GgyT!q>rSxf;x#5`IY%4N3Y>vQ|EcbsG>8Mq9*DB-a6(6isLQ;>>c$A3* z=Y_Avw-!bO|KP^7UzmC<4Bw562Ze<`=BP1&+4&e+++I5}A;`cr4`ks_K6o9QIv^W! zMnH+bcSAbf?1E&p@{nNtTix}!`@;7anf6C+b^S}}Mvmt>ufD;d=v+fT~-dLtQ8J73M&u z;k~TO=Wu(Q%9&=5hx6J{*9>|bcR<3)mpw=Ch5nmi1J~r?FP4|H4tfHtyaeg-d3m_P zQJ+;akb1De>-mrl*FncL`2l-%U`&72}u-GSTFtIDcpZHM*XHRs^fWS0^AfINA?C zLN#@?9-fL^e@wd*{dRtH_>Ry!78#w0j(q8Kd762>-Rbi*vKRk}l`_ktaSinLjzz%<~CjST|X4#avybau7|p#v=0Lv1U!SF z4=xPB!@BZZy?)P_&~rnW53SF&iA|PHZD{0NAM+QO6O66d>*ZYhIWZAu zJ|a5&TtieCRg?69I+5VEnr<$vAxzMyA+N;ay|YA>cH?1WXhw3g1E+g2GB|^!Ddaf5 zQ%MqcHB(ThBXUfxBKp{`I2(SVC5P29IDhfVFF1}(Dw2b3r-(c&hJ9ahcEJYv(zEe1 z6;bD`&xIn>eY;UyU-U;8r=;%DSmKhFi8eBY03)g26xl&5zNp~wQ+t2IX2(@kVS<@aHOWTlXgks&3){ delta 559 zcmZp>AlP`!quX!$b=c19P*~L<>`Mv!oPro88AQ^w4-ef2EnEwPggq`6hf^NUh+lX4RCvXvAv zQ*4z$d?zs1E?xl&r$1z5(cWJBlUaz7Pf=G_K^KUhZQuR0Yr*tWGnf^abakgE{$^H^ z&&(?*EzwQMEH21Ntb`Z`7IJ}zOt=5dEGG>!;Q8*!&*sjD7y~vDYRYtl-^`rb7yn|` zl$t(Ultp!VzZi?Ru|`b2jYaW!x-6f4*& zsK+a)>lLLIq$ZYVfC9uPH7~s+LsPG$C^J`MI-?DX@bnL9ERyo@z)}awrB;+U=jWBA W=9K_V02?*kFr7tsd%6e9e0c!mBen|w diff --git a/WordDictationStudentApp/student_app_fullscreen.html b/WordDictationStudentApp/student_app_fullscreen.html index 9bed3d7..2b64a85 100644 --- a/WordDictationStudentApp/student_app_fullscreen.html +++ b/WordDictationStudentApp/student_app_fullscreen.html @@ -418,6 +418,37 @@ align-items: center; justify-content: center; } + /* 添加:单词容器样式 */ + .word-container { + display: flex; + justify-content: center; + align-items: center; + gap: 10px; + margin: 20px 0; + } + /* 添加:单个字母框样式 */ + .letter-box { + width: 80px; + height: 80px; + border-bottom: 3px solid #7cffcb; + display: flex; + justify-content: center; + align-items: center; + font-size: 3rem; + font-weight: bold; + text-transform: uppercase; + position: relative; + } + /* 添加:空字母框样式 */ + .letter-box.empty::after { + content: ""; + position: absolute; + bottom: -3px; + left: 0; + width: 100%; + height: 3px; + background-color: #7cffcb; + } .word-blank { display: inline-block; min-width: 300px; @@ -450,7 +481,8 @@ box-shadow: 0 0 20px rgba(124, 255, 203, 0.5); } */ /* --- 添加用于显示输入内容的元素 --- */ - .input-display { + /* 修改:移除原来的input-display样式 */ + /* .input-display { font-size: 2.5rem; color: #fff; margin: 20px 0; @@ -460,7 +492,8 @@ text-align: center; padding: 10px; border-bottom: 2px solid #7cffcb; - } + } */ + /* --- 结束修改 --- */ .input-indicator { color: #7cffcb; font-size: 1.2rem; @@ -1138,13 +1171,13 @@

单词默写

请输入单词:
-
_ _ _ _ _
+ +
+ +
- -
-
进度: 0/0
@@ -1282,8 +1315,12 @@ // 处理字母键 if (key.length === 1 && /^[a-z]$/.test(key)) { - currentInput += key; - updateInputDisplay(); + // 限制输入长度不超过当前单词长度 + const currentWord = importedWords[currentWordIndex].word; + if (currentInput.length < currentWord.length) { + currentInput += key; + updateInputDisplay(); + } } // 处理退格键 else if (key === 'backspace') { @@ -1301,11 +1338,32 @@ // 忽略所有其他键,包括 Esc 键 } + // 修改:更新输入显示函数 function updateInputDisplay() { - const displayElement = document.getElementById('inputDisplay'); - displayElement.textContent = currentInput; + const currentWord = importedWords[currentWordIndex].word; + const wordLength = currentWord.length; + const container = document.getElementById('wordContainer'); + + // 清空容器 + container.innerHTML = ''; + + // 为每个字母位置创建框 + for (let i = 0; i < wordLength; i++) { + const letterBox = document.createElement('div'); + letterBox.className = 'letter-box'; + + // 如果有输入的字母,显示它 + if (i < currentInput.length) { + letterBox.textContent = currentInput[i].toUpperCase(); + } else { + // 否则显示横线 + letterBox.classList.add('empty'); + } + + container.appendChild(letterBox); + } } - // --- 结束新增 --- + // --- 结束修改 --- // 创建背景粒子 function createParticles() { @@ -1543,9 +1601,7 @@ const currentWord = currentWordObj.word; const wordTranslation = currentWordObj.translation; const wordLength = currentWord.length; - // 横线 - const blanks = '_ '.repeat(wordLength).trim(); - document.getElementById('wordBlank').textContent = blanks; + // 首字母提示 document.getElementById('wordFirstLetter').textContent = `首字母提示:${currentWord[0].toUpperCase()}`; // 翻译