Files
hsa/Html/apps/templates/lesson.html
2025-08-31 17:16:28 +08:00

78 lines
2.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="/static/css/lesson.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<body >
{% include 'navbar.html' %} <!-- 引入navbar.html -->
<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" id="details-content">
<p>...</p> <!-- 加载覆盖 -->
</div>
<h3>课程章节列表:</h3>
<ul id="chapter-list">
<div id="loading-message"><p>加载中...</p></div>
</ul>
<button class="add-chapter-btn" onclick="showInputForNewChapter()">新增章节</button>
</div>
<!-- 课时编辑页主体:左侧大纲 + 右侧编辑 -->
<div class="lesson-editor">
<aside class="outline">
<ul id="outline-tree"></ul>
</aside>
<main class="editor-pane">
<div class="editor-tabs">
<button class="tab-btn active" data-target="tab-lesson">Lesson</button>
<button class="tab-btn" data-target="tab-prompt">Prompt</button>
<button class="tab-btn" data-target="tab-score">Score Prompt</button>
<div class="actions">
<button id="save-all-btn">保存全部</button>
</div>
</div>
<div class="tab-content">
<div id="tab-lesson" class="tab active">
<textarea id="editor-lesson"></textarea>
</div>
<div id="tab-prompt" class="tab">
<textarea id="editor-prompt"></textarea>
</div>
<div id="tab-score" class="tab">
<textarea id="editor-score"></textarea>
</div>
</div>
</main>
</div>
<script src="/static/js/teacherboard.js"></script>
<script src="/static/js/lesson.js"></script>
<script>
window.lesson = {{ lesson|tojson|safe }};
window.chapter = {{ chapter|tojson|safe }};
window.material = {{ material|tojson|safe }};
console.log(window.lesson);
console.log(window.chapter);
console.log(window.material);
openCourseDetails(window.material.material_id);
</script>
</body>
</html>