Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Block Update #1396

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
14 changes: 13 additions & 1 deletion layouts/shortcodes/blocks/feature.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
{{ $icon := .Get "icon" | default "fa-lightbulb" -}}
{{ $url_text := .Get "url_text" -}}
{{ $title := .Get "title" | markdownify }}
{{ $content := . }}
<div class="col-lg-4 mb-5 mb-lg-0 text-center">
<div class="mb-4 h1">
{{ with $content.Get "url" }}
<a class="text-white" target="_blank" href="{{ . }}">
<i class="{{ if not (or (hasPrefix $icon "fas ") (hasPrefix $icon "fab ")) }}fas {{ end }}{{ $icon }}"></i>
</a>
{{ else }}
<i class="{{ if not (or (hasPrefix $icon "fas ") (hasPrefix $icon "fab ")) }}fas {{ end }}{{ $icon }}"></i>
{{ end }}
</div>
<h4 class="h3">
{{- .Get "title" | markdownify -}}
{{ with .Get "url" }}
<a class="text-white" target="_blank" href="{{ . }}"><p>{{ $title }}</p></a>
{{ else }}
<p>{{ $title }}</p>
{{ end }}
</h4>
<div class="mb-0">
{{ .Inner }}
Expand Down