diff --git a/exampleSite/content/home/hero.md b/exampleSite/content/home/hero.md index a12c8249..93fabc36 100644 --- a/exampleSite/content/home/hero.md +++ b/exampleSite/content/home/hero.md @@ -8,28 +8,36 @@ title = "Academic" # Order that this section will appear in. weight = 3 +# Hero image (optional). Enter filename of an image in the `static/img/` folder. +hero_media = "hero-academic.png" + # Overlay a color or image (optional). # Deactivate an option by commenting out the line, prefixing it with `#`. [header] - overlay_color = "#666" # An HTML color value. - overlay_img = "headers/bubbles-wide.jpg" # Image path relative to your `static/img/` folder. + overlay_color = "#4bb4e3" # An HTML color value. + overlay_img = "" # Image path relative to your `static/img/` folder. overlay_filter = 0.5 # Darken the image. Value in range 0-1. -# Call to action button (optional). -# Activate the button by specifying a URL and button label below. -# Deactivate by commenting out parameters, prefixing lines with `#`. +# Call to action links (optional). +# Display link(s) by specifying a URL and label below. Icon is optional for `[cta]`. +# Remove a link/note by deleting a cta/note block. [cta] - url = "./post/getting-started/" - label = ' Install Now' + url = "post/getting-started/" + label = "Get Started" + icon_pack = "fas" + icon = "download" + +[cta_alt] + url = "https://sourcethemes.com/academic/" + label = "View Documentation" + +# Note. An optional note to show underneath the links. +[cta_note] + label = 'Latest release ' +++ -The highly flexible website framework for Hugo with an extensible plugin mechanism. Create a beautifully simple site in under 10 minutes :rocket: -
-{{ . | markdownify }}
+ {{ if $page.Params.hero_media }} +{{ $page.Params.cta.label | safeHTML}}
++ {{ if $page.Params.cta.icon }} {{end}}{{ $page.Params.cta.label | markdownify | emojify | safeHTML }} + + {{/* Alternative Call-to-action link */}} + {{ if $page.Params.cta_alt.url }} + {{ $link := $page.Params.cta_alt.url }} + {{ $scheme := (urls.Parse $link).Scheme }} + {{ $target := "" }} + {{ if not $scheme }} + {{ $link = $link | relLangURL }} + {{ else if in (slice "http" "https") $scheme }} + {{ $target = "target=\"_blank\" rel=\"noopener\"" }} + {{ end }} + {{ $page.Params.cta_alt.label | markdownify | emojify | safeHTML }} + {{ end }} +
+ {{ end }} + + {{/* Call-to-action note */}} + {{ with $page.Params.cta_note }} ++ {{ .label | markdownify | emojify | safeHTML }} +
+ {{ end }} + + {{/* Hero image */}} + {{ if $page.Params.hero_media }} +