mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Compare commits
27 Commits
v0.24.0-be
...
v0.24.3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bcf9b8aa7c | ||
![]() |
15d0161240 | ||
![]() |
998db85994 | ||
![]() |
e6586b52cd | ||
![]() |
937964a02b | ||
![]() |
9b4afdfb35 | ||
![]() |
2121e663a0 | ||
![]() |
46699664dc | ||
![]() |
98ec788fb3 | ||
![]() |
e248862905 | ||
![]() |
8ba8acf675 | ||
![]() |
a7cf1ad918 | ||
![]() |
492ce3e38b | ||
![]() |
eaa5c217db | ||
![]() |
410d681d23 | ||
![]() |
deaf9f0fec | ||
![]() |
7ed3313c55 | ||
![]() |
1477ff7bb2 | ||
![]() |
7e2f6606bf | ||
![]() |
2acc8fc737 | ||
![]() |
96fe90ce9d | ||
![]() |
acf25e5375 | ||
![]() |
aa35e03692 | ||
![]() |
31cf9eb577 | ||
![]() |
9a8ebd3558 | ||
![]() |
148c587283 | ||
![]() |
7c9c4cbabb |
@@ -137,4 +137,4 @@ arguments:
|
||||
comment:
|
||||
Flag to indicate if the image should render a plain image instead of an
|
||||
image set. When set, no transformations are applied to the image.
|
||||
release: v0.24.0-beta5
|
||||
release: v0.24.0
|
||||
|
4
go.mod
4
go.mod
@@ -9,8 +9,8 @@ require (
|
||||
github.com/gethinode/mod-fontawesome v1.9.0 // indirect
|
||||
github.com/gethinode/mod-katex v1.1.0 // indirect
|
||||
github.com/gethinode/mod-leaflet v1.1.0 // indirect
|
||||
github.com/gethinode/mod-lottie v1.5.3 // indirect
|
||||
github.com/gethinode/mod-utils/v2 v2.3.6 // indirect
|
||||
github.com/gethinode/mod-lottie v1.5.4 // indirect
|
||||
github.com/gethinode/mod-utils/v2 v2.3.7 // indirect
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
|
||||
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
||||
)
|
||||
|
4
go.sum
4
go.sum
@@ -180,6 +180,8 @@ github.com/gethinode/mod-lottie v1.5.2 h1:UvrNAQeD/97Q5fbv3uKIY48fY3IWJeLy/v206G
|
||||
github.com/gethinode/mod-lottie v1.5.2/go.mod h1:HM1pA85EiPO7RtNysw/a2ZzRqktO2WvB/KyWLOuynzg=
|
||||
github.com/gethinode/mod-lottie v1.5.3 h1:fvCjCoZoCEhY2aou30oEsEo6N4tVSI0ijFyXS3wNib0=
|
||||
github.com/gethinode/mod-lottie v1.5.3/go.mod h1:XHVMuPsuJIm9/Eb2ql4jsT49/BQqMlBiirQoty4uHAo=
|
||||
github.com/gethinode/mod-lottie v1.5.4 h1:+xbamSsjcnP2tyzGl0CA1enma7gkAp67wenmuP0XELY=
|
||||
github.com/gethinode/mod-lottie v1.5.4/go.mod h1:gALqz48aYpoDLxJOI3LzIpdy0Eq/lOBNtlcOxABa9tg=
|
||||
github.com/gethinode/mod-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
||||
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
||||
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
||||
@@ -218,6 +220,8 @@ github.com/gethinode/mod-utils/v2 v2.3.5 h1:r8V330xQkHTjzAFNCde1Kpz6fgidzmMRW82e
|
||||
github.com/gethinode/mod-utils/v2 v2.3.5/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.3.6 h1:Ta+WKc83sK9ZROKmUwS4pA32Qm0bQqoMmWHEOzDvZ5Y=
|
||||
github.com/gethinode/mod-utils/v2 v2.3.6/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.3.7 h1:FFsUPO7NBp9Bhjovf0Ki5hnDGfeMKV/3RNz1Qpv7+oQ=
|
||||
github.com/gethinode/mod-utils/v2 v2.3.7/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
||||
|
@@ -16,12 +16,8 @@
|
||||
{{- $modes := .modes -}}
|
||||
{{- $plain := .plain | default false }}
|
||||
|
||||
{{- $fallbackURL := "" -}}
|
||||
{{- $anchor := "" -}}
|
||||
{{- $imgset := "" -}}
|
||||
{{- $isVector := false -}}
|
||||
|
||||
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||
{{- $anchor := "" -}}
|
||||
{{- $segments := split $url "#" -}}
|
||||
{{- if gt (len $segments) 2 -}}
|
||||
{{- errorf "Invalid path or url: %q" $url -}}
|
||||
@@ -30,82 +26,18 @@
|
||||
{{- $anchor = index $segments 1 -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Identify image provider -->
|
||||
{{ $hook := "" }}
|
||||
{{ $account := "" }}
|
||||
{{ $container := "" }}
|
||||
{{ $rewrite := false }}
|
||||
{{ range $provider, $val := site.Params.images }}
|
||||
{{ if not $hook }}
|
||||
{{ with index $val "host" }}
|
||||
{{ if (findRE . (urls.Parse $url).Hostname) }}
|
||||
{{ $hook = $provider }}
|
||||
{{ with index $val "account" }}{{ $account = . }}{{ end }}
|
||||
{{ with index $val "rewrite" }}{{ $rewrite = . }}{{ end }}
|
||||
{{ with index $val "container" }}{{ $container = . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $hook }}{{ $hook = "hugo" }}{{ end }}
|
||||
|
||||
<!-- Rewrite the origin URL if applicable -->
|
||||
{{ if $rewrite }}
|
||||
{{ $url = partial "assets/helpers/image-rewrite.html" (dict "url" $url "account" $account "container" $container "hook" $hook) }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Define image dimensions -->
|
||||
{{ $dims := slice }}
|
||||
{{- $res := "" -}}
|
||||
{{- $img := "" -}}
|
||||
{{ $transform := "" }}
|
||||
{{- if hasSuffix $url "svg" -}}
|
||||
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
||||
{{ if not $res }}
|
||||
{{- if not (fileExists (path.Join "/static" $url)) -}}
|
||||
{{ warnf "Cannot find vector image resource: %q" $url -}}
|
||||
{{ else }}
|
||||
{{ $width := string (partial "utilities/GetWidth.html" (dict "path" $url "height" 500)) }}
|
||||
{{ $dims = $dims | append (printf "%sx500" $width) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else if $ratio }}
|
||||
{{ $transform = "fill" }}
|
||||
{{ $dims = partial "assets/helpers/GetDimension.html" (dict "ratio" $ratio) }}
|
||||
{{ if not $dims }}{{ errorf "partial [assets/image.html] - Cannot find dimension data: %s" $ratio }}{{ end }}
|
||||
{{ else if not $plain }}
|
||||
{{ $transform = "fit" }}
|
||||
{{- $res := partial "utilities/GetImage.html" (dict "url" $url "page" $page) -}}
|
||||
{{ if and $res $res.resource }}
|
||||
{{ $img = $res.resource }}
|
||||
{{ if $res.mirror }}{{ $class = printf "%s mirrorred" $class }}{{ end }}
|
||||
|
||||
{{ $widths := partial "assets/helpers/GetDimension.html" (dict "ratio" "auto") }}
|
||||
{{ range $width := $widths -}}
|
||||
{{- $dims = $dims | append (printf "%dx%d" (int $width) (int (math.Round (mul (div (float $width) $img.Width) $img.Height)))) -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Derive image width and height -->
|
||||
{{ $width := "" }}
|
||||
{{ $height := "" }}
|
||||
{{ if not $plain }}
|
||||
{{ with $dims }}
|
||||
{{ range $dim := (. | last 1) }}
|
||||
{{ $width = (int (index (split $dim "x") 0)) }}
|
||||
{{ $height = (int (index (split $dim "x") 1)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Generate image urls -->
|
||||
{{ if or (hasSuffix $url "svg") $plain }}
|
||||
{{- $fallbackURL = partial "utilities/GetStaticURL" (dict "url" $url) -}}
|
||||
{{ else }}
|
||||
{{- $fallbackURL = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" ($dims | last 1) "transform" $transform "hook" $hook "format" "jpg" "includeWidth" false) -}}
|
||||
{{- $imgset = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" $dims "transform" $transform "hook" $hook) -}}
|
||||
{{ end }}
|
||||
<!-- Obtain fallback URL and imageset definition -->
|
||||
{{ $target := partial "assets/helpers/image-dimension.html" (dict
|
||||
"page" $page
|
||||
"url" .url
|
||||
"ratio" $ratio
|
||||
"plain" $plain
|
||||
"imageset" true
|
||||
) }}
|
||||
{{ $fallbackURL := index $target "target" }}
|
||||
{{ $imgset := index $target "set" }}
|
||||
{{ $height := index $target "height" }}
|
||||
{{ $width := index $target "width" }}
|
||||
|
||||
<!-- Add color modes -->
|
||||
{{- range $none := $modes -}}
|
||||
|
109
layouts/partials/assets/helpers/image-dimension.html
Normal file
109
layouts/partials/assets/helpers/image-dimension.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!-- Initialize arguments -->
|
||||
{{- $page := .page -}}
|
||||
{{- $url := .url -}}
|
||||
{{- $ratio := .ratio -}}
|
||||
{{- $height := .height -}}
|
||||
{{- $width := .width -}}
|
||||
{{- $plain := .plain | default false }}
|
||||
{{- $targetURL := "" -}}
|
||||
{{- $set := "" -}}
|
||||
{{- $imageset := .imageset | default false }}
|
||||
|
||||
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||
{{- $segments := split $url "#" -}}
|
||||
{{- if gt (len $segments) 2 -}}
|
||||
{{- errorf "Invalid path or url: %q" $url -}}
|
||||
{{- else if eq (len $segments) 2 }}
|
||||
{{- $url = index $segments 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Identify image provider -->
|
||||
{{ $hook := "" }}
|
||||
{{ $account := "" }}
|
||||
{{ $container := "" }}
|
||||
{{ $rewrite := false }}
|
||||
{{ range $provider, $val := site.Params.images }}
|
||||
{{ if not $hook }}
|
||||
{{ with index $val "host" }}
|
||||
{{ if (findRE . (urls.Parse $url).Hostname) }}
|
||||
{{ $hook = $provider }}
|
||||
{{ with index $val "account" }}{{ $account = . }}{{ end }}
|
||||
{{ with index $val "rewrite" }}{{ $rewrite = . }}{{ end }}
|
||||
{{ with index $val "container" }}{{ $container = . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $hook }}{{ $hook = "hugo" }}{{ end }}
|
||||
|
||||
<!-- Rewrite the origin URL if applicable -->
|
||||
{{ if $rewrite }}
|
||||
{{ $url = partial "assets/helpers/image-rewrite.html" (dict "url" $url "account" $account "container" $container "hook" $hook) }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Define image dimensions -->
|
||||
{{ $dims := slice }}
|
||||
{{- $res := "" -}}
|
||||
{{- $img := "" -}}
|
||||
{{ $transform := "" }}
|
||||
{{- if hasSuffix $url "svg" -}}
|
||||
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
||||
{{ if not $res }}
|
||||
{{- if not (fileExists (path.Join "/static" $url)) -}}
|
||||
{{ warnf "Cannot find vector image resource: %q" $url -}}
|
||||
{{ else }}
|
||||
{{ $width := string (partial "utilities/GetWidth.html" (dict "path" $url "height" 500)) }}
|
||||
{{ $dims = $dims | append (printf "%sx500" $width) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else if $ratio }}
|
||||
{{ $transform = "fill" }}
|
||||
{{ $dims = partial "assets/helpers/GetDimension.html" (dict "ratio" $ratio) }}
|
||||
{{ if not $dims }}{{ errorf "partial [assets/image.html] - Cannot find dimension data: %s" $ratio }}{{ end }}
|
||||
{{ else if (and $height $width) }}
|
||||
{{ $transform = "fill" }}
|
||||
{{ $dims = slice (printf "%dx%d" $width $height) }}
|
||||
{{ else if not $plain }}
|
||||
{{ $transform = "fit" }}
|
||||
{{- $res := partial "utilities/GetImage.html" (dict "url" $url "page" $page) -}}
|
||||
{{ if and $res $res.resource }}
|
||||
{{ $img = $res.resource }}
|
||||
{{ if $res.mirror }}{{ $class = printf "%s mirrorred" $class }}{{ end }}
|
||||
|
||||
{{ $widths := partial "assets/helpers/GetDimension.html" (dict "ratio" "auto") }}
|
||||
{{ range $w := $widths -}}
|
||||
{{ $height = int (math.Round (mul (div (float $w) $img.Width) $img.Height)) }}
|
||||
{{- $dims = $dims | append (printf "%dx%d" (int $w) $height ) -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Derive image width and height -->
|
||||
{{ if not $plain }}
|
||||
{{ with $dims }}
|
||||
{{ range $dim := (. | last 1) }}
|
||||
{{ $width = (int (index (split $dim "x") 0)) }}
|
||||
{{ $height = (int (index (split $dim "x") 1)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Generate image url -->
|
||||
{{ if or (hasSuffix $url "svg") $plain }}
|
||||
{{- $targetURL = partial "utilities/GetStaticURL" (dict "url" $url) -}}
|
||||
{{ else }}
|
||||
{{- $targetURL = partial "assets/helpers/image-set.html" (dict
|
||||
"url" $url
|
||||
"img" $img
|
||||
"dims" ($dims | last 1)
|
||||
"transform" $transform
|
||||
"hook" $hook
|
||||
"format" "jpg"
|
||||
"includeWidth" false
|
||||
)}}
|
||||
{{ if $imageset }}
|
||||
{{- $set = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" $dims "transform" $transform "hook" $hook) -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width) }}
|
@@ -19,9 +19,13 @@
|
||||
{{- $class := .class -}}
|
||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||
{{- $baseURL := $page.Scratch.Get "baseURL" -}}
|
||||
|
||||
{{- $menuURL := urls.JoinPath $baseURL ((or $menu.PageRef $menu.URL) | relLangURL) -}}
|
||||
{{- $baseURL := $page.Scratch.Get "baseURL" | default "/" -}}
|
||||
{{- $menuURL := "" -}}
|
||||
{{ if or (strings.HasPrefix $menu.PageRef "http") (strings.HasPrefix $menu.URL "http") }}
|
||||
{{ $menuURL = or $menu.PageRef $menu.URL }}
|
||||
{{ else }}
|
||||
{{- $menuURL = urls.JoinPath $baseURL ((or $menu.PageRef $menu.URL) | relLangURL) -}}
|
||||
{{ end }}
|
||||
{{- $pageURL := $page.RelPermalink -}}
|
||||
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
||||
{{- $isAlias := $menu.Params.alias -}}
|
||||
|
@@ -21,22 +21,30 @@
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
@@ -61,22 +69,30 @@
|
||||
|
||||
{{- with .Next }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -90,14 +106,18 @@
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
@@ -122,14 +142,18 @@
|
||||
|
||||
{{- with .Next }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<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>
|
||||
<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" "spacing" false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@@ -15,15 +15,8 @@
|
||||
|
||||
{{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}}
|
||||
{{ with $thumbnail -}}
|
||||
{{- $res := partial "utilities/GetImage.html" (dict "url" .) -}}
|
||||
{{- $img := "" -}}
|
||||
{{ with $res }}{{ $img = $res.resource }}{{ end }}
|
||||
{{ with $img -}}
|
||||
{{ $dim := "1280x640" -}}
|
||||
{{ $scaled := (.Fill (printf "%s jpg" $dim)) -}}
|
||||
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink ".jpg" (printf "-%s.jpg" $dim)) -}}
|
||||
{{ $.Scratch.Set "thumbnail" ($scaled.Permalink | absURL) -}}
|
||||
{{ end -}}
|
||||
{{ $imgURL := index (partial "assets/helpers/image-dimension.html" (dict "url" $thumbnail "width" 1280 "height" 640 "page" .)) "target" }}
|
||||
{{ $.Scratch.Set "thumbnail" ($imgURL | absURL) -}}
|
||||
{{ else -}}
|
||||
{{ with .Site.Params.schema.image.url -}}
|
||||
{{ $.Scratch.Set "thumbnail" (. | absURL) -}}
|
||||
|
112
package-lock.json
generated
112
package-lock.json
generated
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.24.0-beta11",
|
||||
"version": "0.24.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.24.0-beta11",
|
||||
"version": "0.24.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"cssnano": "^7.0.1",
|
||||
"cssnano-preset-advanced": "^7.0.1",
|
||||
"hugo-bin": "0.123.2",
|
||||
"cssnano": "^7.0.2",
|
||||
"cssnano-preset-advanced": "^7.0.2",
|
||||
"hugo-bin": "0.124.0",
|
||||
"purgecss-whitelister": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -2101,11 +2101,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.0.1.tgz",
|
||||
"integrity": "sha512-917Mej/4SdI7b55atsli3sU4MOJ9XDoKgnlCtQtXYj8XUFcM3riTuYHyqBBnnskawW+zWwp0KxJzpEUodlpqUg==",
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.0.2.tgz",
|
||||
"integrity": "sha512-LXm/Xx6TNLzfHM2lBaIQHfvtdW5QfdbyLzfJAWZrclCAb47yVa0/yJG69+amcw3Lq0YZ+kyU40rbsMPLcMt9aw==",
|
||||
"dependencies": {
|
||||
"cssnano-preset-default": "^7.0.1",
|
||||
"cssnano-preset-default": "^7.0.2",
|
||||
"lilconfig": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2120,14 +2120,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano-preset-advanced": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.1.tgz",
|
||||
"integrity": "sha512-y1NE/+WiKPnR/kVrUPeYrX3oWb9iHQZ3+KhNH++UTOgbLS7yJtC6nOkisnP90A5mQXLhpK8OjjxYEe9kAmRAnA==",
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.2.tgz",
|
||||
"integrity": "sha512-RWl8eouQxOiWNfid5lYnKE/qtE9fHr2cLZOqfxHHNGrLMhvRBMh/PTmFjhQOoLmAUlQaZVtwjWiYnr99rYBBbw==",
|
||||
"dependencies": {
|
||||
"autoprefixer": "^10.4.19",
|
||||
"browserslist": "^4.23.0",
|
||||
"cssnano-preset-default": "^7.0.1",
|
||||
"postcss-discard-unused": "^7.0.0",
|
||||
"cssnano-preset-default": "^7.0.2",
|
||||
"postcss-discard-unused": "^7.0.1",
|
||||
"postcss-merge-idents": "^7.0.0",
|
||||
"postcss-reduce-idents": "^7.0.0",
|
||||
"postcss-zindex": "^7.0.0"
|
||||
@@ -2140,9 +2140,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano-preset-default": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.1.tgz",
|
||||
"integrity": "sha512-Fumyr+uZMcjYQeuHssAZxn0cKj3cdQc5GcxkBcmEzISGB+UW9CLNlU4tBOJbJGcPukFDlicG32eFbrc8K9V5pw==",
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.2.tgz",
|
||||
"integrity": "sha512-z95kGKZx8VWHfERj7LFzuiTxylbvEp07ZEYaFu+t6bFyNOXLd/+3oPyNaY7ISwcrfHFCkt8OfRo4IZxVRJZ7dg==",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.23.0",
|
||||
"css-declaration-sorter": "^7.2.0",
|
||||
@@ -2154,12 +2154,12 @@
|
||||
"postcss-discard-duplicates": "^7.0.0",
|
||||
"postcss-discard-empty": "^7.0.0",
|
||||
"postcss-discard-overridden": "^7.0.0",
|
||||
"postcss-merge-longhand": "^7.0.0",
|
||||
"postcss-merge-rules": "^7.0.0",
|
||||
"postcss-merge-longhand": "^7.0.1",
|
||||
"postcss-merge-rules": "^7.0.1",
|
||||
"postcss-minify-font-values": "^7.0.0",
|
||||
"postcss-minify-gradients": "^7.0.0",
|
||||
"postcss-minify-params": "^7.0.0",
|
||||
"postcss-minify-selectors": "^7.0.0",
|
||||
"postcss-minify-selectors": "^7.0.1",
|
||||
"postcss-normalize-charset": "^7.0.0",
|
||||
"postcss-normalize-display-values": "^7.0.0",
|
||||
"postcss-normalize-positions": "^7.0.0",
|
||||
@@ -2172,8 +2172,8 @@
|
||||
"postcss-ordered-values": "^7.0.0",
|
||||
"postcss-reduce-initial": "^7.0.0",
|
||||
"postcss-reduce-transforms": "^7.0.0",
|
||||
"postcss-svgo": "^7.0.0",
|
||||
"postcss-unique-selectors": "^7.0.0"
|
||||
"postcss-svgo": "^7.0.1",
|
||||
"postcss-unique-selectors": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -4309,9 +4309,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/hugo-bin": {
|
||||
"version": "0.123.2",
|
||||
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.123.2.tgz",
|
||||
"integrity": "sha512-HxKrHHso1PpXMOoZbAmopCqsYzdL3oUUR+/NTBdrhAOZFsKGaP1abLdJgu9GUyhUq+gYQOtDUtpB9wjoDyv6GQ==",
|
||||
"version": "0.124.0",
|
||||
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.124.0.tgz",
|
||||
"integrity": "sha512-5Vi0XZ0wJS8tmp+RzYwhfAS6gBtU9ZcaVmGHVl7RSiYzbuFVA8YDhsdFry2kZPf2ZOlA3uZuVDJmVCRVzit7xw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
@@ -6546,11 +6546,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-discard-unused": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-7.0.0.tgz",
|
||||
"integrity": "sha512-NgjhdrBA0Gc0atkp2a5usobonNh5kb/RmnVJoYz8X6m3wD+Mwc+rJz6flo7veaUhb5ZLsjx8Kc04LBzXNLYGwQ==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-7.0.1.tgz",
|
||||
"integrity": "sha512-3myaiuHge0HaY+OMA42/xlXnVixhPQPmfxrpiLO3FBipgW/4A3UnWnAtlfo49tuxsCx4ZrS6+h/sa/68WNGWPg==",
|
||||
"dependencies": {
|
||||
"postcss-selector-parser": "^6.0.16"
|
||||
"postcss-selector-parser": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -6616,12 +6616,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-merge-longhand": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-7.0.0.tgz",
|
||||
"integrity": "sha512-0X8I4/9+G03X5/5NnrfopG/YEln2XU8heDh7YqBaiq2SeaKIG3n66ShZPjIolmVuLBQ0BEm3yS8o1mlCLHdW7A==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-7.0.1.tgz",
|
||||
"integrity": "sha512-qZlD26hnqSTMxSSOMS8+QCeRWtqOdMKeQHvHcBhjL3mJxKUs47cvO1Y1x3iTdYIk3ioMcRHTiy229TT0mEMH/A==",
|
||||
"dependencies": {
|
||||
"postcss-value-parser": "^4.2.0",
|
||||
"stylehacks": "^7.0.0"
|
||||
"stylehacks": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -6631,14 +6631,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-merge-rules": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-7.0.0.tgz",
|
||||
"integrity": "sha512-Zty3VlOsD6VSjBMu6PiHCVpLegtBT/qtZRVBcSeyEZ6q1iU5qTYT0WtEoLRV+YubZZguS5/ycfP+NRiKfjv6aw==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-7.0.1.tgz",
|
||||
"integrity": "sha512-bb8McYQbo2etgs0uVt6AfngajACK3FHSVP3sGLhprrjbtHJWgG03JZ4KKBlJ8/5Fb8/Rr+mMKaybMYeoYrAg0A==",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.23.0",
|
||||
"caniuse-api": "^3.0.0",
|
||||
"cssnano-utils": "^5.0.0",
|
||||
"postcss-selector-parser": "^6.0.16"
|
||||
"postcss-selector-parser": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -6694,11 +6694,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-minify-selectors": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-7.0.0.tgz",
|
||||
"integrity": "sha512-f00CExZhD6lNw2vTZbcnmfxVgaVKzUw6IRsIFX3JTT8GdsoABc1WnhhGwL1i8YPJ3sSWw39fv7XPtvLb+3Uitw==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-7.0.1.tgz",
|
||||
"integrity": "sha512-YfIbGtcgMFquPxV2L/ASs36ZS4DsgfcDX9tQ8cTEIvBTv+0GXFKtcvvpi9tCKto/+DWGWYKMCESFG3Pnan0Feg==",
|
||||
"dependencies": {
|
||||
"postcss-selector-parser": "^6.0.16"
|
||||
"postcss-selector-parser": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -6980,12 +6980,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-svgo": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-7.0.0.tgz",
|
||||
"integrity": "sha512-Xj5DRdvA97yRy3wjbCH2NKXtDUwEnph6EHr5ZXszsBVKCNrKXYBjzAXqav7/Afz5WwJ/1peZoTguCEJIg7ytmA==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-7.0.1.tgz",
|
||||
"integrity": "sha512-0WBUlSL4lhD9rA5k1e5D8EN5wCEyZD6HJk0jIvRxl+FDVOMlJ7DePHYWGGVc5QRqrJ3/06FTXM0bxjmJpmTPSA==",
|
||||
"dependencies": {
|
||||
"postcss-value-parser": "^4.2.0",
|
||||
"svgo": "^3.2.0"
|
||||
"svgo": "^3.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >= 18"
|
||||
@@ -6995,11 +6995,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-unique-selectors": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-7.0.0.tgz",
|
||||
"integrity": "sha512-NYFqcft7vVQMZlQPsMdMPy+qU/zDpy95Malpw4GeA9ZZjM6dVXDshXtDmLc0m4WCD6XeZCJqjTfPT1USsdt+rA==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-7.0.1.tgz",
|
||||
"integrity": "sha512-MH7QE/eKUftTB5ta40xcHLl7hkZjgDFydpfTK+QWXeHxghVt3VoPqYL5/G+zYZPPIs+8GuqFXSTgxBSoB1RZtQ==",
|
||||
"dependencies": {
|
||||
"postcss-selector-parser": "^6.0.16"
|
||||
"postcss-selector-parser": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -8575,12 +8575,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/stylehacks": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-7.0.0.tgz",
|
||||
"integrity": "sha512-47Nw4pQ6QJb4CA6dzF2m9810sjQik4dfk4UwAm5wlwhrW3syzZKF8AR4/cfO3Cr6lsFgAoznQq0Wg57qhjTA2A==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-7.0.1.tgz",
|
||||
"integrity": "sha512-PnrT4HzajnxbjfChpeBKLSpSykilnGBlD+pIffCoT5KbLur9fcL8uKRQJJap85byR2wCYZl/4Otk5eq76qeZxQ==",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.23.0",
|
||||
"postcss-selector-parser": "^6.0.16"
|
||||
"postcss-selector-parser": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
@@ -8971,9 +8971,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/svgo": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/svgo/-/svgo-3.2.0.tgz",
|
||||
"integrity": "sha512-4PP6CMW/V7l/GmKRKzsLR8xxjdHTV4IMvhTnpuHwwBazSIlw5W/5SmPjN8Dwyt7lKbSJrRDgp4t9ph0HgChFBQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz",
|
||||
"integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==",
|
||||
"dependencies": {
|
||||
"@trysound/sax": "0.2.0",
|
||||
"commander": "^7.2.0",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.24.0-beta11",
|
||||
"version": "0.24.3",
|
||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||
"keywords": [
|
||||
"hugo",
|
||||
@@ -69,9 +69,9 @@
|
||||
"dependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"cssnano": "^7.0.1",
|
||||
"cssnano-preset-advanced": "^7.0.1",
|
||||
"hugo-bin": "0.123.2",
|
||||
"cssnano": "^7.0.2",
|
||||
"cssnano-preset-advanced": "^7.0.2",
|
||||
"hugo-bin": "0.124.0",
|
||||
"purgecss-whitelister": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Reference in New Issue
Block a user