add table of contents button

This commit is contained in:
Ruben 2024-10-01 00:52:27 -05:00
commit dd8c404cae
No known key found for this signature in database
4 changed files with 145 additions and 3 deletions

View file

@ -189,7 +189,7 @@ body {
text-decoration: underline !important;
}
.nav-systray {
background-color: var(--crust);
background-color: var(--base);
color: var(--text);
margin-left: auto !important;
margin-right: .5em !important;
@ -206,6 +206,78 @@ body {
}
}
/* table of contents button */
.toc {
display: flex;
flex-direction: row;
position: fixed;
top: 2.5rem;
z-index: 10;
max-width: 10rem;
min-height: 1.8em !important;
max-height: 1.8em !important;
margin-top: .5em;
float: left;
font-family: "Lexend Deca";
align-content: center;
vertical-align: middle;
color: var(--text);
.toc-button {
padding: 0px .4em !important;
border-radius: 8px;
border: .1rem solid var(--green);
box-shadow: rgba(0, 0, 0, 0.35) 0px 3px 15px;
max-width: fit-content;
align-content: center;
background-color: var(--base);
text-decoration: unset !important;
color: var(--green);
margin-left: .5em !important;
}
.toc-content {
display: none;
position: absolute;
margin: 2.2em 0px 0px .4em !important;
background-color: var(--base);
min-width: 10em;
width: 30rem;
border-radius: 8px;
box-shadow: rgba(0, 0, 0, 0.35) 0px 3px 15px;
z-index: 1;
ul li a {
display: inline-flex;
align-items: center;
color: var(--text);
padding: .2em .5em;
text-decoration: none;
}
ul li a:hover {
color: var(--green);
text-decoration: underline;
}
ul li {
margin-left: -.5em;
padding-bottom: unset !important;
}
i {
padding-right: .4em;
}
}
.show-dropdown {
display: block !important;
}
}
/* text formatting and config stuff
font-family and <p> is set under .terminal */
@ -322,8 +394,16 @@ details.styled[open] {
/* padding above first terminal */
.terminal:nth-child(2) {
margin-top: 3.8em;
body:has(div.toc) {
.terminal:nth-child(3) {
margin-top: 4.8em;
}
}
body:not(:has(div.toc)) {
.terminal:nth-child(2) {
margin-top: 3.8em;
}
}
/* footer/credits */