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:
鄭沛軒 2025-09-20 12:18:11 +08:00
parent 12488b3bdd
commit b8aa0214f0
2 changed files with 37 additions and 20 deletions

View File

@ -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>

View File

@ -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">