mirror of
https://github.com/docker/docs.git
synced 2026-03-28 23:08:49 +07:00
Converts the grid shortcode to use named arguments, and adds support for a second "cols" argument for specifying grid size (3 by default). Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
9 lines
410 B
HTML
9 lines
410 B
HTML
{{ $cols := .Get "cols" | default 3 }}
|
|
<div class="not-prose grid grid-cols-{{ $cols }} xl:grid-cols-{{ sub $cols 1 }} gap-4 sm:flex sm:flex-col">
|
|
{{ $items := index .Page.Params (.Get "items" | default "grid") }}
|
|
{{ range $items }}
|
|
{{ $opts := dict "title" .title "link" .link "description" .description "icon" .icon "image" .image }}
|
|
{{ partial "components/card.html" $opts }}
|
|
{{ end }}
|
|
</div>
|