feat: 添加LOGO文件,修改考试界面的比例

添加多个LOGO文件,修改用户看到的考试界面的比例,并且调整了部分元素尺寸
This commit is contained in:
2025-12-29 11:59:11 +08:00
parent 91e15ec9b0
commit ed8818562f
16 changed files with 310 additions and 128 deletions

View File

@@ -450,7 +450,7 @@ const QuizPage = () => {
/>
<div className="flex-1 overflow-y-auto pb-24 safe-area-bottom">
<div className="max-w-4xl mx-auto p-4">
<div className="max-w-md mx-auto px-4">
<div
onTouchStart={handleTouchStart}
onTouchEnd={handleTouchEnd}
@@ -464,13 +464,13 @@ const QuizPage = () => {
}
`}
>
<div className="bg-white rounded-xl shadow-sm border border-gray-100 p-5 md:p-8 min-h-[400px]">
<div className="mb-6">
<span className={`inline-block px-3 py-1 rounded-md text-sm font-medium border ${getTagColor(currentQuestion.type)}`}>
<div className="bg-white rounded-xl shadow-sm border border-gray-100 p-4 min-h-[350px]">
<div className="mb-4">
<span className={`inline-block px-2 py-0.5 rounded-md text-xs font-medium border ${getTagColor(currentQuestion.type)}`}>
{questionTypeMap[currentQuestion.type]}
</span>
{currentQuestion.category && (
<span className="ml-2 inline-block px-2 py-1 bg-gray-50 text-gray-600 text-xs rounded border border-gray-100">
<span className="ml-2 inline-block px-1.5 py-0.5 bg-gray-50 text-gray-600 text-xs rounded border border-gray-100">
{currentQuestion.category}
</span>
)}
@@ -479,7 +479,7 @@ const QuizPage = () => {
<h2
ref={questionHeadingRef}
tabIndex={-1}
className="text-lg md:text-xl font-medium text-gray-900 leading-relaxed mb-8 outline-none"
className="text-base font-medium text-gray-900 leading-relaxed mb-6 outline-none"
>
{currentQuestion.content}
</h2>
@@ -511,28 +511,28 @@ const QuizPage = () => {
onCancel={() => setAnswerSheetOpen(false)}
footer={null}
centered
width={560}
width={340}
destroyOnClose
>
<div className="flex items-center justify-between mb-4">
<div className="text-sm text-gray-700">
<div className="flex items-center justify-between mb-3">
<div className="text-xs text-gray-700">
<span className="text-[#00897B] font-medium">{answeredCount}</span> / {questions.length}
</div>
<Button
type="primary"
onClick={() => setAnswerSheetOpen(false)}
className="bg-[#00897B] hover:bg-[#00796B]"
className="bg-[#00897B] hover:bg-[#00796B] text-xs h-7 px-3"
>
</Button>
</div>
<div className="grid grid-cols-5 sm:grid-cols-6 gap-3">
<div className="grid grid-cols-5 gap-2">
{questions.map((q, idx) => {
const isCurrent = idx === currentQuestionIndex;
const isAnswered = !!answers[q.id];
let className = 'h-10 w-10 rounded-full flex items-center justify-center text-sm font-medium border transition-colors ';
let className = 'h-9 w-9 rounded-full flex items-center justify-center text-xs font-medium border transition-colors ';
if (isCurrent) {
className += 'border-[#00897B] bg-[#E0F2F1] text-[#00695C]';
} else if (isAnswered) {