diff options
author | Ian Lewis <ianmlewis@gmail.com> | 2019-04-23 22:12:56 -0400 |
---|---|---|
committer | Ian Lewis <ianlewis@google.com> | 2019-04-24 13:29:24 +0900 |
commit | 66cc254a8710cdaeb6e56bb45aec1e51f696660a (patch) | |
tree | 06adc0106908f744f857d4ee708a377726796e73 /layouts/shortcodes/blocks | |
parent | 7853b971d43f773002ea92ecc95af7becd9dac55 (diff) |
Fix feature block rendering (fixes #56)
- Render feature blocks as markdown again.
- Feature block inner content is contained in a <div> rather than a <p>
to avoid nested <p> tags.
Diffstat (limited to 'layouts/shortcodes/blocks')
-rw-r--r-- | layouts/shortcodes/blocks/feature.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/shortcodes/blocks/feature.html b/layouts/shortcodes/blocks/feature.html new file mode 100644 index 000000000..f0b4b37c8 --- /dev/null +++ b/layouts/shortcodes/blocks/feature.html @@ -0,0 +1,10 @@ +{{ $icon := .Get "icon" | default "fa-lightbulb" }} +{{ $url_text := .Get "url_text" }} +<div class="col-lg-4 mb-5 mb-lg-0 text-center "> + <div class="mb-4 h1"> + <i class="{{ if not (or (hasPrefix $icon "fas ") (hasPrefix $icon "fab ")) }}fas {{ end }}{{ $icon }}"></i> + </div> + <h4 class="h3">{{ .Get "title" | markdownify }}</h4> + <div class="mb-0">{{ .Inner }}</div> + {{ with .Get "url" }}<p><a href="{{ . }}">{{ with $url_text }}{{ $url_text }}{{ else }}{{ T "ui_read_more" }}{{ end }} …</a></p>{{ end }} +</div> |