Cleanup table of contents styling
This commit is contained in:
parent
add794e05e
commit
72661942cf
4 changed files with 43 additions and 50 deletions
|
@ -3,67 +3,57 @@
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
.toc {
|
.toc {
|
||||||
padding: 0 1em 1em;
|
padding: 0 0 1em;
|
||||||
font-family: $sans-serif-narrow;
|
font-family: $sans-serif-narrow;
|
||||||
border-top: 8px solid $gray;
|
color: $gray;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
background-color: #fff;
|
||||||
@include breakpoint($large) {
|
@include breakpoint($large) {
|
||||||
display: block;
|
display: block;
|
||||||
@include grid(12,2);
|
@include grid(12,2);
|
||||||
@include prefix(12,0.5);
|
|
||||||
@include suffix(12,0.5);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5.5em;
|
top: 0;
|
||||||
right: 0;
|
right: 6.250005%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc__title {
|
.toc__title {
|
||||||
margin: 1em 0;
|
margin: 0;
|
||||||
font-family: $serif;
|
padding: 10px 20px;
|
||||||
font-size: 18px;
|
font-family: $sans-serif-narrow;
|
||||||
color: $gray;
|
font-size: 16px;
|
||||||
|
border: 1px solid $border-color;
|
||||||
|
border-top-left-radius: $border-radius;
|
||||||
|
border-top-right-radius: $border-radius;
|
||||||
|
background: mix(#fff, $light-gray, 50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc__menu {
|
.toc__menu {
|
||||||
padding-left: 0;
|
margin: 0;
|
||||||
font-size: 14px;
|
padding: 0;
|
||||||
border-bottom: 2px solid #e2e2e2;
|
width: 100%;
|
||||||
ul {
|
list-style: none;
|
||||||
@include clearfix();
|
border: 1px solid $border-color;
|
||||||
> li {
|
border-top: none;
|
||||||
padding: 5px 0;
|
border-bottom-right-radius: $border-radius;
|
||||||
font-weight: normal;
|
border-bottom-left-radius: $border-radius;
|
||||||
&:before {
|
|
||||||
content: "\2192";
|
|
||||||
width: 20px;
|
|
||||||
}
|
|
||||||
&:not(:last-child) {
|
|
||||||
border-bottom: 1px solid $light-gray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
clear: both;
|
|
||||||
display: block;
|
|
||||||
font-weight: bold;
|
|
||||||
&:before {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
margin-right: 10px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
width: 10px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
a {
|
a {
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
padding: 10px 20px;
|
||||||
&:hover {
|
font-size: 11px;
|
||||||
text-decoration: underline;
|
font-weight: bold;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-bottom: 1px solid $border-color;
|
||||||
}
|
}
|
||||||
|
li ul > li a {
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
// hide sub sub links on small screens
|
||||||
|
li > ul li {
|
||||||
|
display: none;
|
||||||
|
@include breakpoint($large) {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
> li {
|
|
||||||
padding: 5px 0;
|
|
||||||
border-top: 2px solid $light-gray;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
title: "Template: Post with Table Of Contents"
|
title: "Template: Post with Table Of Contents"
|
||||||
|
header:
|
||||||
|
image: unsplash-image-9.jpg
|
||||||
|
caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
|
||||||
tags:
|
tags:
|
||||||
- table of contents
|
- table of contents
|
||||||
---
|
---
|
||||||
|
@ -28,7 +31,7 @@ Below is just about everything you'll need to style in the theme. Check the sour
|
||||||
|
|
||||||
###### Heading 6
|
###### Heading 6
|
||||||
|
|
||||||
### Body text
|
## Body text
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, test link adipiscing elit. **This is strong**. Nullam dignissim convallis est. Quisque aliquam.
|
Lorem ipsum dolor sit amet, test link adipiscing elit. **This is strong**. Nullam dignissim convallis est. Quisque aliquam.
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue