diff options
Diffstat (limited to 'layouts/partials/banner.html')
-rw-r--r-- | layouts/partials/banner.html | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html index ccce7a5..f596fc1 100644 --- a/layouts/partials/banner.html +++ b/layouts/partials/banner.html @@ -1,11 +1,11 @@ {{ $data := index .Site.Data .Site.Language.Lang }} {{- if $data.homepage.banner.enable }} +{{- with $data.homepage.banner }} <!-- hero area --> <section class="section"> <div class="container"> <div class="row"> - {{- with $data.homepage.banner }} <div class="col-md-6 text-center mb-5 mb-md-0"> <img class="img-fluid" src="{{ .image | absURL }}" alt=""> </div> @@ -13,23 +13,15 @@ <div class="block"> <h1 class="font-weight-bold mb-4 font-size-60">{{ .title | markdownify }}</h1> <p class="mb-4">{{ .content | markdownify }}</p> - {{- end }} - <button class="snipcart-add-item btn btn-main" - {{with $data.homepage.product }} data-item-id="{{ .name | urlize }}__{{ .price }}" - data-item-name="{{ .name }}" - data-item-image="{{ .image | absURL }}" - data-item-price="{{ .price }}" data-item-url="{{ .Permalink }}" - {{ if .colors }} - data-item-custom1-name="Choose Color" - data-item-custom1-options="{{ range $index, $element:= .colors }}{{ if eq $index 0 }}{{ . | title }}{{ else }}|{{ . | title }}{{ end }}{{ end }}" - {{ end }} - {{ if .sizes }} - data-item-custom2-name="Choose Size" - data-item-custom2-options="{{ range $index, $element:= .sizes }}{{ if eq $index 0 }}{{ . | title }}{{ else }}|{{ . | title }}{{ end }}{{ end }}" - {{ end }}{{ end }}>{{ $data.homepage.banner.button }}</button> + {{ if .button.enable }} + {{ with .button }} + <a href="{{.link|absLangURL}}" class="btn btn-main">{{.label}}</a> + {{ end }} + {{ end }} </div> </div> </div><!-- .row close --> </div><!-- .container close --> </section><!-- header close --> +{{- end }} {{- end }}
\ No newline at end of file |