web-backset.cn/apps/web/src/view/CourseDetail/index.less
2023-03-28 14:59:56 +08:00

100 lines
1.9 KiB
Plaintext

.course-detail {
.table-of-content {
position: fixed;
top: 60px;
bottom: 0;
width: 300px;
padding: 20px;
overflow-y: auto;
border-right: 1px solid var(--color-border-2);
background: #fff;
z-index: 99;
> h3 {
margin: 0 0 10px 0;
}
.toc {
padding-top: 20px;
.level-1 {
color: var(--color-text-3);
line-height: 1.5;
padding-top: 24px;
font-size: 13px;
&:first-of-type {
padding-top: 0;
}
}
.level-2 {
margin: 6px 0;
padding: 6px 12px 6px 6px;
line-height: 1.5;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: var(--color-text-2);
cursor: pointer;
&:hover {
color: var(--color-text-1);
background: var(--color-fill-1);
border-radius: 6px;
}
&.active {
background: var(--color-fill-2);
border-radius: 6px;
color: var(--color-primary-1);
.xicon,
.time {
color: var(--color-primary-1);
}
}
.xicon {
color: var(--color-text-4);
margin-right: 6px;
}
.time {
color: var(--color-text-4);
font-size: 13px;
text-align: right;
}
}
}
}
.content {
position: fixed;
right: 0;
top: 60px;
bottom: 0;
overflow-y: auto;
}
}
.toggle {
cursor: pointer;
display: none;
justify-content: center;
align-items: center;
position: fixed;
left: 0;
top: 0;
z-index: 199;
width: 60px;
height: 60px;
background: #24292f;
color: #d7d7d7;
transition: all 0.25s ease-in-out;
&:hover {
color: var(--color-primary-2);
}
> svg {
height: 24px;
}
}
@media (max-width: 1120px) {
.toggle {
display: inline-flex;
}
}