add class toc-active-prev for highlighting TOC as active

This commit is contained in:
mrliptontea
2015-04-07 15:41:24 +02:00
parent 352e170786
commit 9f701b0d05
4 changed files with 27 additions and 1 deletions

View File

@@ -66,6 +66,14 @@ Latest (master):
* WYSIWYG's icons will squeeze a little bit on smaller screens * WYSIWYG's icons will squeeze a little bit on smaller screens
* Images in headers will be aligned to the middle vertically * Images in headers will be aligned to the middle vertically
+ Introduced `text-normal` class for resetting font's weight + Introduced `text-normal` class for resetting font's weight
+ Added class `toc-active-prev` that will "highlight" TOC as "active". Must be applied to direct predecessor of `{{toc}}`. Fox example for page of chapter 2 of your guide you would do this:
p(toc-active-prev). [[some_page|Chapter 1: Introduction]]
{{toc}}
[[some_other_page|Chapter 3: Advanced usage]]
[[yet_another_page|Chapter 4: FAQ]]
v1.3.0 (2015-04-01): v1.3.0 (2015-04-01):

View File

@@ -97,6 +97,10 @@ $wiki-text: #333 !default;
$wiki-font-size: 16px !default; $wiki-font-size: 16px !default;
$wiki-line-height: 1.6 !default; $wiki-line-height: 1.6 !default;
$toc-active-link: darken($link-color, 10%) !default;
$toc-active-link-hover: darken($toc-active-link, 10%) !default;
$toc-active-border: $link-color !default;
//== Components //== Components
// //

View File

@@ -258,6 +258,20 @@ div.wiki {
vertical-align: middle; vertical-align: middle;
} }
} }
.toc-active-prev + .toc {
padding-left: $padding-large-horizontal;
border-left: 4px solid $toc-active-border;
a {
color: $toc-active-link;
&:focus,
&:hover {
color: $toc-active-link-hover;
}
}
}
} }
h1, h1,

File diff suppressed because one or more lines are too long