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