115 lines
4.3 KiB
HTML
115 lines
4.3 KiB
HTML
{{/*
|
|
sectionId: Optional argument to override the default HTML id for this section. If not provided, the default id is used. */}}
|
|
{{ $sectionId := "showcase" }}
|
|
{{ with .Get "sectionId" }}
|
|
{{ $sectionId = . }}
|
|
{{ end }}
|
|
|
|
<section {{if $sectionId}} id="{{ $sectionId }}"{{end}} class="rad-showcase rad-showcase--index rad-animation-group rad-fade-down">
|
|
<div id="main-content">
|
|
|
|
{{- $contextType := printf "%T" . -}}
|
|
{{- $isShortcode := (eq $contextType "*hugolib.ShortcodeWithPage") -}}
|
|
{{- $inner := (.Scratch.Get "Inner") -}}
|
|
|
|
|
|
|
|
{{/* ---------------------------------------------------------------------------
|
|
INTRO TITLE / DESCRIPTION / BUTTON
|
|
--------------------------------------------------------------------------- */}}
|
|
{{- /* Intro title/description */}}
|
|
{{- $showcaseTitle := "" -}}
|
|
{{- $showcaseSubtitle := "" -}}
|
|
{{- $showcaseDescription := "" -}}
|
|
{{- $buttonURL := "" -}}
|
|
{{- $buttonIcon := "" -}}
|
|
{{- $buttonText := "" -}}
|
|
{{- $imgSrc := "" -}}
|
|
{{- $imgWidth := 0 -}}
|
|
{{- $imgHeight := 0 -}}
|
|
{{- $imgScale := 0.5 -}}
|
|
{{- $socialLinks := "" -}}
|
|
|
|
{{- if $isShortcode }}
|
|
{{/* Shortcode params */}}
|
|
{{- $showcaseTitle = .Get "title" | default ( i18n "showcase_title" ) -}}
|
|
{{- $showcaseSubtitle = .Get "subtitle" | default ( i18n "showcase_subtitle" ) -}}
|
|
{{- $showcaseDescription = .Get "description" | default ( i18n "showcase_description" ) | safeHTML -}}
|
|
{{- $buttonURL = .Get "button_url" | default .Site.Data.homepage.showcase.button.URL -}}
|
|
{{- $buttonIcon = .Get "button_icon" | default .Site.Data.homepage.showcase.button.icon -}}
|
|
{{- $buttonText = .Get "button_text" | default false -}}
|
|
{{- $imgSrc = .Get "imgSrc" | default .Site.Data.homepage.showcase.image.src -}}
|
|
{{- $imgWidth = .Get "imgWidth" | default .Site.Data.homepage.showcase.image.width -}}
|
|
{{- $imgHeight = .Get "imgHeight" | default .Site.Data.homepage.showcase.image.height -}}
|
|
{{- $imgScale = .Get "imgScale" | default .Site.Data.homepage.showcase.image.scale -}}
|
|
{{- $socialLinks = .Get "social_links" -}}
|
|
{{ else }}
|
|
{{/* Fallback site or i18n */}}
|
|
{{- $showcaseTitle = i18n "showcase_title" -}}
|
|
{{- $showcaseSubtitle = i18n "showcase_subtitle" -}}
|
|
{{- $showcaseDescription = i18n "showcase_description" | safeHTML -}}
|
|
{{- $buttonURL = .Site.Data.homepage.showcase.button.URL -}}
|
|
{{- $buttonIcon = .Site.Data.homepage.showcase.button.icon -}}
|
|
{{- $buttonText = i18n "showcase_button" -}}
|
|
{{- $imgSrc = .Site.Data.homepage.showcase.image.src -}}
|
|
{{- $imgWidth = .Site.Data.homepage.showcase.image.width -}}
|
|
{{- $imgHeight = .Site.Data.homepage.showcase.image.height -}}
|
|
{{- $imgScale = .Site.Data.homepage.showcase.image.scale -}}
|
|
{{- $socialLinks = .Site.Data.homepage.showcase.socialLinks -}}
|
|
{{ end }}
|
|
|
|
|
|
{{ warnf "showcase.html: Image x: %q" $imgSrc }}
|
|
|
|
<div class="showcase-section row flex-column-reverse flex-md-row rad-fade-down rad-waiting rad-animate">
|
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
|
<h1 class="display-1">
|
|
{{ $showcaseTitle }}
|
|
</h1>
|
|
<h2 class="display-5">
|
|
<span>{{ $showcaseSubtitle | safeHTML }}</span>
|
|
</h2>
|
|
<div class="lead">
|
|
{{ $showcaseDescription }}
|
|
</div>
|
|
{{ if $buttonText }}
|
|
<a
|
|
href="{{ $buttonURL }}"
|
|
class="btn btn-primary"
|
|
>
|
|
<i class="{{ $buttonIcon }}"></i>
|
|
{{ $buttonText }}
|
|
</a>
|
|
{{ end }}
|
|
</div>
|
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 profile-image">
|
|
{{ partial "lazypicture" (dict "src" $imgSrc "width" $imgWidth "height" $imgHeight "scale" $imgScale "class" "")}}
|
|
|
|
<!-- future "right text -->
|
|
|
|
</div>
|
|
|
|
{{- if $inner }}
|
|
<div class="col-12 inner-content">
|
|
{{ $inner }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row platform-links">
|
|
<div class="col-12">
|
|
{{- if $socialLinks -}}
|
|
{{ range $socialLinks }}
|
|
<a href="{{ .URL | absURL }}" target="_blank" rel="noopener noreferrer" aria-label="{{ .icon }}"
|
|
><i class="icon-{{ .icon }}"></i
|
|
></a>
|
|
{{ end }}
|
|
{{- end -}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|