From b8aa0214f0390fadcbf7e2d99b388dfbcf558664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=84=AD=E6=B2=9B=E8=BB=92?= Date: Sat, 20 Sep 2025 12:18:11 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=84=AA=E5=8C=96=E9=87=8D=E7=B5=84?= =?UTF-8?q?=E5=8D=80=E5=9F=9F=E7=BD=AE=E4=B8=AD=E6=95=88=E6=9E=9C=E8=88=87?= =?UTF-8?q?=E8=A8=BB=E8=A7=A3=E8=A6=8F=E7=AF=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 重組區域視覺改進 - 修正「答案區」完全置中對齊(上下左右都置中) - 使用 absolute inset-0 確保完美居中效果 - 添加 relative 定位支援絕對定位子元素 ## 代碼註解規範 - 為所有測驗說明文字添加統一註解格式 - 使用 "Instructions Test Action" 標準註解 - 提升代碼可讀性和維護性 ## 布局微調 - 優化重組區域的空白狀態顯示 - 確保視覺元素的精確對齊 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- frontend/app/learn/page.tsx | 40 +++++++++++++++++++-------- frontend/components/VoiceRecorder.tsx | 17 ++++++------ 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/frontend/app/learn/page.tsx b/frontend/app/learn/page.tsx index 6d4dc58..7e681d0 100644 --- a/frontend/app/learn/page.tsx +++ b/frontend/app/learn/page.tsx @@ -447,7 +447,9 @@ export default function LearnPage() { {currentCard.difficulty} -

+ + {/* Instructions Test Action */} +

點擊卡片翻面,根據你對單字的熟悉程度進行自我評估:

@@ -557,9 +559,12 @@ export default function LearnPage() { {currentCard.difficulty} -

+ + {/* Instructions Test Action */} +

請選擇符合上述定義的英文詞彙:

+

定義

@@ -681,9 +686,12 @@ export default function LearnPage() {
)} -

+ + {/* Instructions Test Action */} +

請點擊例句中的空白處輸入正確的單字:

+ {/* Example Sentence with Blanks */}
@@ -833,7 +841,9 @@ export default function LearnPage() { {currentCard.difficulty}
-

+ + {/* Instructions Test Action */} +

請聽發音並選擇正確的英文單字:

@@ -1010,7 +1020,9 @@ export default function LearnPage() { {currentCard.difficulty}
-

+ + {/* Instructions Test Action */} +

請聽例句並選擇正確的選項:

@@ -1090,17 +1102,16 @@ export default function LearnPage() { )} -

- 點擊下方單字,依序重組成正確的句子: -

- + + + {/* Arranged Sentence Area */}

重組區域:

-
+
{arrangedWords.length === 0 ? ( -
- 點擊下方單字來重組句子 +
+ 答案區
) : (
@@ -1119,6 +1130,11 @@ export default function LearnPage() {
+ {/* Instructions Test Action */} +

+ 點擊下方單字,依序重組成正確的句子: +

+ {/* Shuffled Words */}

可用單字:

diff --git a/frontend/components/VoiceRecorder.tsx b/frontend/components/VoiceRecorder.tsx index 4260d99..6449e77 100644 --- a/frontend/components/VoiceRecorder.tsx +++ b/frontend/components/VoiceRecorder.tsx @@ -257,14 +257,6 @@ export default function VoiceRecorder({
)} - {/* Instruction Text */} - {instructionText && ( -
-

- {instructionText} -

-
- )} {/* 目標文字顯示 */}
@@ -284,6 +276,15 @@ export default function VoiceRecorder({
+ {/* Instruction Text */} + {instructionText && ( +
+

+ {instructionText} +

+
+ )} + {/* 錄音控制區 */}