Skip to content

Commit 261c174

Browse files
committed
Contain aspect ratio of svg card thumbnails
1 parent 2c2cd59 commit 261c174

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

exampleSite/hugo_stats.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
"mt-5",
316316
"mt-auto",
317317
"mt-md-0",
318-
"multi-docs-collapse-15",
318+
"multi-docs-collapse-41",
319319
"multi-file-collapse-1",
320320
"mx-auto",
321321
"mx-md-0",
@@ -500,7 +500,7 @@
500500
"badge",
501501
"barre-de-navigation",
502502
"blog",
503-
"body-docs-collapse-15",
503+
"body-docs-collapse-41",
504504
"body-file-collapse-1",
505505
"bouton",
506506
"breadcrumb",
@@ -517,6 +517,8 @@
517517
"collapse",
518518
"collapse-1",
519519
"command-prompt",
520+
"comment-nous-partageons-vos-informations",
521+
"comment-utilisons-nous-les-cookies-",
520522
"cookies-etc",
521523
"custom-activity",
522524
"data-tables",
@@ -557,13 +559,14 @@
557559
"fichier",
558560
"fil-dariane",
559561
"file",
560-
"footer-docs-collapse-15",
562+
"footer-docs-collapse-41",
561563
"footer-file-collapse-1",
562564
"formula-katex",
563565
"formule-katex",
564566
"gegevenstabellen",
565567
"groupe-de-boutons",
566568
"groupe-de-cartes",
569+
"gérer-les-préférences-des-cookies",
567570
"how-do-we-use-cookies",
568571
"how-we-share-your-information",
569572
"icon",
@@ -577,6 +580,7 @@
577580
"language-selector",
578581
"leaflet-map-0",
579582
"lien",
583+
"liens-vers-des-tiers-et-utilisation-de-vos-informations",
580584
"link",
581585
"lottie-animation-0",
582586
"manage-cookie-preferences",
@@ -602,12 +606,14 @@
602606
"projects",
603607
"projets",
604608
"publication",
609+
"que-sont-les-cookies-",
605610
"release",
606611
"réduire",
607612
"security",
608613
"spinner",
609614
"sub",
610615
"sup",
616+
"sécurité",
611617
"table",
612618
"third-party-links--use-of-your-information",
613619
"timeline",
@@ -619,8 +625,11 @@
619625
"toast-message-email-4",
620626
"toc-collapse",
621627
"tooltip",
628+
"types-de-cookies-que-nous-utilisons",
622629
"types-of-cookies-we-use",
623630
"video",
631+
"vidéo",
632+
"vos-droits",
624633
"what-are-cookies",
625634
"your-rights"
626635
]

layouts/partials/assets/card.html

+13-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,19 @@
177177
<div class="row g-0 row-cols-2 h-100{{ if $button }} pb-5{{ end }}">
178178
{{- if $thumbnail -}}
179179
<div class="{{ $col1 }}">
180-
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "portrait" $portrait "sizes" $sizes "anchor" $anchor "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100 card-img-bg" "title" $title "loading" $loading) -}}
180+
{{ $fullHeight := "card-img-h100" }}
181+
{{ if eq (lower (path.Ext $thumbnail)) ".svg" }}{{ $fullHeight = "" }}{{ end }}
182+
{{- partial $hook (dict
183+
"url" $thumbnail
184+
"ratio" (or $ratio "1x1")
185+
"portrait" $portrait
186+
"sizes" $sizes
187+
"anchor" $anchor
188+
"wrapper" "h-100 card-img-wrap d-flex align-items-center"
189+
"class" (printf "rounded-start card-img-bg %s" $fullHeight)
190+
"title" $title
191+
"loading" $loading
192+
) -}}
181193
</div>
182194
{{- else if $icon -}}
183195
<div class="{{ $col1 }} p-{{ $padding }}">

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gethinode/hinode",
3-
"version": "0.27.10",
3+
"version": "0.27.11",
44
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
55
"keywords": [
66
"hugo",

0 commit comments

Comments
 (0)