修改教师课程侧滑显示动画
This commit is contained in:
@@ -1 +1,24 @@
|
|||||||
{"user_id": "TCake", "select_course": [], "head_icon": "", "course_process_dict": {}}
|
{
|
||||||
|
"user_id": "TCake",
|
||||||
|
"select_course": [
|
||||||
|
"algorithm"
|
||||||
|
],
|
||||||
|
"head_icon": "",
|
||||||
|
"course_process_dict": {
|
||||||
|
"algorithm": {
|
||||||
|
"lesson_processs": [
|
||||||
|
[
|
||||||
|
[],
|
||||||
|
"binary_search"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
[],
|
||||||
|
"L002"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"course_put_in_date": "",
|
||||||
|
"course_last_study_date": "",
|
||||||
|
"course_total_study_time": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,16 +48,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 课程目录弹出框 */
|
/* 课程目录弹出框 */
|
||||||
|
|
||||||
.course-details {
|
.course-details {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: -400px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
|
box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: none;
|
transition: right 0.3s ease;
|
||||||
|
z-index: 9999;
|
||||||
|
border-radius: 15px; /* 添加圆角 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-details.open {
|
||||||
|
right: 0; /* 打开时显示 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-header {
|
.details-header {
|
||||||
|
|||||||
@@ -21,14 +21,15 @@ function openCourseDetails(courseId) {
|
|||||||
const courseDetails = document.getElementById('courseDetails');
|
const courseDetails = document.getElementById('courseDetails');
|
||||||
const courseTitle = document.getElementById('course-title');
|
const courseTitle = document.getElementById('course-title');
|
||||||
courseTitle.textContent = "课程名称: " + courseId; // 假设这里显示课程ID,实际情况应该是课程名称
|
courseTitle.textContent = "课程名称: " + courseId; // 假设这里显示课程ID,实际情况应该是课程名称
|
||||||
courseDetails.style.display = 'block';
|
|
||||||
|
courseDetails.classList.add('open');
|
||||||
|
|
||||||
// 获取章节数据并渲染
|
// 获取章节数据并渲染
|
||||||
renderChapters(courseId);
|
renderChapters(courseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeCourseDetails() {
|
function closeCourseDetails() {
|
||||||
document.getElementById('courseDetails').style.display = 'none';
|
document.getElementById('courseDetails').classList.remove('open');
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderChapters(courseId) {
|
function renderChapters(courseId) {
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>教师个人主页</title>
|
<title>教师个人主页</title>
|
||||||
<link rel="stylesheet" href="/static/css/teacherboard.css">
|
<link rel="stylesheet" href="/static/css/teacherboard.css">
|
||||||
|
<link rel="stylesheet" href="/static/css/dashboard.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user