ux: 調整測驗頁面布局為統一格式

- 將所有測驗模式的標題移至左上角
- 難度標籤移至右上角
- 為每個測驗添加清楚的操作說明文字
- 使用 flex justify-between 布局統一標題區域

改善用戶體驗,讓每個測驗的目的和操作方式更加清晰明確。

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
鄭沛軒 2025-09-20 02:49:36 +08:00
parent 55db91c872
commit a39ef4ba6f
1 changed files with 72 additions and 51 deletions

View File

@ -485,22 +485,24 @@ export default function LearnPage() {
</div> </div>
<div className="bg-white rounded-xl shadow-lg p-8"> <div className="bg-white rounded-xl shadow-lg p-8">
<div className="text-center mb-8"> {/* Title in top-left */}
<div className="mb-4"> <div className="flex justify-between items-start mb-6">
<span className="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full"> <h2 className="text-2xl font-bold text-gray-900">
{currentCard.difficulty}
</span>
</div>
<h2 className="text-2xl font-bold text-gray-900 mb-6">
</h2> </h2>
<div className="bg-gray-50 rounded-lg p-4 mb-6"> <span className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
<h3 className="font-semibold text-gray-900 mb-2 text-left"></h3> {currentCard.difficulty}
<p className="text-gray-700 text-left">{currentCard.definition}</p> </span>
</div> </div>
<p className="text-lg text-gray-700 mb-2 text-left"> <p className="text-lg text-gray-700 mb-2 text-left">
</p> </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>
<p className="text-gray-700 text-left">{currentCard.definition}</p>
</div>
</div> </div>
<div className="space-y-3"> <div className="space-y-3">
@ -588,15 +590,20 @@ export default function LearnPage() {
</div> </div>
<div className="bg-white rounded-xl shadow-lg p-8"> <div className="bg-white rounded-xl shadow-lg p-8">
<div className="text-center mb-8"> {/* Title in top-left */}
<div className="mb-4"> <div className="flex justify-between items-start mb-6">
<span className="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full"> <h2 className="text-2xl font-bold text-gray-900">
</h2>
<span className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
{currentCard.difficulty} {currentCard.difficulty}
</span> </span>
</div> </div>
<h2 className="text-2xl font-bold text-gray-900 mb-4"> <p className="text-lg text-gray-700 mb-2 text-left">
</h2> </p>
<div className="text-center mb-8">
<div className="bg-gray-50 rounded-lg p-6 mb-6"> <div className="bg-gray-50 rounded-lg p-6 mb-6">
<p className="text-lg text-gray-700 mb-4"> <p className="text-lg text-gray-700 mb-4">
<strong></strong>{currentCard.definition} <strong></strong>{currentCard.definition}
@ -712,15 +719,20 @@ export default function LearnPage() {
</div> </div>
<div className="bg-white rounded-xl shadow-lg p-8"> <div className="bg-white rounded-xl shadow-lg p-8">
<div className="text-center mb-8"> {/* Title in top-left */}
<div className="mb-4"> <div className="flex justify-between items-start mb-6">
<span className="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full"> <h2 className="text-2xl font-bold text-gray-900">
</h2>
<span className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
{currentCard.difficulty} {currentCard.difficulty}
</span> </span>
</div> </div>
<h2 className="text-2xl font-bold text-gray-900 mb-6"> <p className="text-lg text-gray-700 mb-2 text-left">
</h2> </p>
<div className="text-center mb-8">
<div className="bg-gray-50 rounded-lg p-6 mb-6"> <div className="bg-gray-50 rounded-lg p-6 mb-6">
<p className="text-lg text-gray-700 mb-4"> <p className="text-lg text-gray-700 mb-4">
@ -823,15 +835,20 @@ export default function LearnPage() {
</div> </div>
<div className="bg-white rounded-xl shadow-lg p-8"> <div className="bg-white rounded-xl shadow-lg p-8">
<div className="text-center mb-8"> {/* Title in top-left */}
<div className="mb-4"> <div className="flex justify-between items-start mb-6">
<span className="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full"> <h2 className="text-2xl font-bold text-gray-900">
</h2>
<span className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
{currentCard.difficulty} {currentCard.difficulty}
</span> </span>
</div> </div>
<h2 className="text-2xl font-bold text-gray-900 mb-6"> <p className="text-lg text-gray-700 mb-2 text-left">
</h2> </p>
<div className="text-center mb-8">
<div className="bg-gray-50 rounded-lg p-6 mb-6"> <div className="bg-gray-50 rounded-lg p-6 mb-6">
<p className="text-lg text-gray-700 mb-4"> <p className="text-lg text-gray-700 mb-4">
<strong></strong>{currentCard.translation} <strong></strong>{currentCard.translation}
@ -918,19 +935,21 @@ export default function LearnPage() {
</div> </div>
<div className="bg-white rounded-xl shadow-lg p-8"> <div className="bg-white rounded-xl shadow-lg p-8">
<div className="text-center mb-8"> {/* Title in top-left */}
<div className="mb-4"> <div className="flex justify-between items-start mb-6">
<span className="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full"> <h2 className="text-2xl font-bold text-gray-900">
</h2>
<span className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
{currentCard.difficulty} {currentCard.difficulty}
</span> </span>
</div> </div>
<h2 className="text-2xl font-bold text-gray-900 mb-6"> <p className="text-lg text-gray-700 mb-2 text-left">
</h2>
<p className="text-lg text-gray-700 mb-6">
</p> </p>
<div className="text-center mb-8">
<div className="mb-6"> <div className="mb-6">
<AudioPlayer text={currentCard.example} /> <AudioPlayer text={currentCard.example} />
<p className="text-sm text-gray-500 mt-2"> <p className="text-sm text-gray-500 mt-2">
@ -981,15 +1000,20 @@ export default function LearnPage() {
</div> </div>
<div className="bg-white rounded-xl shadow-lg p-8"> <div className="bg-white rounded-xl shadow-lg p-8">
<div className="text-center mb-8"> {/* Title in top-left */}
<div className="mb-4"> <div className="flex justify-between items-start mb-6">
<span className="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full"> <h2 className="text-2xl font-bold text-gray-900">
</h2>
<span className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
{currentCard.difficulty} {currentCard.difficulty}
</span> </span>
</div> </div>
<h2 className="text-2xl font-bold text-gray-900 mb-6"> <p className="text-lg text-gray-700 mb-2 text-left">
</h2> </p>
<div className="text-center mb-8">
<div className="bg-gray-50 rounded-lg p-6 mb-6"> <div className="bg-gray-50 rounded-lg p-6 mb-6">
<p className="text-lg text-gray-700 mb-4"> <p className="text-lg text-gray-700 mb-4">
@ -1000,9 +1024,6 @@ export default function LearnPage() {
</p> </p>
</div> </div>
<p className="text-lg text-gray-700 mb-6">
</p>
</div> </div>
<div className="mb-6"> <div className="mb-6">