Version 0.1.1 rise to flask app factory
This commit is contained in:
81
Html/apps/templates/teacherboard.html
Normal file
81
Html/apps/templates/teacherboard.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>教师个人主页</title>
|
||||
<link rel="stylesheet" href="/static/css/teacherboard.css">
|
||||
<link rel="stylesheet" href="/static/css/dashboard.css">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% include 'navbar.html' %} <!-- 引入navbar.html -->
|
||||
|
||||
<!-- 主页主体部分 -->
|
||||
<div class="teacherboard">
|
||||
<h2 class="teacherboard-title">—— 我的课程 ——</h2>
|
||||
<div class="course-cards" id="course-cards">
|
||||
<!-- 每个课程的卡片 -->
|
||||
<div class="course-card" onclick="openCourseDetails('algorithm')">
|
||||
<img src="/static/image/algorithm/book_cover.png" alt="课程封面" class="course-image">
|
||||
<div class="course-info">
|
||||
<h3 class="course-name">算法分析与设计</h3>
|
||||
<p class="course-description">学习基本的算法知识概念,与算法实现。</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 继续添加其他课程卡片 -->
|
||||
<div class="course-card" onclick="openCourseDetails('data-structures')">
|
||||
<img src="/static/image/algorithm/book_cover.png" alt="课程封面" class="course-image">
|
||||
<div class="course-info">
|
||||
<h3 class="course-name">数据结构与算法</h3>
|
||||
<p class="course-description">深入学习数据结构和算法设计。</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 可以继续添加课程卡片 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧滑出的课程目录 -->
|
||||
<div id="courseDetails" class="course-details">
|
||||
<div class="details-header">
|
||||
<span id="course-title"></span>
|
||||
<button class="close-btn" onclick="closeCourseDetails()">×</button>
|
||||
</div>
|
||||
<div class="details-content">
|
||||
<h3>课程章节列表:</h3>
|
||||
<ul id="chapter-list">
|
||||
<!-- 章节列表会在点击课程时动态生成 -->
|
||||
</ul>
|
||||
<button class="add-chapter-btn" onclick="showInputForNewChapter()">新增章节</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 编辑章节或课时弹窗 -->
|
||||
<div id="editModal" class="edit-modal">
|
||||
<div class="edit-modal-content">
|
||||
<h3>编辑章节/课时</h3>
|
||||
<form id="edit-form">
|
||||
<label for="edit-title">标题:</label>
|
||||
<input type="text" id="edit-title" name="title" required><br>
|
||||
<label for="edit-description">描述:</label>
|
||||
<textarea id="edit-description" name="description"></textarea><br>
|
||||
<button type="submit">保存</button>
|
||||
<button type="button" onclick="closeEditModal()">取消</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/teacherboard.js"></script>
|
||||
<script>
|
||||
window.appData = {
|
||||
user_data: JSON.parse(`{{user_data}}`.replace(/"/g, "\"")),
|
||||
user_course_data: JSON.parse(`{{user_course_data}}`.replace(/"/g, "\""))
|
||||
}
|
||||
console.log(window.appData.user_data);
|
||||
console.log(window.appData.user_course_data);
|
||||
show_teacher_data(window.appData.user_data, window.appData.user_course_data);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user