refactor: add post-title to ToC
This commit is contained in:
parent
970d27c330
commit
9ea3be7d21
|
@ -70,12 +70,24 @@ $tocBreakpoint: 1024px;
|
|||
padding-top: 3rem;
|
||||
}
|
||||
|
||||
#TableOfContents {
|
||||
.toc-container {
|
||||
position: sticky;
|
||||
align-self: start;
|
||||
top: 3rem;
|
||||
max-width: 350px;
|
||||
|
||||
@media screen and (max-width: $tocBreakpoint) {
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.toc-post-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
#TableOfContents {
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
|
@ -90,12 +102,6 @@ $tocBreakpoint: 1024px;
|
|||
a.active {
|
||||
color: rgb(51, 51, 51);
|
||||
}
|
||||
|
||||
@media screen and (max-width: $tocBreakpoint) {
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tags__list {
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
</div>
|
||||
</div>
|
||||
{{ if or .Params.toc .Site.Params.toc }}
|
||||
<div class="toc-container">
|
||||
<div class="toc-post-title">{{.Title}}</div>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue