File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed
exampleSite/content/test-product/images Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Images
3+ description : Images
4+ ---
Original file line number Diff line number Diff line change 1+ ---
2+ title : Image Grid
3+ description : Image Grid usage
4+ ---
5+
6+ The ` img ` shortcode has support for the ` grid ` attribute.
7+ The following values are supported:
8+ - ` wide `
9+ - ` last-third `
10+ - ` first-third `
11+ - ` first-two-thirds ` (default)
12+
13+ ``` go-template
14+ {{</*img src="hero-graphic.webp" grid="wide"*/>}}
15+ ```
16+
17+
18+ ## Default
19+ By default, and image will take up the first two-thirds of the grid, allowing for call out content to its right.
20+ {{< img src="hero-graphic.webp">}}
21+ {{<call-out sideline =" true " >}}
22+ Here is an example of a callout to the side of an image.
23+ {{</call-out >}}
24+
25+
26+ ## ` wide `
27+ Providing the "wide" option, will make the image take up the full grid.
28+
29+ {{< img src="hero-graphic.webp" grid="wide">}}
30+
31+
32+ ## ` last-third `
33+ Providing the "last-third" option, will make the image take up the last third of the grid, similar to a side call out.
34+ This makes it possible to place an image to the right of text.
35+ {{< img src="hero-graphic.webp" grid="last-third">}}
Original file line number Diff line number Diff line change 1- < figure {{ with .Get "class" }} class="{{ . }} "{{ end }} >
1+ {{- $grid := .Get "grid" | default "first-two-thirds" -}}
2+ < figure {{ with .Get "class" }} class="{{ . }} "{{ end }} data-grid ="{{$grid}} ">
23 {{- $src := .Get "src" -}}
34 {{- $isSVG := strings.HasSuffix $src ".svg" -}}
45 < img class ="{{ if $isSVG }}figure-svg{{ else }}figure-bitmap{{ end }} " src ="{{ .Get "src " | relURL }}"
@@ -26,4 +27,4 @@ <h4>{{ . }}</h4>
2627 {{- end }}
2728 </ figcaption >
2829 {{- end }}
29- </ figure >
30+ </ figure >
You can’t perform that action at this time.
0 commit comments