- 增加题库管理功能,可以导入管理、切换使用多个题库 - 更新题目页面,添加答题进度条和题目类型标识 - 实现题目答案的动态验证,确保用户输入有效 - 优化移动端导航菜单,增加分组和标题,提升可用性 - 更新统计页面,显示当前题库信息和题目总数 - 改进样式,增强视觉效果和响应式设计 这些改进旨在提升用户在答题过程中的体验和操作便捷性。
208 lines
5.7 KiB
HTML
208 lines
5.7 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block title %}设置 - ExamMaster{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="settings-container">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h2><i class="fas fa-cog"></i> 用户设置</h2>
|
|
<p class="text-muted">配置您的学习偏好</p>
|
|
</div>
|
|
|
|
<form method="post" class="settings-form">
|
|
<div class="setting-section">
|
|
<h3><i class="fas fa-forward"></i> 答题行为</h3>
|
|
<div class="setting-item">
|
|
<div class="setting-info">
|
|
<label class="setting-label" for="auto_jump_next">
|
|
<strong>答对后自动跳转下一题</strong>
|
|
</label>
|
|
<p class="setting-description">
|
|
开启后,答对题目会自动跳转到下一道随机题目,无需手动点击。
|
|
答错时仍需手动选择下一步操作。
|
|
</p>
|
|
</div>
|
|
<div class="setting-control">
|
|
<div class="toggle-switch">
|
|
<input type="checkbox"
|
|
id="auto_jump_next"
|
|
name="auto_jump_next"
|
|
class="toggle-input"
|
|
{% if auto_jump_next %}checked{% endif %}>
|
|
<label for="auto_jump_next" class="toggle-label">
|
|
<span class="toggle-slider"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting-section">
|
|
<h3><i class="fas fa-database"></i> 题库管理</h3>
|
|
<div class="setting-item">
|
|
<div class="setting-info">
|
|
<p class="setting-description">
|
|
管理系统中的题目数据,支持导入、导出、编辑等操作。
|
|
</p>
|
|
</div>
|
|
<div class="setting-control">
|
|
<a href="{{ url_for('question_bank_management') }}" class="btn btn-outline-primary">
|
|
<i class="fas fa-edit"></i> 题库管理
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-success">
|
|
<i class="fas fa-save"></i> 保存设置
|
|
</button>
|
|
<a href="{{ url_for('index') }}" class="btn btn-outline-secondary">
|
|
<i class="fas fa-arrow-left"></i> 返回首页
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.settings-container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.card-header {
|
|
padding: 1.5rem;
|
|
border-bottom: 1px solid #dee2e6;
|
|
}
|
|
|
|
.card-header h2 {
|
|
margin: 0 0 0.5rem 0;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.settings-form {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.setting-section {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.setting-section h3 {
|
|
font-size: 1.25rem;
|
|
margin-bottom: 1rem;
|
|
color: var(--gray-800);
|
|
border-bottom: 2px solid var(--primary-color);
|
|
padding-bottom: 0.5rem;
|
|
}
|
|
|
|
.setting-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
padding: 1rem;
|
|
background: #f8f9fa;
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.setting-info {
|
|
flex: 1;
|
|
margin-right: 2rem;
|
|
}
|
|
|
|
.setting-label {
|
|
font-size: 1.1rem;
|
|
margin-bottom: 0.5rem;
|
|
display: block;
|
|
color: var(--gray-800);
|
|
}
|
|
|
|
.setting-description {
|
|
color: var(--gray-600);
|
|
margin: 0;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.setting-control {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* Toggle Switch Styles */
|
|
.toggle-switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.toggle-input {
|
|
display: none;
|
|
}
|
|
|
|
.toggle-label {
|
|
display: block;
|
|
width: 60px;
|
|
height: 32px;
|
|
background-color: #ccc;
|
|
border-radius: 16px;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s;
|
|
position: relative;
|
|
}
|
|
|
|
.toggle-slider {
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
width: 28px;
|
|
height: 28px;
|
|
background-color: white;
|
|
border-radius: 50%;
|
|
transition: transform 0.3s;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.toggle-input:checked + .toggle-label {
|
|
background-color: var(--success-color);
|
|
}
|
|
|
|
.toggle-input:checked + .toggle-label .toggle-slider {
|
|
transform: translateX(28px);
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: flex-start;
|
|
padding-top: 1.5rem;
|
|
border-top: 1px solid #dee2e6;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.setting-item {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.setting-info {
|
|
margin-right: 0;
|
|
}
|
|
|
|
.setting-control {
|
|
align-self: flex-start;
|
|
}
|
|
|
|
.form-actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.form-actions .btn {
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %} |