From 1a9c9ea067c5ea5093473f9c4613e44490774313 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Thu, 28 Aug 2025 08:58:19 +0800 Subject: [PATCH] 'commit' --- dsLightRag/static/YunXiao/physics_quiz.html | 984 ++++++++++++++++---- dsLightRag/static/YunXiao/physics_quiz.js | 325 ------- 2 files changed, 792 insertions(+), 517 deletions(-) delete mode 100644 dsLightRag/static/YunXiao/physics_quiz.js diff --git a/dsLightRag/static/YunXiao/physics_quiz.html b/dsLightRag/static/YunXiao/physics_quiz.html index 823e2b4b..62f8525a 100644 --- a/dsLightRag/static/YunXiao/physics_quiz.html +++ b/dsLightRag/static/YunXiao/physics_quiz.html @@ -13,37 +13,32 @@ } body { - background-color: #f0f2f5; + background-color: #f5f7fa; color: #333; line-height: 1.6; + padding: 20px; } .container { - max-width: 1200px; + max-width: 1000px; margin: 0 auto; - padding: 20px; + background-color: white; + border-radius: 12px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); + padding: 30px; } header { text-align: center; margin-bottom: 30px; - padding: 20px 0; - background-color: #1a5276; - color: white; - border-radius: 10px; - box-shadow: 0 4px 12px rgba(0,0,0,0.1); + padding-bottom: 20px; + border-bottom: 1px solid #eee; } h1 { - font-size: 2.2rem; + color: #2c3e50; margin-bottom: 10px; - font-weight: 700; - } - - .quiz-info { - font-size: 1.1rem; - margin-bottom: 20px; - color: #ecf0f1; + font-size: 28px; } .difficulty-indicator { @@ -69,24 +64,30 @@ color: #c62828; } + .quiz-info { + color: #666; + font-size: 16px; + margin-bottom: 20px; + } + .question-section { - background-color: white; - border-radius: 12px; - padding: 30px; - box-shadow: 0 4px 20px rgba(0,0,0,0.08); margin-bottom: 30px; } .question { - margin-bottom: 30px; - padding-bottom: 20px; - border-bottom: 1px solid #eee; + background-color: #f9f9f9; + border-radius: 8px; + padding: 20px; + margin-bottom: 20px; + transition: all 0.3s ease; } - .question:last-child { - border-bottom: none; - margin-bottom: 0; - padding-bottom: 0; + .question.hidden { + display: none; + } + + .question:hover { + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); } .question-header { @@ -98,28 +99,29 @@ .question-number { font-weight: bold; - font-size: 1.1rem; - color: #1a5276; + color: #2980b9; + font-size: 18px; } .question-points { - background-color: #3498db; - color: white; - padding: 4px 10px; + background-color: #e3f2fd; + color: #2980b9; + padding: 3px 10px; border-radius: 12px; - font-size: 0.9rem; + font-size: 14px; } .question-text { - margin-bottom: 20px; - font-size: 1.1rem; + margin-bottom: 15px; + font-size: 16px; line-height: 1.7; } .options { display: grid; grid-template-columns: 1fr 1fr; - gap: 15px; + gap: 12px; + margin-bottom: 15px; } @media (max-width: 768px) { @@ -129,117 +131,37 @@ } .option { - background-color: #f8f9fa; + background-color: white; border: 1px solid #ddd; - border-radius: 8px; - padding: 15px; + border-radius: 6px; + padding: 12px 15px; cursor: pointer; - transition: all 0.3s ease; + transition: all 0.2s ease; + display: flex; + align-items: center; } .option:hover { - background-color: #e3f2fd; - border-color: #90caf9; + border-color: #2980b9; + background-color: #f0f7ff; } .option input { margin-right: 10px; } - .btn-section { - text-align: center; - margin-top: 40px; - } - - .submit-btn { - background-color: #27ae60; - color: white; - border: none; - padding: 12px 30px; - border-radius: 8px; - font-size: 1rem; + .option label { cursor: pointer; - transition: background-color 0.3s ease; + flex: 1; } - .submit-btn:hover { - background-color: #219653; - } - - .result-section { - background-color: white; - border-radius: 12px; - padding: 30px; - box-shadow: 0 4px 20px rgba(0,0,0,0.08); - margin-top: 30px; - display: none; - } - - .result-header { - text-align: center; - margin-bottom: 20px; - color: #1a5276; - } - - .result-stats { - display: flex; - justify-content: space-around; - margin-bottom: 30px; - flex-wrap: wrap; - } - - .stat-item { - text-align: center; - padding: 15px; - } - - .stat-value { - font-size: 2rem; - font-weight: bold; - color: #2c3e50; - } - - /* 添加学伴答疑按钮隐藏样式 */ - .ask-xueban-btn { - display: none; - margin-top: 15px; - padding: 8px 16px; - background-color: #3498db; - color: white; - border: none; - border-radius: 4px; - cursor: pointer; - } - - .ask-xueban-btn.show { - display: inline-block; - } - .stat-label { - color: #7f8c8d; - font-size: 0.9rem; - } - - .explanation { + .question-explanation { margin-top: 15px; padding: 15px; - background-color: #f8f9fa; - border-left: 4px solid #3498db; - border-radius: 4px; - display: none; - } - - .explanation.show { - display: block; - } - - .correct { background-color: #e8f5e9; - border-color: #81c784; - } - - .incorrect { - background-color: #ffebee; - border-color: #e57373; + border-left: 4px solid #4caf50; + border-radius: 4px; + display: none; } .navigation-section { @@ -251,29 +173,62 @@ display: none; } - .next-btn { - background-color: #3498db; - color: white; - border: none; - padding: 10px 25px; - border-radius: 8px; - font-size: 0.9rem; - cursor: pointer; - transition: background-color 0.3s ease; - margin-top: 15px; + .submit-section { + text-align: center; + margin-top: 40px; } - .next-btn:hover { + #submit-btn { background-color: #2980b9; + color: white; + border: none; + padding: 12px 30px; + border-radius: 6px; + cursor: pointer; + font-size: 16px; + transition: all 0.2s ease; } - /* 在现有样式中添加 */ - .ask-xueban-btn.hidden { - display: none; - } - .explanation.show + .ask-xueban-btn { - margin-top: 15px; - } - + + #submit-btn:hover { + background-color: #1e6fa5; + transform: translateY(-2px); + } + + #result { + margin-top: 30px; + padding: 20px; + border-radius: 8px; + display: none; + } + + .result-header { + font-size: 22px; + font-weight: bold; + margin-bottom: 15px; + color: #2c3e50; + } + + .score { + font-size: 18px; + margin-bottom: 20px; + color: #333; + } + + .correct-answers { + background-color: #e8f5e9; + color: #2e7d32; + padding: 10px 15px; + border-radius: 6px; + margin-bottom: 10px; + } + + .incorrect-answers { + background-color: #ffebee; + color: #c62828; + padding: 10px 15px; + border-radius: 6px; + } +