2019-03-08 21:06:56 -05:00
|
|
|
@import "common/foundation/variables";
|
|
|
|
|
|
|
|
.d-toc-regular {
|
|
|
|
.cooked {
|
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
|
|
|
&:before {
|
|
|
|
display: block;
|
|
|
|
content: "";
|
|
|
|
height: 70px;
|
|
|
|
margin-top: -70px;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-03-08 21:08:44 -05:00
|
|
|
[data-theme-toc] {
|
2019-03-08 21:09:32 -05:00
|
|
|
display: none;
|
2019-03-08 21:08:44 -05:00
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-ignore {
|
|
|
|
font-size: $font-up-1;
|
|
|
|
margin: 0 0 10px 0;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
.highlighted {
|
|
|
|
animation: fadein 1s;
|
|
|
|
}
|
|
|
|
.d-toc {
|
|
|
|
transform: translate3d(0, 0, 0);
|
|
|
|
transition: opacity 0.25s;
|
|
|
|
ul,
|
|
|
|
li {
|
|
|
|
list-style: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
border: none;
|
|
|
|
line-height: 30px;
|
|
|
|
}
|
|
|
|
.d-toc-item {
|
|
|
|
a {
|
|
|
|
color: $primary-high;
|
|
|
|
}
|
|
|
|
&.d-toc-active {
|
|
|
|
position: relative;
|
|
|
|
&:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
border-left: 1px solid $tertiary;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
border-right: 1px solid $tertiary;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
height: 100%;
|
|
|
|
content: "";
|
|
|
|
width: 1px;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
a {
|
|
|
|
color: $primary;
|
2019-03-08 21:08:44 -05:00
|
|
|
text-shadow: 0.1px 0.1px $primary, -0.1px -0.1px $primary;
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.d-toc-heading {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
padding-left: 10px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
padding-right: 10px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-active:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
left: -10px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
right: -10px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.d-toc-subheading {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
padding-left: 20px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
padding-right: 20px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-active:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
left: -30px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
right: -30px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
.d-toc-subheading {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
padding-left: 30px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
padding-right: 30px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-active:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
left: -60px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
right: -60px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
.d-toc-subheading {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
padding-left: 40px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
padding-right: 40px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-active:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
left: -70px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
right: -70px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
.d-toc-subheading {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
padding-left: 50px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
padding-right: 50px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-active:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
left: -80px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
right: -80px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.d-toc-subheading li {
|
2019-03-08 21:54:08 -05:00
|
|
|
font-size: 0.8em;
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.d-toc-anchor-link {
|
2019-03-08 22:01:21 -05:00
|
|
|
font-size: initial;
|
|
|
|
color: $primary-medium;
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
margin-left: 5px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// large screens
|
|
|
|
@media screen and (min-width: $large-width) {
|
2019-03-08 21:08:44 -05:00
|
|
|
.d-toc-toggle {
|
|
|
|
display: none !important;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
.d-toc-close-wrapper,
|
|
|
|
.d-toc-subheading {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.d-toc-post {
|
2019-03-08 21:20:26 -05:00
|
|
|
.topic-body,
|
|
|
|
.topic-avatar {
|
2019-03-08 21:06:56 -05:00
|
|
|
border-top: none;
|
|
|
|
}
|
|
|
|
.d-toc {
|
|
|
|
max-height: 85vh;
|
|
|
|
padding-left: 0;
|
|
|
|
margin-top: 50px;
|
2019-03-08 22:01:21 -05:00
|
|
|
|
2019-03-08 21:06:56 -05:00
|
|
|
position: sticky;
|
|
|
|
top: 75px;
|
|
|
|
margin-bottom: 135px;
|
|
|
|
max-width: 350px;
|
|
|
|
overflow-y: auto;
|
|
|
|
overflow-x: hidden;
|
|
|
|
align-self: flex-start;
|
|
|
|
flex: 1 1 auto;
|
2019-03-08 22:01:21 -05:00
|
|
|
.ltr & {
|
|
|
|
margin-left: -1px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
margin-right: -1px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
.d-toc-article {
|
|
|
|
display: flex;
|
|
|
|
> .row {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
border-right: 1px solid $primary-low;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
border-left: 1px solid $primary-low;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#topic-title {
|
|
|
|
margin-bottom: 0;
|
|
|
|
.title-wrapper {
|
|
|
|
border-bottom: 1px solid $primary-low;
|
|
|
|
padding-bottom: 0.5em;
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// small screens
|
|
|
|
@media screen and (max-width: $large-width) {
|
|
|
|
.d-toc-regular {
|
|
|
|
#d-toc {
|
|
|
|
z-index: z("header") + 1;
|
|
|
|
background: $secondary;
|
|
|
|
position: fixed;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
2019-03-08 22:01:21 -05:00
|
|
|
|
2019-03-08 21:06:56 -05:00
|
|
|
height: 100vh;
|
|
|
|
width: 100vw;
|
|
|
|
max-width: 500px;
|
|
|
|
overflow: scroll;
|
|
|
|
transition: transform 0.5s, opacity 0.25s;
|
|
|
|
transform: translatex(100%);
|
|
|
|
opacity: 0;
|
2019-03-08 22:01:21 -05:00
|
|
|
.ltr & {
|
|
|
|
margin-left: -1px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
margin-right: -1px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
&.d-toc-mobile {
|
|
|
|
transform: translatex(0);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
.d-toc-active {
|
|
|
|
&:before {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
margin-left: -1px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
margin-right: -1px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.d-toc-close-wrapper {
|
|
|
|
height: 3em;
|
|
|
|
background: $secondary;
|
2019-03-08 21:54:08 -05:00
|
|
|
|
2019-03-08 21:06:56 -05:00
|
|
|
margin-bottom: 1em;
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
2019-03-08 22:01:21 -05:00
|
|
|
.ltr & {
|
|
|
|
padding-right: 1em;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
padding-left: 1em;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
.d-toc-toggle {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 5px;
|
2019-03-08 22:01:21 -05:00
|
|
|
|
|
|
|
padding: 0.5em 1em;
|
|
|
|
background: $tertiary;
|
|
|
|
color: $secondary;
|
|
|
|
z-index: 3;
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
right: 16px;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
left: 16px;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
}
|
|
|
|
#d-toc > ul {
|
2019-03-08 21:54:08 -05:00
|
|
|
.ltr & {
|
|
|
|
margin-left: 20px;
|
|
|
|
border-left: 1px solid $primary-low;
|
|
|
|
}
|
|
|
|
.rtl & {
|
|
|
|
margin-right: 20px;
|
|
|
|
border-right: 1px solid $primary-low;
|
|
|
|
}
|
2019-03-08 21:06:56 -05:00
|
|
|
&:last-child {
|
|
|
|
margin-bottom: 5em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-03-08 21:08:44 -05:00
|
|
|
|
2019-03-08 21:33:58 -05:00
|
|
|
.topic .d-editor-preview [data-theme-toc] {
|
2019-03-08 21:08:44 -05:00
|
|
|
background: $tertiary;
|
|
|
|
color: $secondary;
|
2019-03-08 21:33:58 -05:00
|
|
|
border-top: 2px solid $secondary;
|
2019-03-08 21:08:44 -05:00
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
height: 30px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|