Compare commits

...

9 Commits

Author SHA1 Message Date
Mark Dumay
a73268fea6 Merge pull request #1327 from gethinode/develop
Fix alias when using preferred language
2024-12-21 13:31:01 +01:00
Mark Dumay
413082a23d Merge branch 'main' into develop 2024-12-21 13:26:34 +01:00
Mark Dumay
2b15ff26dc Fix alias when using preferred language 2024-12-21 13:26:06 +01:00
Mark Dumay
42db5b3f9b Merge pull request #1326 from gethinode/develop
Suppress empty breadcrumb sections
2024-12-21 09:43:08 +01:00
Mark Dumay
d3e58591be Merge branch 'main' into develop 2024-12-21 09:36:18 +01:00
Mark Dumay
5c9187a5ed Suppress empty breadcrumb sections
Ignores list pages that are not built
2024-12-21 09:35:51 +01:00
Mark Dumay
1db2652304 Merge pull request #1325 from gethinode/develop
Suppress rounding of card vector images
2024-12-21 08:05:13 +01:00
Mark Dumay
003f9a329c Merge branch 'main' into develop 2024-12-21 07:49:45 +01:00
Mark Dumay
c7bed9de24 Suppress rounding of card vector images 2024-12-21 07:48:56 +01:00
5 changed files with 21 additions and 10 deletions

View File

@@ -35,7 +35,15 @@
const storedLanguage = getLanguage()
const languageItems = document.querySelectorAll('#language-selector .dropdown-item')
if (languageItems.length > 0) {
const link = document.querySelector("link[rel='canonical']")
let alias = ''
if (link !== null) {
alias = link.getAttribute('href')
}
if (alias !== '') {
window.location.href = alias
} else if (languageItems.length > 0) {
// Redirect if the stored language differs from the active language
if ((storedLanguage) && (document.documentElement.lang !== storedLanguage)) {
languageItems.forEach(item => {

View File

@@ -23,10 +23,12 @@
{{- $title := .LinkTitle -}}
{{- if .IsHome }}{{ $title = T "home" }}{{ end -}}
{{- $address := or .RelPermalink .Params.Redirect -}}
{{ if $address }}
<li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li>
{{ else }}
<li class="breadcrumb-item">{{ $title }}</li>
{{ if $title }}
{{ if $address }}
<li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li>
{{ else }}
<li class="breadcrumb-item">{{ $title }}</li>
{{ end }}
{{ end }}
{{- end -}}
<li class="breadcrumb-item active" aria-current="page">{{ $page.LinkTitle }}</li>

View File

@@ -178,7 +178,8 @@
{{- if $thumbnail -}}
<div class="{{ $col1 }}">
{{ $fullHeight := "card-img-h100" }}
{{ if eq (lower (path.Ext $thumbnail)) ".svg" }}{{ $fullHeight = "" }}{{ end }}
{{ $rounding := "rounded-start" }}
{{ if eq (lower (path.Ext $thumbnail)) ".svg" }}{{ $fullHeight = "" }}{{ $rounding = "" }}{{ end }}
{{- partial $hook (dict
"url" $thumbnail
"ratio" (or $ratio "1x1")
@@ -186,7 +187,7 @@
"sizes" $sizes
"anchor" $anchor
"wrapper" "h-100 card-img-wrap d-flex align-items-center"
"class" (printf "rounded-start card-img-bg %s" $fullHeight)
"class" (printf "card-img-bg %s %s" $rounding $fullHeight)
"title" $title
"loading" $loading
) -}}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@gethinode/hinode",
"version": "0.27.14",
"version": "0.27.17",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.27.14",
"version": "0.27.17",
"license": "MIT",
"dependencies": {
"@fullhuman/postcss-purgecss": "^7.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.27.14",
"version": "0.27.17",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",