mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-07-16 19:51:22 +00:00
Merge c8e2f85fa1
into f2c703e155
This commit is contained in:
commit
3870bfef96
@ -186,6 +186,13 @@ disableKinds = ['taxonomy', 'taxonomyTerm']
|
|||||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||||
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
|
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
|
||||||
BookServiceWorker = true
|
BookServiceWorker = true
|
||||||
|
|
||||||
|
# (Optional) Specifies a License that applies to the content of the page
|
||||||
|
# BookContentLicenseText = 'CC-BY-SA-4.0'
|
||||||
|
|
||||||
|
# (Optional) Specifies a Link for the License that applies to the content of the page
|
||||||
|
# Requires 'BookContentLicenseText' param.
|
||||||
|
# BookContentLicenseLink = 'https://creativecommons.org/licenses/by-sa/4.0/'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Multi-Language Support
|
### Multi-Language Support
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-gap {
|
||||||
|
gap: $padding-16;
|
||||||
|
}
|
||||||
|
|
||||||
.justify-start {
|
.justify-start {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
@ -117,3 +117,10 @@ enableGitInfo = true
|
|||||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||||
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
|
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
|
||||||
BookTranslatedOnly = false
|
BookTranslatedOnly = false
|
||||||
|
|
||||||
|
# (Optional) Specifies a License that applies to the content of the page
|
||||||
|
# BookContentLicenseText = 'CC-BY-SA-4.0'
|
||||||
|
|
||||||
|
# (Optional) Specifies a Link for the License that applies to the content of the page
|
||||||
|
# Requires 'BookContentLicenseText' param.
|
||||||
|
# BookContentLicenseLink = 'https://creativecommons.org/licenses/by-sa/4.0/'
|
||||||
|
@ -113,3 +113,10 @@ params:
|
|||||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||||
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
|
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
|
||||||
BookTranslatedOnly: false
|
BookTranslatedOnly: false
|
||||||
|
|
||||||
|
# (Optional) Specifies a License that applies to the content of the page
|
||||||
|
# BookContentLicenseText: CC-BY-SA-4.0
|
||||||
|
|
||||||
|
# (Optional) Specifies a Link for the License that applies to the content of the page
|
||||||
|
# Requires 'BookContentLicenseText' param.
|
||||||
|
# BookContentLicenseLink: https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="flex flex-wrap justify-between">
|
<div class="flex flex-wrap flex-gap justify-between">
|
||||||
|
|
||||||
{{ if and .GitInfo .Site.Params.BookRepo }}
|
{{ if and .GitInfo .Site.Params.BookRepo }}
|
||||||
<div>
|
<div>
|
||||||
@ -19,6 +19,22 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if and .File .Site.Params.BookContentLicenseText }}
|
||||||
|
<div>
|
||||||
|
{{ if and .File .Site.Params.BookContentLicenseLink }}
|
||||||
|
<a class="flex align-center" href="{{ .Site.Params.BookContentLicenseLink }}" title='License' target="_blank" rel="noopener">
|
||||||
|
<img src="{{ "svg/license.svg" | relURL }}" class="book-icon" alt="" />
|
||||||
|
<span>{{ .Site.Params.BookContentLicenseText }}</span>
|
||||||
|
</a>
|
||||||
|
{{ else }}
|
||||||
|
<span>
|
||||||
|
<img src="{{ "svg/license.svg" | relURL }}" class="book-icon" alt="" />
|
||||||
|
{{ .Site.Params.BookContentLicenseText }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $script := resources.Get "clipboard.js" | resources.Minify }}
|
{{ $script := resources.Get "clipboard.js" | resources.Minify }}
|
||||||
|
4
static/svg/license.svg
Normal file
4
static/svg/license.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M4 19V6.2C4 5.0799 4 4.51984 4.21799 4.09202C4.40973 3.71569 4.71569 3.40973 5.09202 3.21799C5.51984 3 6.0799 3 7.2 3H16.8C17.9201 3 18.4802 3 18.908 3.21799C19.2843 3.40973 19.5903 3.71569 19.782 4.09202C20 4.51984 20 5.0799 20 6.2V17H6C4.89543 17 4 17.8954 4 19ZM4 19C4 20.1046 4.89543 21 6 21H20M9 7H15M9 11H15M19 17V21" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 642 B |
Loading…
Reference in New Issue
Block a user