Back to Go Micro

{{- $title := . -}} {{ $title | html -}}

internal/website/layouts/_partials/blocks/block.html

6.9.01.2 KB
Original Source

{{- $ctx := .ctx -}} {{- $variant := .variant | default "box" -}} {{- if eq $variant "hero" -}} {{- $blockID := printf "td-cover-block-%d" $ctx.Ordinal -}} {{- $col_id := $ctx.Get "color" | default "dark" -}} {{/* Height can be one of: auto, min, med, max, full. */ -}} {{- $height := $ctx.Get "height" | default "max" -}} {{/* pattern: adds the dotted bg-pattern overlay. See DESIGN.md. */ -}} {{- $pattern := $ctx.Get "pattern" | default false -}}

{{ with .title -}}

{{- $title := . -}} {{ $title | html -}}

{{ end -}} {{ with .subtitle -}}

{{ . | html }}

{{ end -}} {{ $ctx.Inner -}}

{{ with .byline | default "" -}} {{ . }} {{- end }}{{/**/ -}} {{- else -}} {{- $color := $ctx.Get "color" | default $ctx.Ordinal -}} {{- $height := $ctx.Get "height" | default "auto" -}} {{- $type := .type | default "container" -}} {{/* pattern: adds the dotted bg-pattern overlay. padding: vertical padding utility (e.g. py-5). See DESIGN.md. */ -}} {{- $pattern := $ctx.Get "pattern" | default false -}} {{- $padding := .padding | default "" -}}

{{/* Do NOT remove this comment! It ends the HTML block above. See https://spec.commonmark.org/0.30/#html-blocks, 7. */}} {{ $ctx.Inner -}}

{{/**/ -}} {{- end -}}