Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvjeantet <valere.jeantet@gmail.com>2020-09-01 23:55:55 +0300
committervjeantet <valere.jeantet@gmail.com>2020-09-01 23:55:55 +0300
commit8446cabd7795977f00bb97fd34e9eec310d5c8ea (patch)
treed38c69225901147be82304a172f06cce148afb86
parentd598847437462e482aeb77ae8af4e93ee15dc9cb (diff)
refactor hide_nav, header, breadcrumb...
-rw-r--r--assets/sass/layout.scss33
-rw-r--r--assets/sass/main.scss2
-rw-r--r--exampleSite/content/content-and-customization/00-adding-content/_index.md1
-rw-r--r--exampleSite/content/content-and-customization/01-homepage/_index.md4
-rw-r--r--exampleSite/content/examples/page with raw content/_index.md21
-rw-r--r--exampleSite/content/examples/page without any/_index.md102
-rw-r--r--exampleSite/content/examples/page without footer/_index.md11
-rw-r--r--exampleSite/content/examples/page without header/_index.md10
-rw-r--r--exampleSite/content/examples/page without next page/_index.md33
-rw-r--r--exampleSite/content/examples/page without sidebar and toc/_index.md11
-rw-r--r--exampleSite/content/examples/page without toc/_index.md10
-rw-r--r--exampleSite/layouts/partials/head.html11
-rw-r--r--exampleSite/resources/_gen/assets/scss/sass/layout.scss_f300667da4f5b5f84e1a9e0702b2fdde.content71
-rw-r--r--exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content52
-rw-r--r--layouts/_default/baseof.html19
-rw-r--r--layouts/partials/body-article-content.html163
-rw-r--r--layouts/partials/body-header.html2
-rw-r--r--layouts/raw/single.html1
18 files changed, 366 insertions, 191 deletions
diff --git a/assets/sass/layout.scss b/assets/sass/layout.scss
index 623cd5d..41eed12 100644
--- a/assets/sass/layout.scss
+++ b/assets/sass/layout.scss
@@ -6,7 +6,7 @@ a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, bo
vertical-align: baseline;
}
-body {
+body:not(.render_raw) {
margin: 0px 0px ;
display: -webkit-box;
display: flex;
@@ -150,33 +150,8 @@ body {
}
/* hideheader hidenav hidebreadcrumb hidetoc hidefooter */
-body {
- &.hidenav{
- article{
- aside{
- display:none!important;
- }
- }
- }
- &.hidebreadcrumb{
- article section.page nav#breadcrumb{
- display: none!important;
- }
- }
- &.hidetoc{
- article section.right-menu {
- display: none!important;
- }
- }
- &.hidefooter{
- footer{
- display: none!important;
- }
- }
+body:not(.render_raw) {
&.hideheader{
- header {
- display:none!important;
- }
article{
padding-top: 0px ;
aside{
@@ -192,7 +167,7 @@ body {
}
@media(max-width:1160px) {
- body{
+ body:not(.render_raw){
header{
div.burger{
display: none;
@@ -219,7 +194,7 @@ body {
}
@media(max-width:769px) {
- body{
+ body:not(.render_raw){
header{
div.burger{
display: block;
diff --git a/assets/sass/main.scss b/assets/sass/main.scss
index 82dc95b..3b52b44 100644
--- a/assets/sass/main.scss
+++ b/assets/sass/main.scss
@@ -31,7 +31,7 @@ $c_saturate5 : saturate($color_second, 60%);
$c_saturate6 : saturate($color_second, 75%);
$c_saturate7 : saturate($color_second, 90%);
-body{
+body:not(.render_raw){
font-family:"Montserrat",sans-serif;
diff --git a/exampleSite/content/content-and-customization/00-adding-content/_index.md b/exampleSite/content/content-and-customization/00-adding-content/_index.md
index 3df4f1f..a844eca 100644
--- a/exampleSite/content/content-and-customization/00-adding-content/_index.md
+++ b/exampleSite/content/content-and-customization/00-adding-content/_index.md
@@ -77,6 +77,7 @@ On top of the [existing ones](https://gohugo.io/content-management/front-matter/
hide_breadcrumb=false # set true to hide the breadcrumb
hide_toc=false # set true to hide the right menu (table of contents)
hide_footer=false #set true to hide the website footer
+ hide_nextpage=false #set true to hide the "next page" chevron
# subpage
subpage = false # usefull when you want to force a sub section to be considered as a subpage
diff --git a/exampleSite/content/content-and-customization/01-homepage/_index.md b/exampleSite/content/content-and-customization/01-homepage/_index.md
index 41c45d3..b3b6a4b 100644
--- a/exampleSite/content/content-and-customization/01-homepage/_index.md
+++ b/exampleSite/content/content-and-customization/01-homepage/_index.md
@@ -24,7 +24,7 @@ Remove navigation components from your landing page by setting options in its pa
{{%notice success%}}
**Nothing but my content !**
\
-set `layout="raw"` in your home page frontmatter : only your content will be rendered, without menu, toc, headers, etc..... [example]({{%relref "/examples/page with raw content"%}})
+set `render="raw"` in your home page frontmatter : only your content will be rendered, without menu, toc, headers, etc..... [example]({{%relref "/examples/page with raw content"%}})
{{%/notice%}}
## Use plain HTML for your homepage
@@ -34,7 +34,7 @@ Example
```toml
+++
title="Homepage"
-layout="raw"
+render="raw"
+++
<div class="myHome">
Hello
diff --git a/exampleSite/content/examples/page with raw content/_index.md b/exampleSite/content/examples/page with raw content/_index.md
index 56cdb32..c1a5021 100644
--- a/exampleSite/content/examples/page with raw content/_index.md
+++ b/exampleSite/content/examples/page with raw content/_index.md
@@ -1,9 +1,25 @@
---
title: A page with raw content
-layout: raw
+render: raw
description: Nothing but your content ! usefull for special pages
weight: 99
---
+<head>
+ <title>COUCOU</title>
+</head>
+<body>
+
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page with raw content
+render: raw
+---
+```
+{{%/panel%}}
+
+
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
@@ -18,4 +34,5 @@ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
-proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+</body> \ No newline at end of file
diff --git a/exampleSite/content/examples/page without any/_index.md b/exampleSite/content/examples/page without any/_index.md
new file mode 100644
index 0000000..87b7cc4
--- /dev/null
+++ b/exampleSite/content/examples/page without any/_index.md
@@ -0,0 +1,102 @@
+---
+title: A page with only TOC and next page
+description: hide everything
+weight: 90
+
+hide_nextpage: false
+hide_toc: false
+
+hide_header: true
+hide_nav: true
+hide_breadcrumb: true
+hide_footer: true
+---
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page with only TOC and next page
+hide_header: true
+hide_nav: true
+hide_breadcrumb: true
+hide_footer: true
+---
+
+```
+{{%/panel%}}
+
+
+
+## Chapter 2
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+## Chapter 3
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+## Chapter 4
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+### Chapter 4.1
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+### Chapter 4.2
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+## Chapter 5
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file
diff --git a/exampleSite/content/examples/page without footer/_index.md b/exampleSite/content/examples/page without footer/_index.md
index 7b5c3de..b9365d3 100644
--- a/exampleSite/content/examples/page without footer/_index.md
+++ b/exampleSite/content/examples/page without footer/_index.md
@@ -4,6 +4,17 @@ weight: 20
hide_footer: true
---
+
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page without footer
+hide_footer: true
+---
+```
+{{%/panel%}}
+
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
diff --git a/exampleSite/content/examples/page without header/_index.md b/exampleSite/content/examples/page without header/_index.md
index 99c19f2..9b55a2a 100644
--- a/exampleSite/content/examples/page without header/_index.md
+++ b/exampleSite/content/examples/page without header/_index.md
@@ -1,9 +1,17 @@
---
title: A page without header
-weight: 20
+weight: 10
hide_header: true
---
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page without header
+hide_header: true
+---
+```
+{{%/panel%}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
diff --git a/exampleSite/content/examples/page without next page/_index.md b/exampleSite/content/examples/page without next page/_index.md
new file mode 100644
index 0000000..d5d080f
--- /dev/null
+++ b/exampleSite/content/examples/page without next page/_index.md
@@ -0,0 +1,33 @@
+---
+title: A page without "NEXT PAGE"
+description: hide everything
+weight: 80
+hide_nextpage: true
+---
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page without "NEXT PAGE"
+hide_nextpage: true
+---
+```
+{{%/panel%}}
+
+## Chapter 2
+
+[Click here to GOTO to the next example]({{%relref "page without any"%}})
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
diff --git a/exampleSite/content/examples/page without sidebar and toc/_index.md b/exampleSite/content/examples/page without sidebar and toc/_index.md
index e0934c1..8d8ca30 100644
--- a/exampleSite/content/examples/page without sidebar and toc/_index.md
+++ b/exampleSite/content/examples/page without sidebar and toc/_index.md
@@ -5,6 +5,17 @@ hide_toc: true
hide_nav: true
---
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page without sidebar and toc
+hide_toc: true
+hide_nav: true
+---
+
+```
+{{%/panel%}}
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
diff --git a/exampleSite/content/examples/page without toc/_index.md b/exampleSite/content/examples/page without toc/_index.md
index 84a91b2..ede7f35 100644
--- a/exampleSite/content/examples/page without toc/_index.md
+++ b/exampleSite/content/examples/page without toc/_index.md
@@ -4,6 +4,16 @@ weight: 20
hide_toc: true
---
+{{%panel header="page's frontmatter"%}}
+```yaml
+---
+title: A page without table of contents
+hide_toc: true
+---
+
+```
+{{%/panel%}}
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
diff --git a/exampleSite/layouts/partials/head.html b/exampleSite/layouts/partials/head.html
index 65870af..c37e0be 100644
--- a/exampleSite/layouts/partials/head.html
+++ b/exampleSite/layouts/partials/head.html
@@ -7,3 +7,14 @@
gtag('config', 'UA-176068424-1');
</script>
+
+<style type="text/css">
+body > header > div {
+ justify-content: flex-start;
+}
+
+body > header > div > nav.shortcuts {
+ margin-left: 2em;
+}
+
+</style> \ No newline at end of file
diff --git a/exampleSite/resources/_gen/assets/scss/sass/layout.scss_f300667da4f5b5f84e1a9e0702b2fdde.content b/exampleSite/resources/_gen/assets/scss/sass/layout.scss_f300667da4f5b5f84e1a9e0702b2fdde.content
index 98b7ee2..15288f1 100644
--- a/exampleSite/resources/_gen/assets/scss/sass/layout.scss_f300667da4f5b5f84e1a9e0702b2fdde.content
+++ b/exampleSite/resources/_gen/assets/scss/sass/layout.scss_f300667da4f5b5f84e1a9e0702b2fdde.content
@@ -5,7 +5,7 @@ a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, bo
border: 0;
vertical-align: baseline; }
-body {
+body:not(.render_raw) {
margin: 0px 0px;
display: -webkit-box;
display: flex;
@@ -14,7 +14,7 @@ body {
flex-direction: column;
min-height: 100vh;
text-rendering: optimizeLegibility; }
- body header {
+ body:not(.render_raw) header {
flex-shrink: 0;
min-height: 45px;
max-height: 45px;
@@ -24,14 +24,14 @@ body {
z-index: 9999;
-webkit-transform: translateZ(0);
transform: translateZ(0); }
- body header > * {
+ body:not(.render_raw) header > * {
max-width: 1400px;
width: 100%;
padding: 0 20px;
margin: 0 auto; }
- body header div.burger {
+ body:not(.render_raw) header div.burger {
display: none; }
- body article {
+ body:not(.render_raw) article {
-webkit-box-flex: 1;
flex-grow: 1;
display: -webkit-box;
@@ -57,9 +57,9 @@ body {
margin: 0 auto;
width: 100%;
max-width: 1400px; }
- body article > * {
+ body:not(.render_raw) article > * {
margin: 0 24px; }
- body article aside {
+ body:not(.render_raw) article aside {
transition: max-height .2s ease-out;
-webkit-box-flex: 0;
flex: 0 0 20em;
@@ -71,18 +71,18 @@ body {
position: sticky;
overflow-y: auto;
top: 45px; }
- body article section.page {
+ body:not(.render_raw) article section.page {
-webkit-box-flex: 1;
flex: 1 auto;
max-width: 100%;
min-width: 0; }
- body article section.page .jump-to-section {
+ body:not(.render_raw) article section.page .jump-to-section {
display: none;
margin-top: 0.5em;
margin-left: 0.2em; }
- body article section.page .jump-to-section ul {
+ body:not(.render_raw) article section.page .jump-to-section ul {
padding-left: 20px; }
- body article section.page .jump-to-section nav {
+ body:not(.render_raw) article section.page .jump-to-section nav {
display: none;
position: absolute;
z-index: 5;
@@ -92,7 +92,7 @@ body {
min-width: 25%;
max-width: 50%;
box-shadow: 0 5px 8px rgba(0, 0, 0, 0.25); }
- body article section.right-menu {
+ body:not(.render_raw) article section.right-menu {
margin-right: 0;
align-self: flex-start;
display: block;
@@ -104,64 +104,49 @@ body {
position: sticky;
top: 45px;
margin-bottom: 40px; }
- body footer > * {
+ body:not(.render_raw) footer > * {
max-width: 1400px;
width: 100%;
padding: 0 20px;
margin: 0 auto; }
/* hideheader hidenav hidebreadcrumb hidetoc hidefooter */
-body.hidenav article aside {
- display: none !important; }
-
-body.hidebreadcrumb article section.page nav#breadcrumb {
- display: none !important; }
-
-body.hidetoc article section.right-menu {
- display: none !important; }
-
-body.hidefooter footer {
- display: none !important; }
-
-body.hideheader header {
- display: none !important; }
-
-body.hideheader article {
+body:not(.render_raw).hideheader article {
padding-top: 0px; }
- body.hideheader article aside {
+ body:not(.render_raw).hideheader article aside {
top: 0px;
height: calc(100vh); }
- body.hideheader article section.right-menu {
+ body:not(.render_raw).hideheader article section.right-menu {
top: 0px;
max-height: calc(100vh); }
@media (max-width: 1160px) {
- body header div.burger {
+ body:not(.render_raw) header div.burger {
display: none; }
- body article {
+ body:not(.render_raw) article {
padding-left: 0px;
padding-right: 0px; }
- body article aside {
+ body:not(.render_raw) article aside {
margin-right: 0px; }
- body article aside.responsive {
+ body:not(.render_raw) article aside.responsive {
display: block; }
- body article section.page .jump-to-section {
+ body:not(.render_raw) article section.page .jump-to-section {
display: block; }
- body article section.right-menu {
+ body:not(.render_raw) article section.right-menu {
display: none; } }
@media (max-width: 769px) {
- body header div.burger {
+ body:not(.render_raw) header div.burger {
display: block; }
- body article {
+ body:not(.render_raw) article {
padding-left: 0px;
padding-right: 0px; }
- body article aside {
+ body:not(.render_raw) article aside {
display: none;
flex: 0 0 100%; }
- body article aside.responsive {
+ body:not(.render_raw) article aside.responsive {
display: block; }
- body article section.page .jump-to-section {
+ body:not(.render_raw) article section.page .jump-to-section {
display: block; }
- body article section.right-menu {
+ body:not(.render_raw) article section.right-menu {
display: none; } }
diff --git a/exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content b/exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content
index e734db8..8966181 100644
--- a/exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content
+++ b/exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content
@@ -1,35 +1,35 @@
@charset "UTF-8";
-body {
+body:not(.render_raw) {
font-family: "Montserrat",sans-serif;
font-weight: 400;
line-height: 1.5;
color: black; }
- body a {
+ body:not(.render_raw) a {
color: black;
text-decoration: none;
background-color: transparent; }
- body header {
+ body:not(.render_raw) header {
background-color: #333333;
border-bottom: 2px solid gray;
box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.4rem rgba(0, 0, 0, 0.2);
justify-content: space-between;
align-items: stretch;
color: #e6e6e6; }
- body header a {
+ body:not(.render_raw) header a {
color: #cccccc; }
- body header > div {
+ body:not(.render_raw) header > div {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: stretch;
white-space: nowrap; }
- body header > div img {
+ body:not(.render_raw) header > div img {
height: 32px;
margin-right: 0.5rem; }
- body header > div .burger {
+ body:not(.render_raw) header > div .burger {
margin-right: 1rem; }
- body header nav.shortcuts {
+ body:not(.render_raw) header nav.shortcuts {
margin-left: auto;
position: relative;
display: flex;
@@ -37,32 +37,32 @@ body {
list-style-type: none;
flex-direction: row;
flex-wrap: nowrap; }
- body header nav.shortcuts li {
+ body:not(.render_raw) header nav.shortcuts li {
margin: 0px; }
- body header nav.shortcuts li .fa {
+ body:not(.render_raw) header nav.shortcuts li .fa {
font-size: 1.5rem;
margin-right: 0.5rem; }
- body header nav.shortcuts li a {
+ body:not(.render_raw) header nav.shortcuts li a {
color: #d6d6d6;
padding: 0 1rem;
font-weight: bold;
font-size: 90%; }
- body article {
+ body:not(.render_raw) article {
background-color: white; }
- body article aside #close_menu {
+ body:not(.render_raw) article aside #close_menu {
display: none;
float: right;
margin-right: 2rem; }
- body article aside.responsive #close_menu {
+ body:not(.render_raw) article aside.responsive #close_menu {
display: block; }
- body article section.right-menu {
+ body:not(.render_raw) article section.right-menu {
padding: 3.5rem 0 3.5rem 0;
font-size: 14px;
line-height: 20px;
padding-left: 2px; }
- body article section.right-menu .TableOfContents > * {
+ body:not(.render_raw) article section.right-menu .TableOfContents > * {
margin-left: 5px; }
- body article section.right-menu .TableOfContents label {
+ body:not(.render_raw) article section.right-menu .TableOfContents label {
font-weight: 700;
letter-spacing: -1px;
display: block;
@@ -70,29 +70,29 @@ body {
border-bottom: 1px dotted #999999;
color: #333333;
font-variant: small-caps; }
- body article section.right-menu .TableOfContents nav > ul {
+ body:not(.render_raw) article section.right-menu .TableOfContents nav > ul {
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px; }
- body article section.right-menu .TableOfContents nav > ul ul {
+ body:not(.render_raw) article section.right-menu .TableOfContents nav > ul ul {
padding: 0px 0px 0px 14px;
margin: 0px 0px 0px 0px;
border-left: 1px solid #e6e6e6; }
- body article section.right-menu .TableOfContents nav > ul ul li {
+ body:not(.render_raw) article section.right-menu .TableOfContents nav > ul ul li {
font-size: 90%; }
- body article section.right-menu .TableOfContents ul {
+ body:not(.render_raw) article section.right-menu .TableOfContents ul {
list-style-type: none; }
- body article section.right-menu .TableOfContents li {
+ body:not(.render_raw) article section.right-menu .TableOfContents li {
padding: 8px 0px 8px 0px; }
- body article section.right-menu .TableOfContents li a {
+ body:not(.render_raw) article section.right-menu .TableOfContents li a {
font-weight: 300;
/*padding-left: 2px;*/ }
- body article section.right-menu .TableOfContents li a.active {
+ body:not(.render_raw) article section.right-menu .TableOfContents li a.active {
font-weight: 500; }
- body footer {
+ body:not(.render_raw) footer {
background-color: #333333;
color: #cccccc;
padding: 3rem; }
- body footer a {
+ body:not(.render_raw) footer a {
color: #cccccc; }
article section.page {
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index d5a1abb..61be3f4 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -19,12 +19,13 @@
<body data-url="{{ .RelPermalink }}"
class="
- {{- with .Params.layout}}layout_{{.}} {{end -}}
+ {{- with .Params.render}}render_{{.}} {{end -}}
{{if .Params.hide_header}}hideheader {{end -}}
{{if .Params.hide_nav}}hidenav {{end -}}
{{if .Params.hide_breadcrumb}}hidebreadcrumb {{end -}}
{{if .Params.hide_toc}}hidetoc {{end -}}
{{if .Params.hide_footer}}hidefooter {{end -}}
+ {{if .Params.hide_nextpage}}hidenextpage {{end -}}
">
<!--
<style type="text/css">
@@ -59,18 +60,22 @@
window.location = '{{ $redirectURL }}'
</script>
<a href="{{ $redirectURL }}">go to {{ $redirectURL }}</a>
-{{ else if eq .Params.layout "raw" }}
+{{ else if eq .Params.render "raw" }}
{{- .Content -}}
{{ else }}
+
+ {{if not .Params.hide_header}}
<header style="">
{{ partial "body-header.html" . }}
</header>
+ {{end}}
<article>
-
+ {{if not .Params.hide_nav}}
<aside class="{{.Params.layout }}">
{{ partial "body-sidebar.html" . }}
</aside>
+ {{end}}
<section class="page {{.Params.layout }}">
{{ block "main" . }}
@@ -78,17 +83,21 @@
</section>
<!-- NAVIGATION DROITE TOC -->
+ {{if not .Params.hide_toc}}
<section class="right-menu {{.Params.layout }}">
{{ block "sidepage" . }}
{{ end }}
</section>
+ {{end -}}
<!-- FIN NAVIGATION DROITE TOC -->
-
</article>
-
+
+ {{if not .Params.hide_footer}}
<footer>
{{ partial "body-footer.html" . }}
</footer>
+ {{end}}
+
{{end}}
</body>
diff --git a/layouts/partials/body-article-content.html b/layouts/partials/body-article-content.html
index fd35861..70d5219 100644
--- a/layouts/partials/body-article-content.html
+++ b/layouts/partials/body-article-content.html
@@ -1,91 +1,90 @@
-{{if not .IsHome}}
- <!-- FIL D'ARIANE -->
- {{if not .Params.layout }}
- <nav id="breadcrumb" aria-label="breadcrumb">
- <ol class="breadcrumb">
- {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
- </ol>
- </nav>
- {{end}}
- <!-- FIN FIL D'ARIANE -->
-
- <!-- TITRE -->
- {{if not .Params.layout }}
- {{$pagetitle := .Title}}
- {{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
-
- {{ $cPage := .}}
- {{ $elements := (where .Sections "NONONO" false) }}
- {{ $isSubPage := .Params.subpage }}
- {{ $subpages := (where (where (where .Sections.ByWeight "Params.subpage" true) "Params.hidden" "ne" true ) "Kind" "section")}}
- {{ $pages := (where (where .CurrentSection.Pages.ByWeight "Kind" "page") "Params.hidden" "ne" true ) }}
-
- {{if $isSubPage }}
- <h1>{{.Parent.Title}}<span>{{$pagetitle}}</span></h1>
- {{else}}
- <h1>{{.CurrentSection.Title}}{{if .IsPage }}<span>{{$pagetitle}}</span>{{end}}</h1>
- {{end}}
-
- {{if gt (len $subpages) 0}} <!-- section has subpage -->
- {{ $elements = $subpages }}
- {{else if $isSubPage }} <!-- Section is subpage -->
- {{ $elements = (where (where .Parent.Sections.ByWeight "Params.subpage" true) "Params.hidden" "ne" true ) }}
- {{else if gt (len $pages) 0}} <!-- Section has pages -->
- {{ $elements = $pages }}
- {{else}}
- <!-- section has no subpage and is not subpage -->
- {{end}}
-
- {{ if gt (len $elements) 0}}
- <nav class="subpages">
- {{- range $elements}}
- {{- if not .Params.hidden }}
- {{$pagetitle := .Title}}
- {{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
- <li {{if eq . $cPage}}class="active"{{- end}}>
- <a title="$pagetitle" href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{$pagetitle}}{{safeHTML .Params.Post}}</a>
- </li>
- {{- end}}
- {{- end}}
- </nav>
- {{ end }}
-
+ <!-- FIL D'ARIANE -->
+ {{if not .Params.hide_breadcrumb}}
+ <nav id="breadcrumb" aria-label="breadcrumb">
+ <ol class="breadcrumb">
+ {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
+ </ol>
+ </nav>
+ {{end}}
+ <!-- FIN FIL D'ARIANE -->
+
+ <!-- TITRE -->
+ {{if not .Params.layout }}
+ {{$pagetitle := .Title}}
+ {{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
+
+ {{ $cPage := .}}
+ {{ $elements := (where .Sections "NONONO" false) }}
+ {{ $isSubPage := .Params.subpage }}
+ {{ $subpages := (where (where (where .Sections.ByWeight "Params.subpage" true) "Params.hidden" "ne" true ) "Kind" "section")}}
+ {{ $pages := (where (where .CurrentSection.Pages.ByWeight "Kind" "page") "Params.hidden" "ne" true ) }}
+
+ {{if $isSubPage }}
+ <h1>{{.Parent.Title}}<span>{{$pagetitle}}</span></h1>
+ {{else}}
+ <h1>{{.CurrentSection.Title}}{{if .IsPage }}<span>{{$pagetitle}}</span>{{end}}</h1>
+ {{end}}
+
+ {{if gt (len $subpages) 0}} <!-- section has subpage -->
+ {{ $elements = $subpages }}
+ {{else if $isSubPage }} <!-- Section is subpage -->
+ {{ $elements = (where (where .Parent.Sections.ByWeight "Params.subpage" true) "Params.hidden" "ne" true ) }}
+ {{else if gt (len $pages) 0}} <!-- Section has pages -->
+ {{ $elements = $pages }}
{{else}}
- <h1>{{.Title}}</h1>
+ <!-- section has no subpage and is not subpage -->
{{end}}
- <!-- FIN TITRE -->
- <!-- JUMP TO SECTION -->
- <div class="jump-to-section">
- <span onclick="$h = $(this);$h.next('nav').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('nav').is(':visible') ? 'material-icons expand_more' : 'material-icons chevron_right';});});">
- {{ T "jump-to-section"}}
- <i style=";" class="material-icons chevron_right"></i>
- </span>
- {{ .TableOfContents }}
- </div>
- <!-- / JUMP TO SECTION -->
+ {{ if gt (len $elements) 0}}
+ <nav class="subpages">
+ {{- range $elements}}
+ {{- if not .Params.hidden }}
+ {{$pagetitle := .Title}}
+ {{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
+ <li {{if eq . $cPage}}class="active"{{- end}}>
+ <a title="$pagetitle" href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{$pagetitle}}{{safeHTML .Params.Post}}</a>
+ </li>
+ {{- end}}
+ {{- end}}
+ </nav>
+ {{ end }}
-
-
-{{end}}
- <div class="content">
- {{- with .Content -}}
- {{ . | replaceRE "(<h[1-9]) id=\"([^\"]+)\"(.+)(</h[1-9]+>)" `${1}${3}${4}<a class="anchor" id="${2}"></a>` | safeHTML }}
- {{- else -}}
- {{with index .Pages 0}}
- <meta http-equiv = "refresh" content = "0; url = {{.RelPermalink}}"/>
- {{- else -}}
- No content
- {{- end -}}
- {{- end -}}
- </div>
-
-
- <div class="chevrons {{.Params.layout}}">
- {{ partial "_next-prev-page.html" .CurrentSection }}
- </div>
+ {{else}}
+ <h1>{{.Title}}</h1>
+ {{end}}
+ <!-- FIN TITRE -->
+
+ <!-- JUMP TO SECTION -->
+ {{if not .Params.hide_toc}}
+ <div class="jump-to-section">
+ <span onclick="$h = $(this);$h.next('nav').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('nav').is(':visible') ? 'material-icons expand_more' : 'material-icons chevron_right';});});">
+ {{ T "jump-to-section"}}
+ <i style=";" class="material-icons chevron_right"></i>
+ </span>
+ {{ .TableOfContents }}
+ </div>
+ {{end}}
+ <!-- / JUMP TO SECTION -->
+
+ <div class="content">
+ {{- with .Content -}}
+ {{ . | replaceRE "(<h[1-9]) id=\"([^\"]+)\"(.+)(</h[1-9]+>)" `${1}${3}${4}<a class="anchor" id="${2}"></a>` | safeHTML }}
+ {{- else -}}
+ {{with index .Pages 0}}
+ <meta http-equiv = "refresh" content = "0; url = {{.RelPermalink}}"/>
+ {{- else -}}
+ No content
+ {{- end -}}
+ {{- end -}}
+ </div>
+
+ {{if not .Params.hide_nextpage}}
+ <div class="chevrons {{.Params.layout}}">
+ {{ partial "_next-prev-page.html" .CurrentSection }}
+ </div>
+ {{end -}}
diff --git a/layouts/partials/body-header.html b/layouts/partials/body-header.html
index 531f3f1..97893a7 100644
--- a/layouts/partials/body-header.html
+++ b/layouts/partials/body-header.html
@@ -1,7 +1,9 @@
<div>
+ {{if not .Params.hide_nav}}
<div class="burger {{.Params.layout }}">
<a href="javascript:void(0);" style="font-size:15px;" onclick="$('article > aside').toggleClass('responsive')">&#9776;</a>
</div>
+ {{end}}
<div>
{{- $defaultheader := printf "<a class='baselink' href='%s'>%s</a>" .Site.BaseURL .Site.Title -}}
diff --git a/layouts/raw/single.html b/layouts/raw/single.html
new file mode 100644
index 0000000..68a09ae
--- /dev/null
+++ b/layouts/raw/single.html
@@ -0,0 +1 @@
+{{ .Content }}