feat: add column size attribute (#455)
This commit is contained in:
parent
c39eee4368
commit
66d456f552
6 changed files with 51 additions and 10 deletions
|
@ -7,7 +7,7 @@
|
|||
--code
|
||||
{{- end }}"
|
||||
href="{{ .Destination | safeURL }}"
|
||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
||||
{{- with .Title }}{{ printf "title=\"%s\"" . | safeHTMLAttr }}{{- end }}
|
||||
>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
<div class="gdoc-columns flex flex-wrap flex-mobile-column">
|
||||
{{- $size := default "regular" (.Get "size" | lower) }}
|
||||
|
||||
{{- if not (in (slice "regular" "large" "small") $size) }}
|
||||
{{- $size = "regular" }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
<div class="gdoc-columns gdoc-columns--{{ $size }} flex flex-gap flex-mobile-column">
|
||||
{{ range split .Inner "<--->" }}
|
||||
<div class="gdoc-columns__content gdoc-markdown--nested flex-even">
|
||||
{{ . | $.Page.RenderString }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue