#676, Add support for copytight hugo configuration
This commit is contained in:
+11
-1
@@ -37,6 +37,10 @@ img {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
small {
|
||||
@extend .text-small;
|
||||
}
|
||||
|
||||
:focus {
|
||||
@include outline;
|
||||
}
|
||||
@@ -315,10 +319,12 @@ body[dir="rtl"] .book-menu {
|
||||
font-size: $font-size-14;
|
||||
|
||||
a {
|
||||
margin: $padding-8 0;
|
||||
margin: $padding-4 0;
|
||||
padding: $padding-4 0;
|
||||
}
|
||||
|
||||
a.flex {
|
||||
display: inline-flex;
|
||||
gap: $padding-8;
|
||||
}
|
||||
}
|
||||
@@ -327,6 +333,10 @@ body[dir="rtl"] .book-menu {
|
||||
margin-top: $padding-16;
|
||||
}
|
||||
|
||||
.book-copyright {
|
||||
margin-top: $padding-16;
|
||||
}
|
||||
|
||||
.book-languages {
|
||||
margin-bottom: $padding-16;
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ baseURL = 'http://0.0.0.0:1313/hugo-book/'
|
||||
title = 'Hugo Book'
|
||||
theme = 'hugo-book'
|
||||
|
||||
copyright = '[© CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode)'
|
||||
|
||||
# Book configuration
|
||||
disablePathToLower = true
|
||||
enableGitInfo = true
|
||||
|
||||
@@ -4,6 +4,8 @@ baseURL: http://0.0.0.0:1313/hugo-book/
|
||||
title: Hugo Book
|
||||
theme: hugo-book
|
||||
|
||||
copyright: "[© CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode)"
|
||||
|
||||
# Book configuration
|
||||
disablePathToLower: true
|
||||
enableGitInfo: true
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<small>{{ .Site.Title }} - {{ .Site.Copyright | .RenderString }}</small>
|
||||
@@ -1,23 +1,23 @@
|
||||
<div class="flex flex-wrap justify-between">
|
||||
|
||||
{{ if and .GitInfo .Site.Params.BookLastChangeLink }}
|
||||
<div>
|
||||
{{ if and .GitInfo .Site.Params.BookLastChangeLink }}
|
||||
{{- $date := partial "docs/date" (dict "Date" .Lastmod "Format" .Site.Params.BookDateFormat) -}}
|
||||
<a class="flex align-center" href="{{ partial "docs/links/commit" . }}" title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date }}' target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="" />
|
||||
<span>{{ $date }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if and .File .Site.Params.BookEditLink }}
|
||||
<div>
|
||||
{{ if and .File .Site.Params.BookEditLink }}
|
||||
<a class="flex align-center" href="{{ partial "docs/links/edit" . }}" target="_blank" rel="noopener edit">
|
||||
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" />
|
||||
<span>{{ i18n "Edit this page" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<div class="flex flex-wrap justify-between">
|
||||
<span>
|
||||
<div>
|
||||
{{ with .NextInSection }}
|
||||
<a href="{{ .RelPermalink }}" class="flex align-center">
|
||||
<img src="{{ "svg/backward.svg" | relURL }}" class="book-icon" alt="Previous" title="{{ partial "docs/title" . }}" />
|
||||
<span>{{ partial "docs/title" . }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span>
|
||||
</div>
|
||||
<div>
|
||||
{{ with .PrevInSection }}
|
||||
<a href="{{ .RelPermalink }}" class="flex align-center">
|
||||
<span>{{ partial "docs/title" . }}</span>
|
||||
<img src="{{ "svg/forward.svg" | relURL }}" class="book-icon" alt="Next" title="{{ partial "docs/title" . }}" />
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
+10
-1
@@ -21,10 +21,11 @@
|
||||
|
||||
<footer class="book-footer">
|
||||
{{ template "footer" . }} <!-- Footer under page content -->
|
||||
{{ template "comments" . }} <!-- Comments block -->
|
||||
{{ partial "docs/inject/footer" . }}
|
||||
{{ template "copyright" . }} <!-- Copyright block -->
|
||||
</footer>
|
||||
|
||||
{{ template "comments" . }} <!-- Comments block -->
|
||||
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
||||
</div>
|
||||
|
||||
@@ -61,6 +62,14 @@
|
||||
{{ partial "docs/footer" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "copyright" }}
|
||||
{{ if .Site.Copyright }}
|
||||
<div class="book-copyright flex justify-center">
|
||||
{{ partial "docs/copyright" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "comments" }}
|
||||
{{ if and .Content (default true (default .Site.Params.BookComments .Params.BookComments)) }}
|
||||
<div class="book-comments">
|
||||
|
||||
Reference in New Issue
Block a user