-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,507 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,117 @@ | ||
/* General styles */ | ||
.table-of-contents { | ||
font-size: .8em; | ||
display: inline-block; | ||
font-size: .8em; | ||
display: inline-block; | ||
} | ||
.table-of-contents.toc, | ||
.table-of-contents.minitoc { | ||
background-color: #F8F8F8; | ||
box-shadow: 0 0 5px 0 rgba(50, 50, 50, 0.4); | ||
padding: 1em 2em; | ||
min-width: 33.3%; | ||
max-width: 25%; | ||
background-color: #F8F8F8; | ||
box-shadow: 0 0 5px 0 rgba(50, 50, 50, 0.4); | ||
padding: 1em 2em; | ||
min-width: 33.3%; | ||
max-width: 50%; | ||
} | ||
.table-of-contents.toc { | ||
float: right; | ||
margin: 0 0 2em 2em; | ||
float: right; | ||
margin: 0 0 2em 2em; | ||
} | ||
|
||
/* TOC elements */ | ||
.table-of-contents .toctitle { | ||
display: block; | ||
font-size: larger; | ||
font-weight: bold; | ||
margin-bottom: .5em; | ||
display: block; | ||
font-size: larger; | ||
font-weight: bold; | ||
margin-bottom: .5em; | ||
} | ||
.table-of-contents ul { | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
.table-of-contents > ul { | ||
margin-left: 1.5em; | ||
margin-left: 1.5em; | ||
} | ||
.table-of-contents ul ul { | ||
padding: 0 1em; | ||
padding: 0 1em; | ||
} | ||
.table-of-contents li { | ||
margin: 0 0 .25em; | ||
display: block; | ||
color: #808080; | ||
margin: 0 0 .25em; | ||
display: block; | ||
color: #808080; | ||
} | ||
.table-of-contents .toclink:before { | ||
content: "\00BB"; /* » */ | ||
display: inline; | ||
margin-right: 0.5ex; | ||
content: "\00BB"; /* » */ | ||
display: inline; | ||
margin-right: 0.5ex; | ||
} | ||
.toclink { | ||
margin-left: -1em; | ||
margin-left: -1em; | ||
} | ||
|
||
/* Mini TOC */ | ||
.table-of-contents.minitoc { | ||
margin: -1em 0; | ||
margin: -1em 0; | ||
} | ||
|
||
/* Blog adjustments */ | ||
.list-item { | ||
clear: right; | ||
display: inline-block; | ||
width: 100%; | ||
clear: right; | ||
display: inline-block; | ||
width: 100%; | ||
} | ||
|
||
/* Anchorlinks */ | ||
.headeranchor-link { | ||
color: inherit; | ||
display: inline-block; | ||
outline: none; | ||
position: relative; | ||
color: inherit; | ||
display: inline-block; | ||
outline: none; | ||
position: relative; | ||
} | ||
.headeranchor-link:before, | ||
.headeranchor-link-left:before { | ||
content: attr(data-icon); /* "\2693" Dingsbat anchor */ | ||
display: inline-block; | ||
margin-left: -1em; | ||
padding-right: .3em; | ||
text-align: right; | ||
text-decoration: none; | ||
width: 1em; | ||
content: attr(data-icon); /* "\2693" Dingsbat anchor */ | ||
display: inline-block; | ||
margin-left: -1em; | ||
padding-right: .3em; | ||
text-align: right; | ||
text-decoration: none; | ||
width: 1em; | ||
|
||
position: relative; | ||
left: -9999px; | ||
height: 0; | ||
opacity: 0; | ||
visibility: hidden; | ||
position: relative; | ||
left: -9999px; | ||
height: 0; | ||
opacity: 0; | ||
visibility: hidden; | ||
|
||
transition: opacity .4s ease-in-out 0s | ||
transition: opacity .4s ease-in-out 0s | ||
} | ||
.headeranchor-link:hover:before, | ||
.headeranchor-link.headeranchor-visible-always:before { | ||
left: 0; | ||
height: auto; | ||
opacity: 1; | ||
visibility: visible; | ||
.headeranchor-link.headeranchor-visible--always:before { | ||
left: 0; | ||
height: auto; | ||
opacity: 1; | ||
visibility: visible; | ||
} | ||
.headeranchor-link-right:hover:before, | ||
.headeranchor-link-right.headeranchor-visible-always:before { | ||
left: calc(100% + 1.1em); | ||
.headeranchor-link--right:hover:before, | ||
.headeranchor-link--right.headeranchor-visible--always:before { | ||
left: calc(100% + 1.1em); | ||
} | ||
.headeranchor-link.no-anchor:hover:before { | ||
left: -9999px; | ||
height: 0; | ||
opacity: 0; | ||
visibility: hidden; | ||
left: -9999px; | ||
height: 0; | ||
opacity: 0; | ||
visibility: hidden; | ||
} | ||
|
||
/* Toc links */ | ||
.toclink code, | ||
.headeranchor-link code { | ||
font-size: inherit; | ||
vertical-align: inherit; | ||
background: none; | ||
color: inherit; | ||
font-size: inherit; | ||
vertical-align: inherit; | ||
} | ||
.toclink:hover code, | ||
.headeranchor-link:hover code { | ||
color: inherit; | ||
color: inherit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
name: "Toc" | ||
version: 1.3.1 | ||
version: "1.4.0" | ||
description: "This plugin automagically generates a (minified) Table of Contents based on special markers in the document and adds it into the resulting HTML document." | ||
icon: language | ||
icon: "language" | ||
author: | ||
name: Sommerregen | ||
email: [email protected] | ||
homepage: https://github.com/sommerregen/grav-plugin-toc | ||
keywords: [toc, filter, formatter, plugin] | ||
docs: https://github.com/sommerregen/grav-plugin-toc/blob/master/README.md | ||
bugs: https://github.com/sommerregen/grav-plugin-toc/issues | ||
license: MIT/GPL | ||
name: "Sommerregen" | ||
email: "[email protected]" | ||
homepage: "https://github.com/sommerregen/grav-plugin-toc" | ||
keywords: ["toc", "filter", "formatter", "plugin"] | ||
docs: "https://github.com/sommerregen/grav-plugin-toc/blob/master/README.md" | ||
bugs: "https://github.com/sommerregen/grav-plugin-toc/issues" | ||
license: "MIT/GPL" | ||
|
||
form: | ||
validation: strict | ||
|
||
fields: | ||
global: | ||
type: section | ||
|
@@ -31,6 +32,18 @@ form: | |
validate: | ||
type: bool | ||
|
||
active: | ||
type: toggle | ||
label: PLUGINS.TOC.PLUGIN_ACTIVE | ||
help: PLUGINS.TOC.PLUGIN_ACTIVE_HELP | ||
highlight: 1 | ||
default: 1 | ||
options: | ||
1: PLUGIN_ADMIN.YES | ||
0: PLUGIN_ADMIN.NO | ||
validate: | ||
type: bool | ||
|
||
built_in_css: | ||
type: toggle | ||
label: PLUGINS.TOC.BUILTIN_CSS | ||
|
@@ -51,6 +64,7 @@ form: | |
title: | ||
type: toggle | ||
label: PLUGINS.TOC.TITLE | ||
highlight: 1 | ||
default: 1 | ||
options: | ||
1: PLUGIN_ADMIN.YES | ||
|
@@ -62,6 +76,7 @@ form: | |
type: toggle | ||
label: PLUGINS.TOC.ANCHORLINK | ||
help: PLUGINS.TOC.ANCHORLINK_HELP | ||
highlight: 1 | ||
default: 1 | ||
options: | ||
1: PLUGIN_ADMIN.YES | ||
|
@@ -73,6 +88,7 @@ form: | |
type: toggle | ||
label: PLUGINS.TOC.PERMALINK | ||
help: PLUGINS.TOC.PERMALINK_HELP | ||
highlight: 1 | ||
default: 1 | ||
options: | ||
1: PLUGIN_ADMIN.YES | ||
|
@@ -136,17 +152,6 @@ form: | |
min: 1 | ||
max: 6 | ||
|
||
process: | ||
type: toggle | ||
label: PLUGINS.TOC.PROCESS | ||
highlight: 1 | ||
default: 1 | ||
options: | ||
1: PLUGIN_ADMIN.YES | ||
0: PLUGIN_ADMIN.NO | ||
validate: | ||
type: bool | ||
|
||
slug: | ||
type: section | ||
title: PLUGINS.TOC.SLUG.SECTION | ||
|
@@ -155,13 +160,25 @@ form: | |
slug.truncate: | ||
type: toggle | ||
label: PLUGINS.TOC.SLUG.TRUNCATE | ||
highlight: 1 | ||
default: 1 | ||
options: | ||
1: PLUGIN_ADMIN.YES | ||
0: PLUGIN_ADMIN.NO | ||
validate: | ||
type: bool | ||
|
||
slug.granularity: | ||
type: select | ||
size: small | ||
label: PLUGINS.TOC.SLUG.GRANULARITY.LABEL | ||
default: words | ||
options: | ||
words: PLUGINS.TOC.SLUG.GRANULARITY.WORDS | ||
characters: PLUGINS.TOC.SLUG.GRANULARITY.CHARACTERS | ||
validate: | ||
type: string | ||
|
||
slug.length: | ||
type: text | ||
size: x-small | ||
|
Oops, something went wrong.