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-09 00:53:46 +0300
committervjeantet <valere.jeantet@gmail.com>2020-09-09 00:53:46 +0300
commit0e20e8f94d4f10e351fef322641b1ed591c23631 (patch)
tree8f5459a6b8d58ae807900dc2c3c2ae4cd5817856
parent0718e95a986ea36a894f3659cb624d15cd8da7a2 (diff)
add actions on the right bar
-rw-r--r--assets/sass/main.scss15
-rw-r--r--exampleSite/config.toml3
-rw-r--r--exampleSite/content/shortcodes/icon/_index.md1
-rw-r--r--exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content60
-rw-r--r--i18n/en.toml5
-rw-r--r--i18n/fr.toml5
-rw-r--r--layouts/partials/body-article-content.html1
-rw-r--r--layouts/partials/body-article-sidepage.html47
-rw-r--r--layouts/partials/body-footer.html34
9 files changed, 97 insertions, 74 deletions
diff --git a/assets/sass/main.scss b/assets/sass/main.scss
index a0b4495..3abd3ce 100644
--- a/assets/sass/main.scss
+++ b/assets/sass/main.scss
@@ -133,9 +133,9 @@ body:not(.render_raw){
font-size:14px;
line-height:20px;
padding-left:2px;
-
- .TableOfContents {
-
+
+ > div {
+ margin-bottom: 2em;
> *{
margin-left:5px;
}
@@ -166,8 +166,8 @@ body:not(.render_raw){
}
li{
padding: 8px 0px 8px 0px;
+ font-weight:300;
a {
- font-weight:300;
/*padding-left: 2px;*/
&.active{
font-weight:500;
@@ -175,10 +175,13 @@ body:not(.render_raw){
}
}
-
}
- }
+ .Actions{
+ font-size: 75%;
+ }
+
+ }
}
footer {
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index e3eef02..93c7e78 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -32,7 +32,8 @@ disableSearch = false # default is false
disableNavChevron = false # set true to hide next/prev chevron, default is false
menushortcutsnewtab = false # set true to open shortcuts links to a new tab/window
-editURL = "https://github.com/vjeantet/hugo-theme-docport/edit/master/exampleSite/content/"
+#editURL = "https://github.com/vjeantet/hugo-theme-docport/edit/master/exampleSite/content/"
+editWithNetlifyCMSCollection = "pages"
enableGitInfo = true
diff --git a/exampleSite/content/shortcodes/icon/_index.md b/exampleSite/content/shortcodes/icon/_index.md
index 5dad302..921fd90 100644
--- a/exampleSite/content/shortcodes/icon/_index.md
+++ b/exampleSite/content/shortcodes/icon/_index.md
@@ -1,6 +1,7 @@
+++
title = "icon"
description = "Display an icon."
+date = 2020-09-08T20:40:23.389Z
+++
Display one of the 2 298 icons like
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 8bca67d..08a4f05 100644
--- a/exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content
+++ b/exampleSite/resources/_gen/assets/scss/sass/main.scss_9fd32d87d247ca96761d3cae485087fe.content
@@ -59,34 +59,38 @@ body:not(.render_raw) {
font-size: 14px;
line-height: 20px;
padding-left: 2px; }
- body:not(.render_raw) article section.right-menu .TableOfContents > * {
- margin-left: 5px; }
- body:not(.render_raw) article section.right-menu .TableOfContents label {
- font-weight: 700;
- letter-spacing: -1px;
- display: block;
- margin-bottom: 14px;
- border-bottom: 1px dotted #999999;
- color: #333333;
- font-variant: small-caps; }
- body:not(.render_raw) article section.right-menu .TableOfContents nav > ul {
- padding: 0px 0px 0px 0px;
- margin: 0px 0px 0px 0px; }
- 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:not(.render_raw) article section.right-menu .TableOfContents nav > ul ul li {
- font-size: 90%; }
- body:not(.render_raw) article section.right-menu .TableOfContents ul {
- list-style-type: none; }
- body:not(.render_raw) article section.right-menu .TableOfContents li {
- padding: 8px 0px 8px 0px; }
- body:not(.render_raw) article section.right-menu .TableOfContents li a {
- font-weight: 300;
- /*padding-left: 2px;*/ }
- body:not(.render_raw) article section.right-menu .TableOfContents li a.active {
- font-weight: 500; }
+ body:not(.render_raw) article section.right-menu > div {
+ margin-bottom: 2em; }
+ body:not(.render_raw) article section.right-menu > div > * {
+ margin-left: 5px; }
+ body:not(.render_raw) article section.right-menu > div label {
+ font-weight: 700;
+ letter-spacing: -1px;
+ display: block;
+ margin-bottom: 14px;
+ border-bottom: 1px dotted #999999;
+ color: #333333;
+ font-variant: small-caps; }
+ body:not(.render_raw) article section.right-menu > div nav > ul {
+ padding: 0px 0px 0px 0px;
+ margin: 0px 0px 0px 0px; }
+ body:not(.render_raw) article section.right-menu > div nav > ul ul {
+ padding: 0px 0px 0px 14px;
+ margin: 0px 0px 0px 0px;
+ border-left: 1px solid #e6e6e6; }
+ body:not(.render_raw) article section.right-menu > div nav > ul ul li {
+ font-size: 90%; }
+ body:not(.render_raw) article section.right-menu > div ul {
+ list-style-type: none; }
+ body:not(.render_raw) article section.right-menu > div li {
+ padding: 8px 0px 8px 0px;
+ font-weight: 300; }
+ body:not(.render_raw) article section.right-menu > div li a {
+ /*padding-left: 2px;*/ }
+ body:not(.render_raw) article section.right-menu > div li a.active {
+ font-weight: 500; }
+ body:not(.render_raw) article section.right-menu .Actions {
+ font-size: 75%; }
body:not(.render_raw) footer {
background-color: #333333;
color: #cccccc;
diff --git a/i18n/en.toml b/i18n/en.toml
index 56c7085..158d97a 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -48,4 +48,7 @@ other= "Home"
other= "Next page"
[table-of-contents]
-other= "What's on this page" \ No newline at end of file
+other= "What's on this page"
+
+[last-update-by]
+other = "Last update by" \ No newline at end of file
diff --git a/i18n/fr.toml b/i18n/fr.toml
index 84da357..cc78183 100644
--- a/i18n/fr.toml
+++ b/i18n/fr.toml
@@ -48,4 +48,7 @@ other= "Accueil"
other= "Contenu suivant"
[table-of-contents]
-other= "Contenu de la page" \ No newline at end of file
+other= "Contenu de la page"
+
+[last-update-by]
+other = "Dernière modification par " \ No newline at end of file
diff --git a/layouts/partials/body-article-content.html b/layouts/partials/body-article-content.html
index b1237bb..07b5f99 100644
--- a/layouts/partials/body-article-content.html
+++ b/layouts/partials/body-article-content.html
@@ -80,6 +80,7 @@
{{- end -}}
</div>
+
{{if not .Params.hide_nextpage}}
<div class="chevrons {{.Params.layout}}">
{{ partial "_next-prev-page.html" .CurrentSection }}
diff --git a/layouts/partials/body-article-sidepage.html b/layouts/partials/body-article-sidepage.html
index 5a4aa75..dead969 100644
--- a/layouts/partials/body-article-sidepage.html
+++ b/layouts/partials/body-article-sidepage.html
@@ -1,6 +1,4 @@
{{- partial "_mdinclude.html" (dict "name" "_layout/article-sidebar-before/_index" "context" .) -}}
-<div class="actions">
-</div>
<div class="TableOfContents">
<label>{{T "table-of-contents"}}</label>
<nav>
@@ -10,4 +8,47 @@
</nav>
{{ .TableOfContents }}
</div>
-{{- partial "_mdinclude.html" (dict "name" "_layout/article-sidebar-after/_index" "context" .) -}} \ No newline at end of file
+{{- partial "_mdinclude.html" (dict "name" "_layout/article-sidebar-after/_index" "context" .) -}}
+
+
+<div class="Actions">
+ <nav>
+ <ul>
+ {{ if .Site.Params.editURL }}
+ <li>
+ <a href="{{ .Site.Params.editURL }}{{with .File}}{{ replace .Dir "\\" "/" | safeURL }}{{ .LogicalName }}{{end}}" target="blank">
+ <i class="fab fa-github"></i>
+ {{T "Edit-this-page"}}
+ </a>
+ </li>
+ {{end}}
+
+ {{ if .Site.Params.editWithNetlifyCMSCollection }}
+ <li>
+ <a href="{{.Site.BaseURL}}/admin/#/collections/{{ .Site.Params.editWithNetlifyCMSCollection }}/entries/{{with .File}}{{ replace .Dir "\\" "/" | safeURL }}{{ .BaseFileName }}{{end}}" target="blank">
+ <i class="fab fa-github"></i>
+ {{T "Edit-this-page"}}</a>
+ </li>
+ {{end}}
+ {{ if not .Page.Lastmod.IsZero }}
+ <li>
+ <i class='fas fa-calendar'></i>
+ {{T "last-update-on"}} {{ .Page.Lastmod.Format "02 January 2006" }}
+ </li>
+ {{end}}
+ {{with .GitInfo}}
+ <li title="{{.AuthorDate}}">
+ <i class='fas fa-user'></i>
+ {{T "last-update-by"}} {{ .AuthorName }}
+ </li>
+ {{end}}
+
+
+
+
+
+
+ </ul>
+ </nav>
+
+</div> \ No newline at end of file
diff --git a/layouts/partials/body-footer.html b/layouts/partials/body-footer.html
index 214fbb3..157e877 100644
--- a/layouts/partials/body-footer.html
+++ b/layouts/partials/body-footer.html
@@ -1,38 +1,4 @@
-
- <div class="footline" style="display:none">
- {{if .Params.tags }}
- <div class="tags">
- {{ range $index, $tag := .Params.tags }}
- <a class="label label-default" href="{{$.Site.BaseURL}}tags/{{ $tag | urlize }}">
- {{ $tag }}
- </a>
- {{ end }}
- </div>
- {{end}}
-
- {{with .Params.LastModifierDisplayName}}
- <div class="author">
- <i class='fa fa-user'></i>
- <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a>
- </div>
- {{end}}
-
- {{ if not .Page.Lastmod.IsZero }}
- <div class="date">
- <i class='fa fa-calendar'></i>
- {{T "last-update-on"}} {{ .Page.Lastmod.Format "02/01/2006" }}
- </div>
- {{end}}
-
- {{ if .Site.Params.editURL }}
- <div class="github-link">
- <a href="{{ .Site.Params.editURL }}{{with .File}}{{ replace .Dir "\\" "/" }}{{ .LogicalName }}{{end}}" target="blank"><i class="fa fa-code-fork"></i>
- {{T "Edit-this-page"}}</a>
- </div>
- {{end}}
- </div>
{{- partial "_mdinclude.html" (dict "name" "_layout/footer/_index" "context" . "tip" (T "create-footer-md") ) -}}
-