fix index
This commit is contained in:
@@ -3,20 +3,41 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>课程选择主页</title>
|
||||
<link rel="stylesheet" href="/static/css/navbar.css">
|
||||
<link rel="stylesheet" href="/static/css/footer.css">
|
||||
<link rel="stylesheet" href="/static/css/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="navbar">
|
||||
<!-- 原有导航内容保留 -->
|
||||
{% include 'navbar.html' %}
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<!-- 原有主体内容保留 -->
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<main>
|
||||
<div class="course-selection">
|
||||
<h2>课程列表</h2>
|
||||
<div class="course-list">
|
||||
{% for course in courses_data %}
|
||||
<div class="course-card" onclick="show_course_details('{{ course._id }}')">
|
||||
<img src="{{ course.image_url }}" alt="{{ course.course_name }}">
|
||||
<h3>{{ course.name }}</h3>
|
||||
<p>{{ course.description }}</p>
|
||||
{% if course._id in selected_courses %}
|
||||
<button class="selected-button">已选择</button>
|
||||
{% else %}
|
||||
<button class="select-button" data-course-id="{{course._id}}">选择课程</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
{% include 'foot.html' %}
|
||||
</body>
|
||||
<script>
|
||||
window.appData = {
|
||||
user_selected_courses: JSON.parse(`{{selected_courses}}`.replace(/"/g, "\""))
|
||||
}
|
||||
</script>
|
||||
<script src="/static/js/index.js"></script>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<link rel="stylesheet" href="/static/css/navbar.css">
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome 图标 -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="/static/css/dashboard.css">
|
||||
<header class="navbar">
|
||||
<div class="logo">
|
||||
<h1>华实君:教学练评一体的虚拟助教</h1>
|
||||
<h1>华实学伴:教学练评一体的虚拟助教</h1>
|
||||
</div>
|
||||
{% if role == 'teacher' %}
|
||||
<!-- 如果是教师角色 -->
|
||||
|
||||
Reference in New Issue
Block a user