mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aad1335523 | ||
![]() |
a216b26857 | ||
![]() |
2c121c6cde | ||
![]() |
2bc4ff0233 | ||
![]() |
a76c80ba17 | ||
![]() |
6580955770 | ||
![]() |
38d6c01983 | ||
![]() |
af2ba38a86 | ||
![]() |
0242d388b5 | ||
![]() |
5a78dda34f | ||
![]() |
8564e3e2fc | ||
![]() |
913c6ad158 | ||
![]() |
5e676ee5fa | ||
![]() |
f1b4e556c4 | ||
![]() |
9856b670e6 | ||
![]() |
88ff187891 | ||
![]() |
5c54291eb8 | ||
![]() |
2a862034aa | ||
![]() |
56e0713582 | ||
![]() |
23a3f7ef71 | ||
![]() |
3418ac8d1d | ||
![]() |
c645024474 | ||
![]() |
f35c66c0ae | ||
![]() |
f479764542 | ||
![]() |
ab7cc04821 | ||
![]() |
6dd208f671 | ||
![]() |
833e438a23 | ||
![]() |
9d829b6d94 | ||
![]() |
0f42fae2c4 | ||
![]() |
a2f7749aa2 | ||
![]() |
ba87ccd4a5 | ||
![]() |
1c68399313 | ||
![]() |
30714ef6da | ||
![]() |
1ef92a0928 | ||
![]() |
8331a6ce7c | ||
![]() |
fd34766ffb | ||
![]() |
78573f8e51 | ||
![]() |
4a0cc8bc88 | ||
![]() |
8fd6f2af4e | ||
![]() |
0191e14a69 | ||
![]() |
1f8fb26278 | ||
![]() |
50548237c6 | ||
![]() |
7f35cf45ef |
@@ -1,5 +1,6 @@
|
|||||||
assets/js/critical/color.js
|
assets/js/critical/color.js
|
||||||
assets/js/analytics.js
|
assets/js/analytics.js
|
||||||
assets/js/flexsearch.js
|
assets/js/flexsearch.js
|
||||||
|
assets/js/sharing.js
|
||||||
assets/js/vendor
|
assets/js/vendor
|
||||||
node_modules
|
node_modules
|
||||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
node-version: [14.x, 16.x, 18.x]
|
node-version: [16.x, 18.x, 20.x]
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 16.x, 18.x]
|
node-version: [16.x, 18.x, 20.x]
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
const activeSelectors = document.querySelectorAll('.theme-icon-active')
|
const activeSelectors = document.querySelectorAll('.theme-icon-active')
|
||||||
const activeButtons = document.querySelectorAll(`[data-bs-theme-value="${theme}"]`)
|
const activeButtons = document.querySelectorAll(`[data-bs-theme-value="${theme}"]`)
|
||||||
if (activeButtons.length > 0) {
|
if (activeButtons.length > 0) {
|
||||||
const activeIcon = activeButtons[0].querySelector('i')
|
const activeIcon = activeButtons[0].querySelector('span')
|
||||||
|
|
||||||
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
||||||
element.classList.remove('active')
|
element.classList.remove('active')
|
||||||
|
36
assets/js/sharing.js
Normal file
36
assets/js/sharing.js
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{{- if site.Params.sharing.webshare -}}
|
||||||
|
|
||||||
|
// Adapted from: https://dev.to/j471n/how-to-share-anything-from-your-website-by-web-share-api-1h5g
|
||||||
|
|
||||||
|
// function for Web Share API
|
||||||
|
function webShareAPI (title, description, link) {
|
||||||
|
navigator
|
||||||
|
.share({
|
||||||
|
title,
|
||||||
|
text: description,
|
||||||
|
url: link
|
||||||
|
})
|
||||||
|
.then(() => console.log('Successful share'))
|
||||||
|
.catch((error) => console.log('Error sharing', error))
|
||||||
|
}
|
||||||
|
|
||||||
|
const shareBtn = document.getElementById('btn-webshare')
|
||||||
|
|
||||||
|
if (shareBtn !== null) {
|
||||||
|
if (navigator.share) {
|
||||||
|
const title = shareBtn.getAttribute('data-sharing-title')
|
||||||
|
const description = shareBtn.getAttribute('data-sharing-description')
|
||||||
|
const url = shareBtn.getAttribute('data-sharing-url')
|
||||||
|
|
||||||
|
// show button if it supports webShareAPI
|
||||||
|
shareBtn.style.display = 'block'
|
||||||
|
shareBtn.addEventListener('click', () =>
|
||||||
|
webShareAPI(title, description, url)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
// hide button if host does not support Web Share API
|
||||||
|
shareBtn.style.display = 'none'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{{- end -}}
|
@@ -32,19 +32,19 @@
|
|||||||
|
|
||||||
[[social]]
|
[[social]]
|
||||||
name = "LinkedIn"
|
name = "LinkedIn"
|
||||||
pre = "<i class=\"fab fa-linkedin fa-2x\"></i>"
|
pre = "fab linkedin"
|
||||||
url = "https://linkedin.com/"
|
url = "https://linkedin.com/"
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|
||||||
[[social]]
|
[[social]]
|
||||||
name = "GitHub"
|
name = "GitHub"
|
||||||
pre = "<i class=\"fab fa-github fa-2x\"></i>"
|
pre = "fab fa-github"
|
||||||
url = "https://github.com/"
|
url = "https://github.com/"
|
||||||
weight = 20
|
weight = 20
|
||||||
|
|
||||||
[[social]]
|
[[social]]
|
||||||
name = "Medium"
|
name = "Medium"
|
||||||
pre = "<i class=\"fab fa-medium fa-2x\"></i>"
|
pre = "fab medium"
|
||||||
url = "https://medium.com/"
|
url = "https://medium.com/"
|
||||||
weight = 30
|
weight = 30
|
||||||
|
|
||||||
|
@@ -32,19 +32,19 @@
|
|||||||
|
|
||||||
[[social]]
|
[[social]]
|
||||||
name = "LinkedIn"
|
name = "LinkedIn"
|
||||||
pre = "<i class=\"fab fa-linkedin fa-2x\"></i>"
|
pre = "fab linkedin"
|
||||||
url = "https://linkedin.com/"
|
url = "https://linkedin.com/"
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|
||||||
[[social]]
|
[[social]]
|
||||||
name = "GitHub"
|
name = "GitHub"
|
||||||
pre = "<i class=\"fab fa-github fa-2x\"></i>"
|
pre = "fab github"
|
||||||
url = "https://github.com/"
|
url = "https://github.com/"
|
||||||
weight = 20
|
weight = 20
|
||||||
|
|
||||||
[[social]]
|
[[social]]
|
||||||
name = "Medium"
|
name = "Medium"
|
||||||
pre = "<i class=\"fab fa-medium fa-2x\"></i>"
|
pre = "fab medium"
|
||||||
url = "https://medium.com/"
|
url = "https://medium.com/"
|
||||||
weight = 30
|
weight = 30
|
||||||
|
|
||||||
|
@@ -5,6 +5,9 @@
|
|||||||
enableDarkMode = true
|
enableDarkMode = true
|
||||||
modes = ["light", "dark"]
|
modes = ["light", "dark"]
|
||||||
canonifyAssetsURLs = false
|
canonifyAssetsURLs = false
|
||||||
|
[main.externalLinks]
|
||||||
|
cue = false
|
||||||
|
tab = false
|
||||||
# toml-docs-end main
|
# toml-docs-end main
|
||||||
|
|
||||||
# toml-docs-start modules
|
# toml-docs-start modules
|
||||||
@@ -13,6 +16,10 @@
|
|||||||
optional = ["leaflet", "katex"]
|
optional = ["leaflet", "katex"]
|
||||||
excludeSCSS = ["bootstrap"]
|
excludeSCSS = ["bootstrap"]
|
||||||
disableTemplate = ["katex"]
|
disableTemplate = ["katex"]
|
||||||
|
[modules.fontawesome]
|
||||||
|
inline = true
|
||||||
|
debug = true
|
||||||
|
skipMissing = false
|
||||||
# toml-docs-end modules
|
# toml-docs-end modules
|
||||||
|
|
||||||
# toml-docs-start debugging
|
# toml-docs-start debugging
|
||||||
@@ -60,6 +67,7 @@
|
|||||||
enabled = true
|
enabled = true
|
||||||
sort = "weight"
|
sort = "weight"
|
||||||
reverse = false
|
reverse = false
|
||||||
|
webshare = true
|
||||||
|
|
||||||
[[sharing.providers]]
|
[[sharing.providers]]
|
||||||
name = "LinkedIn"
|
name = "LinkedIn"
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
title: About
|
title: About
|
||||||
description: Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
|
description: Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
|
||||||
date: 2022-04-11
|
date: 2022-04-11
|
||||||
updated: 2023-06-26
|
updated: 2023-08-02
|
||||||
showComments: false
|
showComments: false
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -12,17 +12,17 @@ showComments: false
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row justify-content-center text-center">
|
<div class="row justify-content-center text-center">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<i class="fa-brands fa-bootstrap fa-2xl"></i>
|
{{< icon fab bootstrap fa-2xl >}}
|
||||||
<h2 class="h4">Bootstrap framework</h2>
|
<h2 class="h4">Bootstrap framework</h2>
|
||||||
<p>Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source Sass files.</p>
|
<p>Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source Sass files.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<i class="fa-solid fa-magnifying-glass fa-2xl"></i>
|
{{< icon fas magnifying-glass fa-2xl >}}
|
||||||
<h2 class="h4">Full text search</h2>
|
<h2 class="h4">Full text search</h2>
|
||||||
<p>Search your site with FlexSearch, a full-text search library with zero dependencies.</p>
|
<p>Search your site with FlexSearch, a full-text search library with zero dependencies.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<i class="fa-solid fa-code fa-2xl"></i>
|
{{< icon fas code fa-2xl >}}
|
||||||
<h2 class="h4">Development tools</h2>
|
<h2 class="h4">Development tools</h2>
|
||||||
<p>Use Node Package Manager to automate the build process and to keep track of dependencies.</p>
|
<p>Use Node Package Manager to automate the build process and to keep track of dependencies.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,7 +3,7 @@ slug: over-mij
|
|||||||
title: Over mij
|
title: Over mij
|
||||||
description: Een blog en documentatie thema voor Hugo gebaseerd op Bootstrap 5.
|
description: Een blog en documentatie thema voor Hugo gebaseerd op Bootstrap 5.
|
||||||
date: 2023-02-17
|
date: 2023-02-17
|
||||||
updated: 2023-06-26
|
updated: 2023-08-02
|
||||||
showComments: false
|
showComments: false
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -14,17 +14,17 @@ showComments: false
|
|||||||
<div class="row justify-content-center text-center">
|
<div class="row justify-content-center text-center">
|
||||||
<div class="row justify-content-center text-center">
|
<div class="row justify-content-center text-center">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<i class="fa-brands fa-bootstrap fa-2xl"></i>
|
{{< icon fab bootstrap fa-2xl >}}
|
||||||
<h2 class="h4">Bootstrap raamwerk</h2>
|
<h2 class="h4">Bootstrap raamwerk</h2>
|
||||||
<p>Bouw snelle websites geschikt voor mobiele en desktop schermen met Bootstrap 5. Pas de site eenvoudig aan met bronbestanden in Sass.</p>
|
<p>Bouw snelle websites geschikt voor mobiele en desktop schermen met Bootstrap 5. Pas de site eenvoudig aan met bronbestanden in Sass.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<i class="fa-solid fa-magnifying-glass fa-2xl"></i>
|
{{< icon fas magnifying-glass fa-2xl >}}
|
||||||
<h2 class="h4">Volledig doorzoekbaar</h2>
|
<h2 class="h4">Volledig doorzoekbaar</h2>
|
||||||
<p>Doorzoek je site met FlexSearch, een software bibliotheek zonder afhankelijkheden.</p>
|
<p>Doorzoek je site met FlexSearch, een software bibliotheek zonder afhankelijkheden.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<i class="fa-solid fa-code fa-2xl"></i>
|
{{< icon fas code fa-2xl >}}
|
||||||
<h2 class="h4">Ontwikkelgereedschap</h2>
|
<h2 class="h4">Ontwikkelgereedschap</h2>
|
||||||
<p>Gebruik Node Package Manager om het bouwproces inclusief versiebeheer volledig te automatiseren.</p>
|
<p>Gebruik Node Package Manager om het bouwproces inclusief versiebeheer volledig te automatiseren.</p>
|
||||||
</div>
|
</div>
|
||||||
|
2
go.mod
2
go.mod
@@ -5,7 +5,7 @@ go 1.19
|
|||||||
require (
|
require (
|
||||||
github.com/gethinode/mod-bootstrap v1.1.1 // indirect
|
github.com/gethinode/mod-bootstrap v1.1.1 // indirect
|
||||||
github.com/gethinode/mod-flexsearch v1.1.4 // indirect
|
github.com/gethinode/mod-flexsearch v1.1.4 // indirect
|
||||||
github.com/gethinode/mod-fontawesome v1.2.1 // indirect
|
github.com/gethinode/mod-fontawesome v1.2.2 // indirect
|
||||||
github.com/gethinode/mod-katex v1.0.2 // indirect
|
github.com/gethinode/mod-katex v1.0.2 // indirect
|
||||||
github.com/gethinode/mod-leaflet v0.3.3 // indirect
|
github.com/gethinode/mod-leaflet v0.3.3 // indirect
|
||||||
)
|
)
|
||||||
|
2
go.sum
2
go.sum
@@ -24,6 +24,8 @@ github.com/gethinode/mod-fontawesome v1.2.0 h1:2nWYEjpUKu6IJ6kOh2WDlDUqRQ/dUGw6m
|
|||||||
github.com/gethinode/mod-fontawesome v1.2.0/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
github.com/gethinode/mod-fontawesome v1.2.0/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
github.com/gethinode/mod-fontawesome v1.2.1 h1:k7z5ZRsNxCohZjlZm8jVAzmTPk17c6xMYBAjAXHs13I=
|
github.com/gethinode/mod-fontawesome v1.2.1 h1:k7z5ZRsNxCohZjlZm8jVAzmTPk17c6xMYBAjAXHs13I=
|
||||||
github.com/gethinode/mod-fontawesome v1.2.1/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
github.com/gethinode/mod-fontawesome v1.2.1/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.2.2 h1:rA9EtuE/LeFQmKSA7ampfUknxsR1mu7hpi4wpA89gX8=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.2.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
||||||
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<div class="container-xxl flex-fill d-flex align-content-center flex-wrap">
|
<div class="container-xxl flex-fill d-flex align-content-center flex-wrap">
|
||||||
<div class="w-100 text-center">
|
<div class="w-100 text-center">
|
||||||
<span class="text-secondary fw-bold">
|
<span class="text-secondary fw-bold">
|
||||||
<i class="fa-regular fa-face-frown fa-10x"></i>
|
{{ partial "assets/icon.html" (dict "icon" "fa face-frown fa-10x") }}
|
||||||
<p class="display-1 mt-3 fw-bold">404</p>
|
<p class="display-1 mt-3 fw-bold">404</p>
|
||||||
<p class="fs-3">{{ T "pageNotFoundTitle" }}</p>
|
<p class="fs-3">{{ T "pageNotFoundTitle" }}</p>
|
||||||
</span>
|
</span>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{{ if site.Params.navigation.anchor }}
|
{{ if site.Params.navigation.anchor }}
|
||||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}"><i class="fa-solid fa-link anchor"></i></a></h{{ .Level }}>
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}">{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}</a></h{{ .Level }}>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ .Level }}>
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ .Level }}>
|
||||||
{{ end }}
|
{{ end }}
|
@@ -67,7 +67,8 @@
|
|||||||
{{ with .NextInSection -}}
|
{{ with .NextInSection -}}
|
||||||
{{ $next := . -}}
|
{{ $next := . -}}
|
||||||
{{ with .OutputFormats.Get "html" -}}
|
{{ with .OutputFormats.Get "html" -}}
|
||||||
<a class="next" href="{{ $next.RelPermalink }}"><i class="fas fa-arrow-left"></i> {{ $next.Title }}</a>
|
<a class="next" href="{{ $next.RelPermalink }}">
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" "fas arrow-left") }} {{ $next.Title }}</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
{{ with .PrevInSection -}}
|
{{ with .PrevInSection -}}
|
||||||
{{ $prev := . -}}
|
{{ $prev := . -}}
|
||||||
{{ with .OutputFormats.Get "html" -}}
|
{{ with .OutputFormats.Get "html" -}}
|
||||||
<a class="previous" href="{{ $prev.RelPermalink }}">{{ $prev.Title }} <i class="fas fa-arrow-right"></i></a>
|
<a class="previous" href="{{ $prev.RelPermalink }}">{{ $prev.Title }} {{- partial "assets/icon.html" (dict "icon" "fas arrow-right") }}</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -22,6 +22,11 @@
|
|||||||
"between", "around", or "evenly".
|
"between", "around", or "evenly".
|
||||||
"toast" Optional id of the toast to display when the button is clicked.
|
"toast" Optional id of the toast to display when the button is clicked.
|
||||||
"clipboard" Optional text to be copied to the clipboard when the button is clicked.
|
"clipboard" Optional text to be copied to the clipboard when the button is clicked.
|
||||||
|
"cue" Optional flag to indicate if an external link should show a visual cue, defaults to setting
|
||||||
|
"main.externalLinks.cue" in the site's parameters.
|
||||||
|
"tab" Optional flag to indicate if an external link should open in a new tab, defaults to setting
|
||||||
|
"main.externalLinks.tab" in the site's parameters.
|
||||||
|
"attributes" Optional dictionary of key-value pairs added as custom attributes to the button element ('<a>').
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{{- $title := trim .title " \r\n" -}}
|
{{- $title := trim .title " \r\n" -}}
|
||||||
@@ -95,6 +100,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $class := .class }}
|
{{- $class := .class }}
|
||||||
|
{{ with $badge }}{{ $class = printf "%s me-3" $class }}{{ end }}
|
||||||
|
|
||||||
{{- $order := "last" -}}
|
{{- $order := "last" -}}
|
||||||
{{- with .order }}{{ $order = . }}{{ end -}}
|
{{- with .order }}{{ $order = . }}{{ end -}}
|
||||||
@@ -113,8 +119,29 @@
|
|||||||
{{- $toast := .toast -}}
|
{{- $toast := .toast -}}
|
||||||
{{- $clipboard := .clipboard -}}
|
{{- $clipboard := .clipboard -}}
|
||||||
|
|
||||||
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
|
{{- $isExternal := ne (urls.Parse (absURL $href)).Host (urls.Parse site.BaseURL).Host -}}
|
||||||
|
{{- $target := "" -}}
|
||||||
|
{{- $rel := "" -}}
|
||||||
|
|
||||||
|
{{- if $isExternal -}}
|
||||||
|
{{- if $tab -}}
|
||||||
|
{{- $target = "_blank" -}}
|
||||||
|
{{- $rel = "noopener noreferrer" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if and $title $cue -}}
|
||||||
|
{{ $suffix := partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
|
||||||
|
{{- $title = printf "%s %s" $title $suffix | safeHTML -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $attributes := .attributes -}}
|
||||||
|
|
||||||
<a aria-label="{{ $title }}" {{ if ne $state "disabled" }}{{ with $href }}href="{{ . }}"{{ end }}{{ end }}
|
<a aria-label="{{ $title }}" {{ if ne $state "disabled" }}{{ with $href }}href="{{ . }}"{{ end }}{{ end }}
|
||||||
{{ with $id }}id="{{ . }}"{{ end }}
|
{{ with $id }}id="{{ . }}"{{ end }}
|
||||||
|
{{ with $target }}target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end }}
|
||||||
{{ with $toast }}data-toast-target="{{ $toast }}"{{ end }}
|
{{ with $toast }}data-toast-target="{{ $toast }}"{{ end }}
|
||||||
{{ with $clipboard }}data-clipboard="{{ $clipboard }}"{{ end }}
|
{{ with $clipboard }}data-clipboard="{{ $clipboard }}"{{ end }}
|
||||||
{{ if eq $type "button" }}class="btn btn-{{ if $outline }}outline-{{ end }}{{ $color }} {{ if ne $size "md"}}btn-{{ $size }}{{ end }} position-relative {{ if in (slice "disabled" "active") $state }}{{ $state }}{{ end }} {{ $class }}"
|
{{ if eq $type "button" }}class="btn btn-{{ if $outline }}outline-{{ end }}{{ $color }} {{ if ne $size "md"}}btn-{{ $size }}{{ end }} position-relative {{ if in (slice "disabled" "active") $state }}{{ $state }}{{ end }} {{ $class }}"
|
||||||
@@ -124,11 +151,14 @@
|
|||||||
{{ with $collapse }}data-bs-toggle="collapse" aria-expanded="false" aria-controls="{{ . }}"{{ end }}
|
{{ with $collapse }}data-bs-toggle="collapse" aria-expanded="false" aria-controls="{{ . }}"{{ end }}
|
||||||
{{ if eq $state "active" }}data-bs-toggle="button" aria-pressed="true"{{ end }}
|
{{ if eq $state "active" }}data-bs-toggle="button" aria-pressed="true"{{ end }}
|
||||||
{{ if eq $state "inactive" }}data-bs-toggle="button" aria-pressed="false"{{ end }}
|
{{ if eq $state "inactive" }}data-bs-toggle="button" aria-pressed="false"{{ end }}
|
||||||
|
{{ range $key, $val := $attributes }}
|
||||||
|
{{ print $key | safeHTMLAttr }}="{{ $val }}"
|
||||||
|
{{ end }}
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="d-flex justify-content-{{ $justify }}">
|
<div class="d-flex justify-content-{{ $justify }}">
|
||||||
<div>{{ $title }}</div>
|
<div class="my-auto">{{ $title }}</div>
|
||||||
{{- with $icon }}<div class="align-self-center{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon) }}</div>{{ end }}
|
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon) }}</div>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- with $badge }}
|
{{- with $badge }}
|
||||||
|
@@ -9,12 +9,24 @@
|
|||||||
{{- $isActive := hasPrefix $pageURL $menuURL -}}
|
{{- $isActive := hasPrefix $pageURL $menuURL -}}
|
||||||
{{- $isAlias := $menu.Params.alias -}}
|
{{- $isAlias := $menu.Params.alias -}}
|
||||||
{{- $isIcon := $menu.Params.icon -}}
|
{{- $isIcon := $menu.Params.icon -}}
|
||||||
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
|
|
||||||
{{- $url := urls.Parse $menuURL -}}
|
{{- $url := urls.Parse $menuURL -}}
|
||||||
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
||||||
{{- $isExternal := ne $url.Host $baseURL.Host -}}
|
{{- $isExternal := ne $url.Host $baseURL.Host -}}
|
||||||
{{- $externalHref := "" }}
|
{{- $externalHref := "" }}
|
||||||
{{- if $isExternal }}{{ $externalHref = "target=\"_blank\" rel=\"noopener noreferrer\"" }}{{ end -}}
|
{{- $suffix := "" }}
|
||||||
|
|
||||||
|
{{- if $isExternal }}
|
||||||
|
{{- if $tab -}}
|
||||||
|
{{ $externalHref = "target=\"_blank\" rel=\"noopener noreferrer\"" }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if $cue -}}
|
||||||
|
{{ $suffix = partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
|
||||||
|
{{- end -}}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
{{- $mainNav := urlize (lower $menu.Name) -}}
|
{{- $mainNav := urlize (lower $menu.Name) -}}
|
||||||
{{- $childNav := "" -}}
|
{{- $childNav := "" -}}
|
||||||
@@ -44,5 +56,5 @@
|
|||||||
{{- with $menu.Pre }}{{ . }}{{ end -}}
|
{{- with $menu.Pre }}{{ . }}{{ end -}}
|
||||||
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
||||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||||
{{- if and $isExternal (not $isIcon)}} {{ partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}{{ end -}}
|
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
||||||
</a>
|
</a>
|
||||||
|
@@ -21,26 +21,26 @@
|
|||||||
{{- $collapsed := .collapsed -}}
|
{{- $collapsed := .collapsed -}}
|
||||||
|
|
||||||
<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
|
<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
|
||||||
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="navbar-color-theme">
|
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="navbar-color-theme{{ if $collapsed }}-collapsed{{ end }}">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas sun theme-icon-active") }} {{ if $collapsed }} {{ T "colorMode" }} {{ end }}
|
<span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }} {{ if $collapsed }} {{ T "colorMode" }} {{ end }}</span>
|
||||||
<span class="d-md-none"></span>
|
<span class="d-md-none"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbar-color-theme">
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbar-color-theme{{ if $collapsed }}-collapsed{{ end }}">
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="light" href="#!">
|
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="light" href="#!">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas sun theme-icon") }}
|
<span class="theme-icon">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>
|
||||||
{{ T "colorLight" }}
|
{{ T "colorLight" }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="dark" href="#!">
|
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="dark" href="#!">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas moon theme-icon") }}
|
<span class="theme-icon">{{- partial "assets/icon.html" (dict "icon" "fas moon fa-fw") }}</span>
|
||||||
{{ T "colorDark" }}
|
{{ T "colorDark" }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="auto" href="#!">
|
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="auto" href="#!">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas circle-half-stroke theme-icon" ) }}
|
<span class="theme-icon">{{- partial "assets/icon.html" (dict "icon" "fas circle-half-stroke fa-fw" ) }}</span>
|
||||||
{{ T "colorAuto" }}
|
{{ T "colorAuto" }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<a class="pe-5 dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}{{ if $active }} active{{ end }}{{ if $disabled }} disabled{{ end }}" href="{{ $url }}">{{ $item.label }}
|
<a class="pe-5 dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}{{ if $active }} active{{ end }}{{ if $disabled }} disabled{{ end }}" href="{{ $url }}">{{ $item.label }}
|
||||||
{{ if $item.latest }} ({{ T "latest" }}){{ end }}
|
{{ if $item.latest }} ({{ T "latest" }}){{ end }}
|
||||||
{{ if $active }}
|
{{ if $active }}
|
||||||
<span class="position-absolute end-0 me-3">{{- partial "assets/icon.html" (dict "icon" "fas check") }}</span>
|
<span class="position-absolute end-0 me-3">{{- partial "assets/icon.html" (dict "icon" "fas check fa-fw") }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -193,12 +193,12 @@
|
|||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{{- if $page.Scratch.Get "sidebar" -}}
|
{{- if $page.Scratch.Get "sidebar" -}}
|
||||||
<button class="navbar-toggler fw-30 collapsed p-0 mx-auto" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvass-sidebar" aria-controls="offcanvass-sidebar" aria-label="{{ T "toggleSidebar" }}">
|
<button class="navbar-toggler fw-30 collapsed p-0 mx-auto" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvass-sidebar" aria-controls="offcanvass-sidebar" aria-label="{{ T "toggleSidebar" }}">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas ellipsis") -}}
|
{{- partial "assets/icon.html" (dict "icon" "fas ellipsis fa-fw") -}}
|
||||||
</button>
|
</button>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<!-- Insert invisible sidebar toggler to center logo correctly on smaller screens -->
|
<!-- Insert invisible sidebar toggler to center logo correctly on smaller screens -->
|
||||||
<button class="navbar-toggler fw-30 collapsed p-0 mx-auto invisible" type="button">
|
<button class="navbar-toggler fw-30 collapsed p-0 mx-auto invisible" type="button">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas ellipsis") -}}
|
{{- partial "assets/icon.html" (dict "icon" "fas ellipsis fa-fw") -}}
|
||||||
</button>
|
</button>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
@@ -254,10 +254,10 @@
|
|||||||
{{- $currentLang := $page.Language.Lang -}}
|
{{- $currentLang := $page.Language.Lang -}}
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas globe") }} {{ T "languageSwitcherLabel" }}
|
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw") }} {{ T "languageSwitcherLabel" }}
|
||||||
</a>
|
</a>
|
||||||
<a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas globe") }}
|
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw") }}
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-end ">
|
<ul class="dropdown-menu dropdown-menu-end ">
|
||||||
{{- if $page.IsTranslated -}}
|
{{- if $page.IsTranslated -}}
|
||||||
|
@@ -41,22 +41,22 @@
|
|||||||
{{- with .First }}
|
{{- with .First }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Prev }}
|
{{- with .Prev }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-left"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-left") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-left"></i></span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-left") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -81,22 +81,22 @@
|
|||||||
|
|
||||||
{{- with .Next }}
|
{{- with .Next }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-right"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-right") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationNext" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-right"></i></span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationNext" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-right") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Last }}
|
{{- with .Last }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationLast" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationLast" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -112,14 +112,14 @@
|
|||||||
{{- with .First }}
|
{{- with .First }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Prev }}
|
{{- with .Prev }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-left"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-left") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -144,14 +144,14 @@
|
|||||||
|
|
||||||
{{- with .Next }}
|
{{- with .Next }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-right"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-right") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Last }}
|
{{- with .Last }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -23,6 +23,10 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" (printf "%s fa-fw" $item.icon) "class" "btn-social p-0" )}}
|
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" (printf "%s fa-fw" $item.icon) "class" "btn-social p-0" )}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{ if .Site.Params.sharing.webshare }}
|
||||||
|
{{ $attr := dict "data-sharing-title" .Title "data-sharing-description" .Description "data-sharing-url" .Permalink }}
|
||||||
|
{{ partial "assets/button.html" (dict "href" "#!" "icon" "fas share-nodes fa-fw" "id" "btn-webshare" "class" "btn-social p-0" "attributes" $attr )}}
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
@@ -1,3 +1,4 @@
|
|||||||
|
{{- $tab := site.Params.main.externalLinks.tab -}}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-3 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
|
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-3 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
|
||||||
<div class="col col-md-2 d-none d-md-block"></div>
|
<div class="col col-md-2 d-none d-md-block"></div>
|
||||||
@@ -7,8 +8,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col text-sm-start text-center col-sm-6 col-md-4">
|
<div class="col text-sm-start text-center col-sm-6 col-md-4">
|
||||||
{{ range .Site.Menus.social -}}
|
{{ range .Site.Menus.social -}}
|
||||||
<a href="{{ .URL }}" target="_blank" rel="noopener noreferrer" aria-label="{{ .Name | safeHTML }}" class="text-decoration-none link-secondary d-inline p-2">
|
<a href="{{ .URL }}" {{ if $tab }} target="_blank" rel="noopener noreferrer"{{ end }} aria-label="{{ .Name | safeHTML }}" class="text-decoration-none link-secondary d-inline p-2">
|
||||||
{{ .Pre | safeHTML }}
|
{{ if hasPrefix .Pre "<i" }}
|
||||||
|
{{ .Pre | safeHTML }}
|
||||||
|
{{ else }}
|
||||||
|
{{ partial "assets/icon.html" (dict "icon" (printf "%s fa-2x" .Pre) )}}
|
||||||
|
{{ end}}
|
||||||
</a>
|
</a>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
|
43
layouts/partials/utilities/link.html
Normal file
43
layouts/partials/utilities/link.html
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{{ $destination := .destination }}
|
||||||
|
{{- if not $destination -}}
|
||||||
|
{{- errorf "partial [utilities/link.html] - Missing param 'destination'" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $target := "" -}}
|
||||||
|
{{- $rel := "" -}}
|
||||||
|
{{- $case := .case | default true }}
|
||||||
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
|
{{- $isExternal := ne (urls.Parse (absURL $destination)).Host (urls.Parse site.BaseURL).Host -}}
|
||||||
|
|
||||||
|
{{ $text := .text }}
|
||||||
|
{{- if not $text -}}
|
||||||
|
{{ if $isExternal }}
|
||||||
|
{{ $text = (urls.Parse (absURL $destination)).Host }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $target := site.GetPage $destination }}
|
||||||
|
{{ if not $target }}
|
||||||
|
{{- errorf "partial [utilities/link.html] - Cannot find page: %s" $destination -}}
|
||||||
|
{{ else }}
|
||||||
|
{{ $text = $target.Title }}
|
||||||
|
{{ if not $case }}{{ $text = lower $text }}{{ end }}
|
||||||
|
{{ $destination = $target.RelPermalink }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if $isExternal -}}
|
||||||
|
{{- if $tab -}}
|
||||||
|
{{- $target = "_blank" -}}
|
||||||
|
{{- $rel = "noopener noreferrer" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if $cue -}}
|
||||||
|
{{ $suffix := partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
|
||||||
|
{{- $text = printf "%s %s" $text $suffix | safeHTML -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ else }}
|
||||||
|
{{ $destination = relLangURL $destination }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<a href="{{ $destination | safeURL }}"{{ with $target }} target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end }}>{{ $text }}</a>
|
@@ -12,17 +12,29 @@
|
|||||||
"aria-label" Optional label for the badge.
|
"aria-label" Optional label for the badge.
|
||||||
"tooltip" Optional text to display in a tooltip. Cannot be used together with collapse. Ignored for active/
|
"tooltip" Optional text to display in a tooltip. Cannot be used together with collapse. Ignored for active/
|
||||||
inactive buttons.
|
inactive buttons.
|
||||||
"collapse" Optional panel to collapse. Cannot be used together with tooltip. Ignored for active/inactive buttons.
|
"collapse" Optional panel to collapse. Cannot be used together with tooltip. Ignored for active/inactive
|
||||||
|
buttons.
|
||||||
"placement" Optional position of the tooltip: "top" (default), "bottom", "left", or "right".
|
"placement" Optional position of the tooltip: "top" (default), "bottom", "left", or "right".
|
||||||
|
"class" Optional class attribute of the button element, e.g. “p-5”.
|
||||||
|
"icon" Font Awesome icon class attribute, required unless button title is set. An example value is
|
||||||
|
"fas sort".
|
||||||
|
"order" Optional order of the icon, either "first" or "last" (default).
|
||||||
|
"justify" Optional justification of the button title and icon, either "start", "end", "center" (default),
|
||||||
|
"between", "around", or "evenly".
|
||||||
"toast" Optional id of the toast to display when the button is clicked.
|
"toast" Optional id of the toast to display when the button is clicked.
|
||||||
|
"cue" Optional flag to indicate if an external link should show a visual cue, defaults to setting
|
||||||
|
"main.externalLinks.cue" in the site's parameters.
|
||||||
|
"tab" Optional flag to indicate if an external link should open in a new tab, defaults to setting
|
||||||
|
"main.externalLinks.tab" in the site's parameters.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{{ $error := false }}
|
{{ $error := false }}
|
||||||
{{ $type := "button" -}}
|
{{ $type := "button" -}}
|
||||||
|
|
||||||
|
{{- $icon := .Get "icon" }}
|
||||||
{{ $title := trim .Inner " \r\n" -}}
|
{{ $title := trim .Inner " \r\n" -}}
|
||||||
{{ if not $title -}}
|
{{ if not (or $title $icon) -}}
|
||||||
{{ errorf "Missing inner element text: %s" .Position -}}
|
{{ errorf "Missing icon or inner element text: %s" .Position -}}
|
||||||
{{ $error = true }}
|
{{ $error = true }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
@@ -69,6 +81,7 @@
|
|||||||
{{ if $relref }}
|
{{ if $relref }}
|
||||||
{{ $href = relref . $relref }}
|
{{ $href = relref . $relref }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ $class := .Get "class" -}}
|
||||||
|
|
||||||
{{ $placement := "top" -}}
|
{{ $placement := "top" -}}
|
||||||
{{ with .Get "placement" }}{{ $placement = . }}{{ end -}}
|
{{ with .Get "placement" }}{{ $placement = . }}{{ end -}}
|
||||||
@@ -80,6 +93,25 @@
|
|||||||
|
|
||||||
{{- $toast := .Get "toast" -}}
|
{{- $toast := .Get "toast" -}}
|
||||||
|
|
||||||
|
{{- $order := "last" -}}
|
||||||
|
{{- with .Get "order" }}{{ $order = . }}{{ end -}}
|
||||||
|
{{- $supportedOrders := slice "first" "last" -}}
|
||||||
|
{{- if not (in $supportedOrders $order) -}}
|
||||||
|
{{ errorf "Invalid value for param 'order': %s" .Position -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $justify := "center" -}}
|
||||||
|
{{- with .Get "justify" }}{{ $justify = . }}{{ end -}}
|
||||||
|
{{- $supportedJustify := slice "start" "end" "center" "between" "around" "evenly" -}}
|
||||||
|
{{- if not (in $supportedJustify $justify) -}}
|
||||||
|
{{ errorf "Invalid value for param 'justify': %s" .Position -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $cue := .Get "cue" | default site.Params.main.externalLinks.cue -}}
|
||||||
|
{{- $tab := .Get "tab" | default site.Params.main.externalLinks.tab -}}
|
||||||
|
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
{{- partial "assets/button.html" (dict
|
{{- partial "assets/button.html" (dict
|
||||||
"type" $type
|
"type" $type
|
||||||
@@ -94,7 +126,13 @@
|
|||||||
"href" $href
|
"href" $href
|
||||||
"id" $id
|
"id" $id
|
||||||
"state" $state
|
"state" $state
|
||||||
|
"class" $class
|
||||||
"placement" $placement
|
"placement" $placement
|
||||||
|
"icon" $icon
|
||||||
|
"order" $order
|
||||||
|
"justify" $justify
|
||||||
|
"cue" $cue
|
||||||
|
"tab" $tab
|
||||||
"toast" $toast)
|
"toast" $toast)
|
||||||
-}}
|
-}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
55
layouts/shortcodes/link.html
Normal file
55
layouts/shortcodes/link.html
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<!--
|
||||||
|
Generates a link for a given named link or url. The shortcode supports a single unnamed parameter, or various named
|
||||||
|
parameters. The unnamed parameter is recognized as a named link if it does not contain any "/", otherwise it is
|
||||||
|
treated as a url. Any inner text is rendered as the link title, otherwise it uses the host name (for external links)
|
||||||
|
or page name (for internal links). The shortcode supports the following named arguments:
|
||||||
|
"name" Optional name of the link maintained in the "links" section of the site's parameters. If omitted,
|
||||||
|
the "url" argument should be provided instead.
|
||||||
|
"url" Optional url of the link, including the scheme ("http" or "https"). If omitted, the "name" argument
|
||||||
|
should be provided instead.
|
||||||
|
"cue" Optional flag to indicate if an external link should show a visual cue, defaults to setting
|
||||||
|
"main.externalLinks.cue" in the site's parameters.
|
||||||
|
"tab" Optional flag to indicate if an external link should open in a new tab, defaults to setting
|
||||||
|
"main.externalLinks.tab" in the site's parameters.
|
||||||
|
"case" Optional flag to indicate if the retrieved title (e.g. no inner text is provided) of an internal
|
||||||
|
link should use its original case, defaults to true. If false, the title is set to lower case.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $error := false -}}
|
||||||
|
{{ $name := "" }}
|
||||||
|
{{ $url := "" }}
|
||||||
|
{{ $case := true }}
|
||||||
|
{{ $cue := site.Params.main.externalLinks.cue }}
|
||||||
|
{{ $tab := site.Params.main.externalLinks.tab }}
|
||||||
|
|
||||||
|
{{ if .IsNamedParams }}
|
||||||
|
{{ $name = .Get "name" }}
|
||||||
|
{{ $url = .Get "url" }}
|
||||||
|
{{ $cue = .Get "cue" | default site.Params.main.externalLinks.cue }}
|
||||||
|
{{ $tab = .Get "tab" | default site.Params.main.externalLinks.tab }}
|
||||||
|
{{ $case = .Get "case" | default true }}
|
||||||
|
{{ else if strings.Contains (.Get 0) "/" }}
|
||||||
|
{{ $url = .Get 0 }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $name = .Get 0 }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if not (or $name $url) }}
|
||||||
|
{{ errorf "Expected param 'name' or 'url': %s" .Position -}}
|
||||||
|
{{ $error = true -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $name }}
|
||||||
|
{{ $url = index site.Params.links $name }}
|
||||||
|
{{ if not $url }}
|
||||||
|
{{ errorf "Cannot find link '%s': %s" $name .Position -}}
|
||||||
|
{{ $error = true -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $text := trim .Inner " \r\n" | markdownify | safeHTML }}
|
||||||
|
|
||||||
|
{{- if not $error -}}
|
||||||
|
{{ partial "utilities/link.html" (dict "destination" $url "text" $text "cue" $cue "tab" $tab "case" $case) }}
|
||||||
|
{{- end -}}
|
||||||
|
|
912
package-lock.json
generated
912
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.16.7",
|
"version": "0.17.0",
|
||||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hugo",
|
"hugo",
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"eslint-plugin-n": "^16.0.0",
|
"eslint-plugin-n": "^16.0.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"hugo-bin": "^0.111.0",
|
"hugo-bin": "^0.112.0",
|
||||||
"markdownlint-cli2": "^0.8.1",
|
"markdownlint-cli2": "^0.8.1",
|
||||||
"postcss-cli": "^10.1.0",
|
"postcss-cli": "^10.1.0",
|
||||||
"purgecss-whitelister": "^2.4.0",
|
"purgecss-whitelister": "^2.4.0",
|
||||||
|
Reference in New Issue
Block a user