website/assets/scss/learn-page.scss
TheYoungManLi 38cfd94dac fix: Update lesson menu styles on the lesson page
Signed-off-by: TheYoungManLi <cjl@kubesphere.io>
2021-12-31 15:12:32 +08:00

347 lines
7.7 KiB
SCSS

@import "variables";
@mixin tooltip {
.tooltip {
visibility: hidden;
width: 80px;
padding: 8px 12px;
background: #242E42;
box-shadow: 0px 4px 8px rgba(36, 46, 66, 0.2);
border-radius: 4px;
transform: translateX(-50%);
box-sizing: border-box;
/* 定位 */
position: absolute;
z-index: 1;
font-family: PingFang SC;
font-style: normal;
font-size: 12px;
line-height: 20px;
color: #fff;
text-align: center;
&::after {
content: " ";
position: absolute;
top: 100%;
/* 提示工具底部 */
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #242E42 transparent transparent;
}
}
}
.navigation {
box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06), 0 8px 16px 0 rgba(36, 46, 66, 0.05);
background-image: linear-gradient(to bottom, rgba(134, 219, 162, 0.9), rgba(0, 170, 114, 0.9));
}
.section-1 {
padding-top: 98px;
@media only screen and (max-width: $mobile-max-width) {
padding-top: 128px;
}
span {
font-size: 16px;
line-height: 1.5;
letter-spacing: -0.04px;
color: #3d3e49;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
a {
color: #3d3e49;
&:hover {
color: #00aa72;
}
}
&:last-child {
opacity: 0.6;
}
}
}
.section-2 {
margin-top: 4px;
.common-layout {
display: flex;
align-items: flex-start;
.left {
position: relative;
box-sizing: border-box;
width: 781px;
padding: 20px;
background-color: #ffffff;
iframe {
width: 100%;
height: 800px;
}
& > video {
width: 100%;
margin-bottom: 10px;
outline: none;
}
.date {
display: flex;
align-items: center;
font-size: 14px;
line-height: 1.43;
color: #919aa3;
.time {
display: inline-block;
margin-right: 4px;
width: 14px;
height: 14px;
background-image: url("/images/learn/time.svg");
}
}
.pdf-div {
margin-top: 10px;
}
@media only screen and (max-width: $mobile-max-width) {
width: 100%;
padding: 10px;
iframe {
height: 600px;
}
}
}
.right {
box-sizing: border-box;
width: 368px;
padding: 24px 20px 0 20px;
min-height: 488px;
max-height: 600px;
margin-left: 15px;
overflow: auto;
background-color: #ffffff;
@media only screen and (max-width: $mobile-max-width) {
display: none;
}
.sections {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 12px;
.sectionFolder {
box-sizing: border-box;
width: 328px;
display: flex;
align-items: center;
flex-direction: row;
padding: 9px 16px;
background: #F9FBFD;
border-radius: 4px;
position: relative;
&:hover {
cursor: pointer;
background: #EFF4F9;
}
.text {
font-weight: 500;
font-size: 16px;
line-height: 22px;
width: 264px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.icon {
display: block;
height: 10px;
width: 10px;
background-image: url('/images/learn/icon-setion-close.svg');
background-repeat: no-repeat;
position: absolute;
right: 17px;
}
}
.active {
background: linear-gradient(180deg, #242E42 0%, #36435C 100%) !important;
color: #ffffff;
&>.icon {
background-image: url('/images/learn/icon-setion-open.svg');
}
}
ul {
transition: 1.2s;
li {
width: 320px;
height: 24px;
margin: 16px 0px;
list-style: none;
display: flex;
align-items: center;
position: relative;
cursor: pointer;
.textLink {
width: 252px;
display: flex;
align-items: center;
.videoIcon {
display: block;
width: 12px;
height: 12px;
margin-right: 8px;
background-image: url('/images/learn/lesson-video.svg');
}
.text {
flex: 1;
font-family: PingFang SC;
font-style: normal;
font-weight: normal;
font-size: 14px;
line-height: 24px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.actions {
width: 68px;
height: 24px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
.picture {
width: 16px;
height: 12px;
background-image: url('/images/learn/actions-picture.svg');
background-repeat: no-repeat;
position: relative;
@include tooltip();
&:hover {
background-image: url('/images/learn/actions-picture-active.svg');
.tooltip {
visibility: visible;
bottom: 20px;
left: 8px;
}
}
}
.activePicture {
background-image: url('/images/learn/actions-picture-open.svg') !important;
}
.ppt {
width: 16px;
height: 16px;
background-image: url('/images/learn/actions-ppt.svg');
background-repeat: no-repeat;
position: relative;
margin: 0 10px;
@include tooltip();
&:hover {
.tooltip {
visibility: visible;
bottom: 20px;
left: 8px;
}
}
}
.download {
width: 16px;
height: 16px;
background-image: url('/images/learn/actions-download.svg');
background-repeat: no-repeat;
position: relative;
@include tooltip();
&:hover {
.tooltip {
visibility: visible;
bottom: 20px;
left: 8px;
}
}
}
}
&:hover {
.textLink {
.videoIcon {
background-image: url('/images/learn/lesson-video-hover.svg');
}
}
.text {
color: #4CA986;
}
}
}
.pptActive{
.text {
color: #4CA986;
}
}
.activeLine {
.textLink {
.videoIcon {
background-image: url('/images/learn/lesson-video-play.svg') !important;
}
.text {
color: #4CA986;
}
}
}
}
.hideLesson {
display: none;
}
}
}
}
}
@keyframes playing {
0% {
height: 100%;
}
50% {
height: 50%;
}
100% {
height: 100%;
}
}