mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
refactor: add post-title to ToC
This commit is contained in:
parent
9a4b63d22b
commit
95c820e4cd
|
@ -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
Block a user