Rename ToC level styles, reorganize example content

This commit is contained in:
Alex Shpak 2019-10-23 21:31:58 +02:00
parent e03b9bccb1
commit 4596f08e32
12 changed files with 74 additions and 36 deletions

View File

@ -258,16 +258,17 @@ Useful if you want to show alternative information per platform or setting.
Organize text in 2 or more columns to use space efficiently.
```html
{{< columns >}}
<!-- begin columns block -->
{{< columns >}} <!-- begin columns block -->
# Left Content Lorem markdownum insigne...
# Left Content Lorem markdownum insigne... <--->
<!-- magic sparator, between columns -->
<---> <!-- magic sparator, between columns -->
# Mid Content Lorem markdownum insigne... <--->
<!-- magic sparator, between columns -->
# Mid Content Lorem markdownum insigne...
# Right Content Lorem markdownum insigne... {{< /columns >}}
<---> <!-- magic sparator, between columns -->
# Right Content Lorem markdownum insigne...
{{< /columns >}}
```
### Expand

View File

@ -69,6 +69,16 @@ aside nav ul {
}
}
// Classes to hide nested levels of ToC/Menu
.levels-1 ul ul,
.levels-2 ul ul ul,
.levels-3 ul ul ul ul,
.levels-4 ul ul ul ul ul,
.levels-5 ul ul ul ul ul ul,
.levels-6 ul ul ul ul ul ul ul {
display: none;
}
ul.pagination {
display: flex;
justify-content: center;
@ -198,16 +208,6 @@ ul.pagination {
nav > ul > li:first-child {
margin-top: 0;
}
// Classes to hide nested levels of ToC (can be replaced by @for, but it's more clear like this)
&.level-1 ul ul,
&.level-2 ul ul ul,
&.level-3 ul ul ul ul,
&.level-4 ul ul ul ul ul,
&.level-5 ul ul ul ul ul ul,
&.level-6 ul ul ul ul ul ul ul {
display: none;
}
}
.book-footer {

View File

@ -0,0 +1,12 @@
# 4th Level of Menu
## Caesorum illa tu sentit micat vestes papyriferi
Inde aderam facti; Theseus vis de tauri illa peream. Oculos **uberaque** non
regisque vobis cursuque, opus venit quam vulnera. Et maiora necemque, lege modo;
gestanda nitidi, vero? Dum ne pectoraque testantur.
Venasque repulsa Samos qui, exspectatum eram animosque hinc, [aut
manes](http://www.creveratnon.net/apricaaetheriis), Assyrii. Cupiens auctoribus
pariter rubet, profana magni super nocens. Vos ius sibilat inpar turba visae
iusto! Sedes ante dum superest **extrema**.

View File

@ -1,4 +1,4 @@
# Locus fuit caecis
# 3rd Level of Menu
Nefas discordemque domino montes numen tum humili nexilibusque exit, Iove. Quae
miror esse, scelerisque Melaneus viribus. Miseri laurus. Hoc est proposita me

View File

@ -1,8 +1,9 @@
---
bookCollapseSection: true
weight: 20
---
# Caput vino delphine in tamen vias
# 2nd Level of Menu
## Cognita laeva illo fracta

View File

@ -0,0 +1,17 @@
---
title: 結任了出興自園更市標告之絕
bookHidden: true
---
# 結任了出興自園更市標告之絕
問希和企一我……開父天營歡母不黨信現人發。
加你區然沒一破?感花好千現學稱好?計現生,響時加過法素種際說國……陸國教快這展四冷論機人語力減社,路調好……臉水不國清司的態已及力如未三團身;大力看國叫晚線不式。校精到過,個亞有可放世來年和於後。
功細能色,色是任金言!學門他應全品原表便家人大就。
牛生美服食方未問始沒害被般不……響具線?
而技爸技推立出少屋須?男才太西個輕明深應工、原而克說國快我檢為的單調請出消動教處負四無空、三電引,力二約說空表消字代!到人岸傳、著人野中活!
去一作情離論才,再男反整。設如大點重主理個故……面目定辦我些!的我頭來裡品生有適西管以依越同究民國自情以助受人:要家的受好客童把叫的通,預把工那子電作,根品行消……高華然片內聞員、有是老道世心,皮急結告,商這同給……遠蘭裡:化委長教人再;再的她適認是國有評都的城一識小廣分方提爾現馬多,數曾突為備長竟重深知舉書校母印的兒部竟法由念,學代品道量百著別旅!參還理登你下府意生有公生將題必今的用能從父人見動北死作國!

View File

@ -1,3 +1,7 @@
---
weight: 10
---
# Ubi loqui
## Mentem genus facietque salire tempus bracchia

View File

@ -1,17 +1,21 @@
---
headless: true
bookMenuLevels: 1
---
- [**Example Site**]({{< relref "/docs/example" >}})
- [Table of Contents]({{< relref "/docs/example/table-of-contents" >}})
- [**Example Site**]({{< relref "/docs/example" >}})
- [Table of Contents]({{< relref "/docs/example/table-of-contents" >}})
- [With ToC]({{< relref "/docs/example/table-of-contents/with-toc" >}})
- [Without ToC]({{< relref "/docs/example/table-of-contents/without-toc" >}})
- **Shortcodes**
- [Buttons]({{< relref "/docs/shortcodes/buttons" >}})
- [Columns]({{< relref "/docs/shortcodes/columns" >}})
- [Expand]({{< relref "/docs/shortcodes/expand" >}})
- [Hints]({{< relref "/docs/shortcodes/hints" >}})
- [Katex]({{< relref "/docs/shortcodes/katex" >}})
- [Mermaid]({{< relref "/docs/shortcodes/mermaid" >}})
- [Tabs]({{< relref "/docs/shortcodes/tabs" >}})
- [**Blog**]({{< relref "/posts" >}})
- [2nd]({{< relref "/docs/example/2nd" >}})
- [3rd]({{< relref "/docs/example/2nd/3rd" >}})
- [4th]({{< relref "/docs/example/2nd/3rd/4th" >}})
- **Shortcodes**
- [Buttons]({{< relref "/docs/shortcodes/buttons" >}})
- [Columns]({{< relref "/docs/shortcodes/columns" >}})
- [Expand]({{< relref "/docs/shortcodes/expand" >}})
- [Hints]({{< relref "/docs/shortcodes/hints" >}})
- [Katex]({{< relref "/docs/shortcodes/katex" >}})
- [Mermaid]({{< relref "/docs/shortcodes/mermaid" >}})
- [Tabs]({{< relref "/docs/shortcodes/tabs" >}})
- [**Blog**]({{< relref "/posts" >}})

View File

@ -1 +1 @@
{"Target":"book.min.1b994bd28c6ce2255f069b6bf6837b4d396307637fc48d61dcb2a6caac26e031.css","MediaType":"text/css","Data":{"Integrity":"sha256-G5lL0oxs4iVfBptr9oN7TTljB2N/xI1h3LKmyqwm4DE="}}
{"Target":"book.min.6c28d4c7786ace6b760a10f0da9a7fa873292f04f374a4819c43fd684501f609.css","MediaType":"text/css","Data":{"Integrity":"sha256-bCjUx3hqzmt2ChDw2pp/qHMpLwTzdKSBnEP9aEUB9gk="}}

View File

@ -1,6 +1,6 @@
{{ $tocLevels := default (default 6 .Site.Params.BookToC) .Params.BookToC }}
{{ if and $tocLevels .Page.TableOfContents }}
<aside class="book-toc level-{{$tocLevels}} fixed">
<aside class="book-toc levels-{{$tocLevels}} fixed">
{{ .Page.TableOfContents }}
</aside>
{{ end }}