hexo-theme-async
Version:
🎈 A simple, lightweight Hexo theme
96 lines (83 loc) • 1.6 kB
text/less
.trm-post-toc {
position: fixed;
right: calc(30px + 3rem);
bottom: 26px;
z-index: 50;
padding-bottom: 10px;
border-radius: var(--card-border-radius, 10px);
box-shadow: var(--top-bar-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.15));
background-color: var(--theme-bg-color, #fcfcfe);
max-height: 60vh;
max-width: 100vw;
overflow: hidden;
transform: scale(0.9) translateY(20px);
opacity: 0;
display: flex;
flex-direction: column;
pointer-events: none;
user-select: none;
transition:
transform 0.3s,
opacity 0.3s;
&.active {
opacity: 1;
transform: scale(1) translateY(0px);
pointer-events: all;
}
&-header {
padding: 6px 10px;
box-shadow: var(--box-shadow);
font-weight: bold;
display: flex;
justify-content: space-between;
font-weight: bold;
font-size: 0.9rem;
#post-toc-top {
cursor: pointer;
}
}
&.fixed {
.trm-post-toc-header {
cursor: move;
}
}
&-content {
padding: 0 10px;
flex: 1;
overflow-y: auto;
&::-webkit-scrollbar-track {
background-color: transparent;
}
ol {
margin: 0 0 0 1em;
padding: 0;
list-style: none;
ol {
font-size: 0.9em;
opacity: 0.9;
}
}
.trm-toc {
text-align: left;
margin: 0;
width: fit-content;
max-width: 14rem;
padding: 0 0.5em;
.trm-toc-link {
display: block;
line-height: 1.8;
font-weight: bold;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.trm-toc-level-1 {
list-style: none;
}
}
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
}