mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-05 06:13:14 +00:00
See https://discord.com/channels/722225264733716590/738924091511144489/1406144559188283494 See https://gohugo.io/templates/new-templatesystem-overview/
34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#call-to-action-buttons
|
|
|
|
Parameters
|
|
----------
|
|
cta_text :
|
|
Text to display in the CTA button.
|
|
cta_link :
|
|
Link to action when CTA button is clicked.
|
|
cta_new_tab : default "false"
|
|
If "true", open the link in a new tab.
|
|
cta_alt_text : optional
|
|
Alternate text to display in the CTA button.
|
|
cta_alt_link : optional
|
|
Link to alternative action when CTA button is clicked.
|
|
cta_alt_new_tab : optional, default "false"
|
|
If "true", open the alternative link in a new tab.
|
|
*/}}
|
|
|
|
<ul class="cta-group">
|
|
{{ if (.Get "cta_text") }}
|
|
<li>
|
|
<a href="{{.Get "cta_link"}}" {{if eq (.Get "cta_new_tab") "true" }}target="_blank" rel="noopener"{{end}} class="btn btn-primary px-3 py-3">{{ (.Get "cta_text") | markdownify | emojify }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ if (.Get "cta_alt_text") }}
|
|
<li>
|
|
<a href="{{.Get "cta_alt_link"}}" {{if eq (.Get "cta_alt_new_tab") "true" }}target="_blank" rel="noopener"{{end}}>
|
|
{{ (.Get "cta_alt_text") | markdownify | emojify }} <i class="fas fa-angle-right"></i>
|
|
</a>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|