-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{{ $data := ($.Scratch.Get "data") }} | ||
{{ "<!-- Item button -->" | safeHTML }} | ||
{{ $bg := $data.background | default "light"}} | ||
|
||
<section {{ with $data.selfLink }}id="{{ . }}"{{ end }}> | ||
<div class="overlay container-fluid | ||
{{- printf " bg-%s" $bg -}} | ||
"> | ||
<div class="container py-5"> | ||
<div class="row align-items-center | ||
{{- if eq $data.align "left" -}} | ||
{{- printf " justify-content-start" -}} | ||
{{- else -}} | ||
{{- printf " justify-content-end" -}} | ||
{{- end -}} | ||
"> | ||
<div class="col-12 col-lg-7 order-12 | ||
{{- if eq $data.align "left" -}} | ||
{{- printf " order-lg-1" -}} | ||
{{- end -}} | ||
"> | ||
{{ if $data.title }} | ||
<div class="row pb-3"> | ||
<div class="col-12 | ||
{{- if or (eq $bg "white") (eq $bg "light") (eq $bg "secondary") (eq $bg "primary") -}} | ||
{{- printf " text-%s" "black" -}} | ||
{{- else -}} | ||
{{- printf " text-%s" "light" -}} | ||
{{- end -}} | ||
"> | ||
<h2> | ||
{{ $data.title | markdownify }} | ||
</h2> | ||
</div> | ||
</div> | ||
{{ end }} | ||
{{ if $data.subtitle }} | ||
<div class="row pb-2 | ||
{{- if or (eq $bg "secondary") (eq $bg "primary") -}} | ||
{{- printf " text-%s" "dark" -}} | ||
{{- else -}} | ||
{{- printf " text-muted text-%s" "secondary" -}} | ||
{{- end -}} | ||
"> | ||
<div class="col-12"> | ||
<h5> | ||
{{ $data.subtitle | markdownify }} | ||
</h5> | ||
</div> | ||
</div> | ||
{{ end }} | ||
{{ if $data.description }} | ||
<div class="mb-0 | ||
{{- if or (eq $bg "secondary") (eq $bg "primary") -}} | ||
{{- printf " text-%s" "dark" -}} | ||
{{- else -}} | ||
{{- printf " text-muted text-%s" "secondary" -}} | ||
{{- end -}} | ||
">{{ $data.description | markdownify}}</div> | ||
{{ end }} | ||
</div> | ||
<div class="col-12 col-lg-4 order-12 mt-5 | ||
{{- if eq $data.align "left" -}} | ||
{{- printf " ml-auto" -}} | ||
{{- else -}} | ||
{{- printf " order-lg-1 mr-auto" -}} | ||
{{- end -}} | ||
"> | ||
<div class="row"> | ||
<div class="col-12 text-center | ||
{{- if eq $data.align "left" -}} | ||
{{- printf " text-lg-left" -}} | ||
{{- else if eq $data.align "right" -}} | ||
{{- printf " text-lg-right" -}} | ||
{{- end -}} | ||
"> | ||
{{ range $data.buttons }} | ||
<a class="btn btn-lg m-2 | ||
{{ if hasPrefix .link "#" }} anchor{{ end }} | ||
{{- $color := .color | default "primary" -}} | ||
{{- printf " btn-%s" $color -}} | ||
" href="{{ .link | relLangURL }}"> | ||
{{ .text }} | ||
</a> | ||
{{ end }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |