|
|
@@ -1,16 +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">
|
|
|
+ <div class="course-layout">
|
|
|
+ <div class="menu-section">
|
|
|
+ <div class="menu-sticky">
|
|
|
+ <div class="header-logo">SEEC</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">
|
|
|
+ <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 class="router-section"><router-view /></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -18,7 +32,14 @@
|
|
|
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
|
|
|
@@ -44,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});
|
|
|
@@ -58,33 +80,53 @@ $top-section-height: 4.25rem;
|
|
|
}
|
|
|
|
|
|
.router-section {
|
|
|
- padding: 24px;
|
|
|
+ /*padding: 24px;*/
|
|
|
flex-grow: 1;
|
|
|
- max-width: 1000px;
|
|
|
+ flex: 1;
|
|
|
+ /*max-width: 1000px;*/
|
|
|
}
|
|
|
.menu-section {
|
|
|
- min-width: $menu-width;
|
|
|
- width: $left-width-calc;
|
|
|
- background: white;
|
|
|
- border-right: 1px solid #c9d8ea;
|
|
|
+ //min-width: $menu-width;
|
|
|
+ //width: $left-width-calc;
|
|
|
+ width: 300px;
|
|
|
+ /*background: white;*/
|
|
|
+ /*border-right: 3px solid rgb(159, 148, 254);*/
|
|
|
padding-left: $left-padding-calc;
|
|
|
+ box-shadow: $default-shadow;
|
|
|
+ z-index: 31;
|
|
|
+ /*TODO: 寻找更好的图片或背景颜色*/
|
|
|
+ /*background-image: url("../../assets/sideBar.png");*/
|
|
|
+ /*background-image: linear-gradient(to top, #493a9e 0%, #4f54e9 100%);*/
|
|
|
+ /*background: linear-gradient(to top, #7c71bd 0%, #4f62e9 100%);*/
|
|
|
+ background: linear-gradient(to top, #7c71bdc7 0%, #6172ec 100%);
|
|
|
+ background-size: cover;
|
|
|
+ position: sticky;
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: hidden;
|
|
|
+ height: 100vh;
|
|
|
+ top: 0;
|
|
|
.menu-sticky {
|
|
|
- width: $menu-width;
|
|
|
- position: sticky;
|
|
|
- overflow-y: auto;
|
|
|
padding: 0 $menu-padding;
|
|
|
- top: 0;
|
|
|
- height: 100vh;
|
|
|
-
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ /*min-width: 300px;*/
|
|
|
+ //width: $menu-width;
|
|
|
.header-logo {
|
|
|
font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
|
|
|
"Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
|
|
|
Helvetica, Arial, sans-serif;
|
|
|
font-weight: bold;
|
|
|
font-size: 1.7em;
|
|
|
- color: #3d70b2;
|
|
|
+ color: #ffffff;
|
|
|
padding-right: 20px;
|
|
|
+ height: 4.25rem;
|
|
|
line-height: $top-section-height;
|
|
|
+ margin: 0 -24px;
|
|
|
+ /* background: black; */
|
|
|
+ background-color: transparent;
|
|
|
+ border-bottom: 2px solid rgba(255, 255, 255, 0.16);
|
|
|
+ /*background-image: linear-gradient(to left, #4f62e9 0%, #161aa7 100%);*/
|
|
|
+ padding-left: 24px;
|
|
|
a {
|
|
|
color: #3d70b2;
|
|
|
}
|
|
|
@@ -92,13 +134,24 @@ $top-section-height: 4.25rem;
|
|
|
.course-detail {
|
|
|
position: relative;
|
|
|
padding: 15px;
|
|
|
- background: #f4f7fb;
|
|
|
- border: 1px solid #c9d8ea;
|
|
|
+ font-weight: bold;
|
|
|
+ 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;
|
|
|
}
|
|
|
+ .link {
|
|
|
+ color: #ffffff;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+.nav-user {
|
|
|
+ margin-right: $default-margin;
|
|
|
+}
|
|
|
+
|
|
|
+.router-part {
|
|
|
+ padding: $default-margin-between;
|
|
|
+}
|
|
|
</style>
|