style: 優化重組區域置中效果與註解規範
## 重組區域視覺改進 - 修正「答案區」完全置中對齊(上下左右都置中) - 使用 absolute inset-0 確保完美居中效果 - 添加 relative 定位支援絕對定位子元素 ## 代碼註解規範 - 為所有測驗說明文字添加統一註解格式 - 使用 "Instructions Test Action" 標準註解 - 提升代碼可讀性和維護性 ## 布局微調 - 優化重組區域的空白狀態顯示 - 確保視覺元素的精確對齊 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
12488b3bdd
commit
b8aa0214f0
|
|
@ -447,7 +447,9 @@ export default function LearnPage() {
|
|||
{currentCard.difficulty}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-lg text-gray-700 mb-2 text-left">
|
||||
|
||||
{/* Instructions Test Action */}
|
||||
<p className="text-lg text-gray-700 mb-6 text-left">
|
||||
點擊卡片翻面,根據你對單字的熟悉程度進行自我評估:
|
||||
</p>
|
||||
|
||||
|
|
@ -557,9 +559,12 @@ export default function LearnPage() {
|
|||
{currentCard.difficulty}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-lg text-gray-700 mb-2 text-left">
|
||||
|
||||
{/* Instructions Test Action */}
|
||||
<p className="text-lg text-gray-700 mb-6 text-left">
|
||||
請選擇符合上述定義的英文詞彙:
|
||||
</p>
|
||||
|
||||
<div className="text-center mb-8">
|
||||
<div className="bg-gray-50 rounded-lg p-4 mb-6">
|
||||
<h3 className="font-semibold text-gray-900 mb-2 text-left">定義</h3>
|
||||
|
|
@ -681,9 +686,12 @@ export default function LearnPage() {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p className="text-lg text-gray-700 mb-2 text-left">
|
||||
|
||||
{/* Instructions Test Action */}
|
||||
<p className="text-lg text-gray-700 mb-6 text-left">
|
||||
請點擊例句中的空白處輸入正確的單字:
|
||||
</p>
|
||||
|
||||
{/* Example Sentence with Blanks */}
|
||||
<div className="mb-6">
|
||||
<div className="bg-gray-50 rounded-lg p-6">
|
||||
|
|
@ -833,7 +841,9 @@ export default function LearnPage() {
|
|||
{currentCard.difficulty}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-lg text-gray-700 mb-2 text-left">
|
||||
|
||||
{/* Instructions Test Action */}
|
||||
<p className="text-lg text-gray-700 mb-6 text-left">
|
||||
請聽發音並選擇正確的英文單字:
|
||||
</p>
|
||||
|
||||
|
|
@ -1010,7 +1020,9 @@ export default function LearnPage() {
|
|||
{currentCard.difficulty}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-lg text-gray-700 mb-2 text-left">
|
||||
|
||||
{/* Instructions Test Action */}
|
||||
<p className="text-lg text-gray-700 mb-6 text-left">
|
||||
請聽例句並選擇正確的選項:
|
||||
</p>
|
||||
|
||||
|
|
@ -1090,17 +1102,16 @@ export default function LearnPage() {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p className="text-lg text-gray-700 mb-2 text-left">
|
||||
點擊下方單字,依序重組成正確的句子:
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Arranged Sentence Area */}
|
||||
<div className="mb-6">
|
||||
<h3 className="text-lg font-semibold text-gray-900 mb-3 text-left">重組區域:</h3>
|
||||
<div className="min-h-[120px] bg-gray-50 rounded-lg p-4 border-2 border-dashed border-gray-300">
|
||||
<div className="relative min-h-[120px] bg-gray-50 rounded-lg p-4 border-2 border-dashed border-gray-300">
|
||||
{arrangedWords.length === 0 ? (
|
||||
<div className="flex items-center justify-center h-full text-gray-400 text-lg">
|
||||
點擊下方單字來重組句子
|
||||
<div className="absolute inset-0 flex items-center justify-center text-gray-400 text-lg">
|
||||
答案區
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
|
|
@ -1119,6 +1130,11 @@ export default function LearnPage() {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* Instructions Test Action */}
|
||||
<p className="text-lg text-gray-700 mb-6 text-left">
|
||||
點擊下方單字,依序重組成正確的句子:
|
||||
</p>
|
||||
|
||||
{/* Shuffled Words */}
|
||||
<div className="mb-6">
|
||||
<h3 className="text-lg font-semibold text-gray-900 mb-3 text-left">可用單字:</h3>
|
||||
|
|
|
|||
|
|
@ -257,14 +257,6 @@ export default function VoiceRecorder({
|
|||
</div>
|
||||
)}
|
||||
|
||||
{/* Instruction Text */}
|
||||
{instructionText && (
|
||||
<div className="mb-6">
|
||||
<p className="text-lg text-gray-700 text-left">
|
||||
{instructionText}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 目標文字顯示 */}
|
||||
<div className="mb-6">
|
||||
|
|
@ -284,6 +276,15 @@ export default function VoiceRecorder({
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* Instruction Text */}
|
||||
{instructionText && (
|
||||
<div className="mb-6">
|
||||
<p className="text-lg text-gray-700 text-left">
|
||||
{instructionText}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 錄音控制區 */}
|
||||
<div className="p-6 border-2 border-dashed border-gray-300 rounded-xl">
|
||||
<div className="flex flex-col items-center gap-4">
|
||||
|
|
|
|||
Loading…
Reference in New Issue