|
|
@@ -1,22 +1,30 @@
|
|
|
<template>
|
|
|
- <div class="course-layout">
|
|
|
- <div class="menu-section">
|
|
|
- <div class="menu-sticky">
|
|
|
- <div class="header-logo">MOOC</div>
|
|
|
- <div class="course-detail">
|
|
|
- {{ course.name }}
|
|
|
- <b-loading :is-full-page="false" :active.sync="isLoading"></b-loading>
|
|
|
+ <div class="course">
|
|
|
+ <HomeHeader></HomeHeader>
|
|
|
+ <div class="course-layout">
|
|
|
+ <div class="menu-section">
|
|
|
+ <div class="menu-sticky">
|
|
|
+ <div class="header-logo">MOOC</div>
|
|
|
+ <div class="subtitle">当前课程</div>
|
|
|
+ <div class="course-detail">
|
|
|
+ {{ course.name }}
|
|
|
+ <b-loading
|
|
|
+ :is-full-page="false"
|
|
|
+ :active.sync="isLoading"
|
|
|
+ ></b-loading>
|
|
|
+ </div>
|
|
|
+ <slot />
|
|
|
</div>
|
|
|
- <slot />
|
|
|
</div>
|
|
|
+ <div class="router-section"><router-view /></div>
|
|
|
</div>
|
|
|
- <div class="router-section"><router-view /></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { FETCH_CURRENT_COURSE } from "@/store/type/actions.type";
|
|
|
import { mapState } from "vuex";
|
|
|
+import HomeHeader from "@/layouts/HomeLayout/HomeHeader";
|
|
|
|
|
|
export default {
|
|
|
computed: {
|
|
|
@@ -24,6 +32,9 @@ export default {
|
|
|
course: state => state.course.currentCourse
|
|
|
})
|
|
|
},
|
|
|
+ components: {
|
|
|
+ HomeHeader
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
isLoading: false
|
|
|
@@ -54,7 +65,9 @@ $top-section-height: 4.25rem;
|
|
|
display: flex;
|
|
|
min-height: 100vh;
|
|
|
justify-content: stretch;
|
|
|
- position: relative;
|
|
|
+ position: fixed;
|
|
|
+ top: 0px;
|
|
|
+ z-index: 99;
|
|
|
}
|
|
|
|
|
|
.router-section {
|
|
|
@@ -68,7 +81,10 @@ $top-section-height: 4.25rem;
|
|
|
background: white;
|
|
|
border-right: 1px solid #c9d8ea;
|
|
|
padding-left: $left-padding-calc;
|
|
|
+ z-index: 99;
|
|
|
.menu-sticky {
|
|
|
+ background-image: url("../../assets/sideBar.png");
|
|
|
+ background-size: cover;
|
|
|
width: $menu-width;
|
|
|
position: sticky;
|
|
|
overflow-y: auto;
|
|
|
@@ -82,23 +98,39 @@ $top-section-height: 4.25rem;
|
|
|
Helvetica, Arial, sans-serif;
|
|
|
font-weight: bold;
|
|
|
font-size: 1.7em;
|
|
|
- color: #3d70b2;
|
|
|
+ color: #ffffff;
|
|
|
padding-right: 20px;
|
|
|
line-height: $top-section-height;
|
|
|
+ padding-bottom: 40px;
|
|
|
a {
|
|
|
color: #3d70b2;
|
|
|
}
|
|
|
}
|
|
|
.course-detail {
|
|
|
+ margin-top: 20px;
|
|
|
position: relative;
|
|
|
padding: 15px;
|
|
|
- background: #f4f7fb;
|
|
|
- border: 1px solid #c9d8ea;
|
|
|
+ color: #ffffff;
|
|
|
+ font-weight: bold;
|
|
|
+ background: rgba(255, 255, 255, 0.24);
|
|
|
+ border: 1px solid #ffffff;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: 0 1px 2px rgba(201, 216, 234, 0.5);
|
|
|
margin-bottom: 1em;
|
|
|
min-height: 54px;
|
|
|
}
|
|
|
+
|
|
|
+ .subtitle {
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 1rem;
|
|
|
+ font-weight: bold;
|
|
|
+ padding-bottom: 5px;
|
|
|
+ border-bottom: 1px solid #ffffff;
|
|
|
+ }
|
|
|
+ .link {
|
|
|
+ color: #ffffff;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|