Updating table of contents CSS, fixes #12
This commit is contained in:
parent
c727794550
commit
7893803c8a
|
@ -1,6 +1,5 @@
|
||||||
@import "@tryghost/shared-theme-assets/assets/css/v1/screen.css";
|
@import "@tryghost/shared-theme-assets/assets/css/v1/screen.css";
|
||||||
@import "fonts.css";
|
@import "fonts.css";
|
||||||
@import "tocbot.css";
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--font-sans: Wanted Sans, Century Gothic, Frutiger, Futura, Montserrat, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
|
--font-sans: Wanted Sans, Century Gothic, Frutiger, Futura, Montserrat, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
|
||||||
|
|
|
@ -1,65 +1,30 @@
|
||||||
/* Style from Tocbot */
|
/* Style from Tocbot */
|
||||||
.toc {
|
.toc {
|
||||||
overflow-y: auto
|
overflow-y: auto;
|
||||||
}
|
|
||||||
|
|
||||||
.toc>.toc-list {
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc>.toc-list li {
|
|
||||||
list-style: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-list {
|
|
||||||
margin: 0;
|
|
||||||
padding-left: 10px
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.toc-link {
|
a.toc-link {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
height: 100%
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-collapsible {
|
.is-collapsible {
|
||||||
max-height: 1000px;
|
max-height: 1000px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: all 300ms ease-in-out
|
transition: all 300ms ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-collapsed {
|
.is-collapsed {
|
||||||
max-height: 0
|
max-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-position-fixed {
|
.is-position-fixed {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
top: 0
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-active-link {
|
.is-active-li {
|
||||||
font-weight: 700
|
list-style: disc;
|
||||||
}
|
|
||||||
|
|
||||||
.toc-link::before {
|
|
||||||
background-color: #EEE;
|
|
||||||
content: ' ';
|
|
||||||
display: inline-block;
|
|
||||||
height: inherit;
|
|
||||||
left: 0;
|
|
||||||
margin-top: -1px;
|
|
||||||
position: absolute;
|
|
||||||
width: 2px
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
.toc-link::before {
|
|
||||||
background-color: #EEE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-active-link::before {
|
|
||||||
background-color: #54BC4B
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style from Ghost Foundation */
|
/* Style from Ghost Foundation */
|
||||||
|
@ -69,6 +34,7 @@ a.toc-link {
|
||||||
|
|
||||||
.gh-toc > .toc-list {
|
.gh-toc > .toc-list {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
padding-left: 15.3667px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-list {
|
.toc-list {
|
||||||
|
@ -96,10 +62,15 @@ a.toc-link {
|
||||||
|
|
||||||
a.toc-link {
|
a.toc-link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
color: var(--color-secondary-text);
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin: 0;
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gh-toc .is-active-link::before {
|
a.is-active-link {
|
||||||
background-color: var(--ghost-accent-color); /* Defines TOC accent color based on Accent color set in Ghost Admin */
|
color: var(--color-primary-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Additional style information from Jean interspersed */
|
/* Additional style information from Jean interspersed */
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<script src="{{asset "built/main.min.js"}}"></script>
|
<script src="{{asset "built/main.min.js"}}"></script>
|
||||||
|
|
||||||
{{! Tocbot is used for the table of contents }}
|
{{! Tocbot is used for the table of contents }}
|
||||||
<script src="{{asset "built/tocbot.min.js"}}"></script>
|
<script src="{{asset "js/lib/tocbot.min.js"}}"></script>
|
||||||
<script>
|
<script>
|
||||||
tocbot.init({
|
tocbot.init({
|
||||||
// Where to render the table of contents.
|
// Where to render the table of contents.
|
||||||
|
|
Loading…
Reference in New Issue