mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 20:01:21 -04:00
feat: add shortcodes to build Hextra home page (#90)
* feat: add feature grid and card shortcodes * feat: add markdown content to hextra home * chore: add button for hextra home * chore: add heading and subtitle * chore: finish moving hextra home to shortcodes * chore: regenerate css * chore: improve hextra home layout shortcodes * chore: update css * chore: decrease button size
This commit is contained in:
15
layouts/shortcodes/hextra/hero-button.html
Normal file
15
layouts/shortcodes/hextra/hero-button.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{- $link := .Get "link" -}}
|
||||
{{- $text := .Get "text" -}}
|
||||
{{- $style := .Get "style" -}}
|
||||
|
||||
{{- $external := hasPrefix $link "http" -}}
|
||||
{{- $href := cond (hasPrefix $link "/") ($link | relURL) $link -}}
|
||||
|
||||
<a
|
||||
href="{{ $href }}"
|
||||
class="font-medium cursor-pointer px-6 py-3 rounded-full text-center text-white inline-block bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 transition-all ease-in duration-200"
|
||||
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
|
||||
{{ if $external }}target="_blank" rel="noreferrer"{{ end -}}
|
||||
>
|
||||
{{- $text -}}
|
||||
</a>
|
Reference in New Issue
Block a user