|
|
@@ -4,7 +4,6 @@
|
|
|
<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
|
|
|
@@ -15,7 +14,16 @@
|
|
|
<slot />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="router-section"><router-view /></div>
|
|
|
+ <div class="router-section">
|
|
|
+ <default-header
|
|
|
+ style="height: 4.25rem;border-bottom: 2px solid rgba(84, 66, 251, 0.16);"
|
|
|
+ >
|
|
|
+ <div class="navbar-menu">
|
|
|
+ <div class="navbar-end nav-user"><user-dropdown /></div>
|
|
|
+ </div>
|
|
|
+ </default-header>
|
|
|
+ <div class="router-part"><router-view /></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -24,13 +32,19 @@
|
|
|
import { FETCH_CURRENT_COURSE } from "@/store/type/actions.type";
|
|
|
import { mapState } from "vuex";
|
|
|
|
|
|
+import DefaultHeader from "@/components/DefaultHeader";
|
|
|
+import UserDropdown from "@/components/UserDropdown";
|
|
|
+
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ DefaultHeader,
|
|
|
+ UserDropdown
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState({
|
|
|
course: state => state.course.currentCourse
|
|
|
})
|
|
|
},
|
|
|
- components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
isLoading: false
|
|
|
@@ -51,7 +65,8 @@ export default {
|
|
|
$menu-width: 300px;
|
|
|
$menu-padding: 24px;
|
|
|
$screen-width: 1450px;
|
|
|
-$left-padding: "(100% -" #{$screen-width} "-" #{$menu-padding} "* 2) / 2";
|
|
|
+//$left-padding: "(100% -" #{$screen-width} "-" #{$menu-padding} "* 2) / 2";
|
|
|
+$left-padding: 0;
|
|
|
$left-width: #{$left-padding} + #{$menu-width};
|
|
|
$left-padding-calc: calc(#{$left-padding});
|
|
|
$left-width-calc: calc(#{$left-width});
|
|
|
@@ -65,27 +80,31 @@ $top-section-height: 4.25rem;
|
|
|
}
|
|
|
|
|
|
.router-section {
|
|
|
- padding: 24px;
|
|
|
+ /*padding: 24px;*/
|
|
|
flex-grow: 1;
|
|
|
- max-width: 1000px;
|
|
|
+ /*max-width: 1000px;*/
|
|
|
}
|
|
|
.menu-section {
|
|
|
- min-width: $menu-width;
|
|
|
+ //min-width: $menu-width;
|
|
|
width: $left-width-calc;
|
|
|
- background: white;
|
|
|
- border-right: 1px solid #c9d8ea;
|
|
|
+ /*background: white;*/
|
|
|
+ /*border-right: 3px solid rgb(159, 148, 254);*/
|
|
|
padding-left: $left-padding-calc;
|
|
|
+ box-shadow: $default-shadow;
|
|
|
z-index: 99;
|
|
|
+ /*TODO: 寻找更好的图片或背景颜色*/
|
|
|
+ /*background-image: url("../../assets/sideBar.png");*/
|
|
|
+ background-image: linear-gradient(to top, #493a9e 0%, #4f54e9 100%);
|
|
|
+ background-size: cover;
|
|
|
+ position: sticky;
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: hidden;
|
|
|
+ height: 100vh;
|
|
|
+ top: 0;
|
|
|
.menu-sticky {
|
|
|
- background-image: url("../../assets/sideBar.png");
|
|
|
- background-size: cover;
|
|
|
- width: $menu-width;
|
|
|
- position: sticky;
|
|
|
- overflow-y: auto;
|
|
|
padding: 0 $menu-padding;
|
|
|
- top: 0;
|
|
|
- height: 100vh;
|
|
|
-
|
|
|
+ height: 100%;
|
|
|
+ width: $menu-width;
|
|
|
.header-logo {
|
|
|
font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
|
|
|
"Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
|
|
|
@@ -94,23 +113,24 @@ $top-section-height: 4.25rem;
|
|
|
font-size: 1.7em;
|
|
|
color: #ffffff;
|
|
|
padding-right: 20px;
|
|
|
+ height: 4.25rem;
|
|
|
line-height: $top-section-height;
|
|
|
- padding-bottom: 40px;
|
|
|
+ margin: 0 -24px;
|
|
|
+ /* background: black; */
|
|
|
+ background-image: linear-gradient(to left, #5a4baf 0%, #161aa7 100%);
|
|
|
+ padding-left: 24px;
|
|
|
a {
|
|
|
color: #3d70b2;
|
|
|
}
|
|
|
}
|
|
|
.course-detail {
|
|
|
- margin-top: 20px;
|
|
|
position: relative;
|
|
|
padding: 15px;
|
|
|
- color: #ffffff;
|
|
|
font-weight: bold;
|
|
|
- background: rgba(255, 255, 255, 0.24);
|
|
|
- border: 1px solid #ffffff;
|
|
|
+ background: white;
|
|
|
border-radius: 3px;
|
|
|
- box-shadow: 0 1px 2px rgba(201, 216, 234, 0.5);
|
|
|
- margin-bottom: 1em;
|
|
|
+ box-shadow: 0 1px 2px #4a4a4a;
|
|
|
+ margin: $default-margin-between 0;
|
|
|
min-height: 54px;
|
|
|
}
|
|
|
|
|
|
@@ -127,4 +147,11 @@ $top-section-height: 4.25rem;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.nav-user {
|
|
|
+ margin-right: $default-margin;
|
|
|
+}
|
|
|
+
|
|
|
+.router-part {
|
|
|
+ padding: $default-margin-between;
|
|
|
+}
|
|
|
</style>
|