Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/vex-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThemefisher Dev <themefisher.dev@gmail.com>2020-01-09 12:24:58 +0300
committerThemefisher Dev <themefisher.dev@gmail.com>2020-01-09 12:24:58 +0300
commit40588199b1253be3bb2ff71000e0e308df45ef6b (patch)
tree3e253e6df7b5d2e054c0a089b379940e77b423f2 /layouts
parent4e5adc63fb021c307c3eebf81472bc14cc46f548 (diff)
added snipcart
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/banner.html46
-rw-r--r--layouts/partials/footer.html19
-rw-r--r--layouts/partials/preloader.html8
-rw-r--r--layouts/partials/testimonials.html17
4 files changed, 57 insertions, 33 deletions
diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html
index cb82322..aeb7a91 100644
--- a/layouts/partials/banner.html
+++ b/layouts/partials/banner.html
@@ -1,23 +1,33 @@
{{- if .Site.Data.homepage.banner.enable }}
-{{- with .Site.Data.homepage.banner }}
<!-- hero area -->
<section class="section">
- <div class="container">
- <div class="row">
- <div class="col-md-6 text-center mb-5 mb-md-0">
- <img class="img-fluid" src="{{ .image | absURL }}" alt="">
- </div>
- <div class="col-md-6 align-self-center text-center text-md-left">
- <div class="block">
- <h1 class="font-weight-bold mb-4 font-size-60">{{ .title | markdownify }}</h1>
- <p class="mb-4">{{ .content | markdownify }}</p>
- {{- with .button }}
- <a class="btn btn-main" href="{{ .link | absURL }}" role="button">{{ .label }}</a>
- {{- end }}
- </div>
- </div>
- </div><!-- .row close -->
- </div><!-- .container close -->
+ <div class="container">
+ <div class="row">
+ {{- with .Site.Data.homepage.banner }}
+ <div class="col-md-6 text-center mb-5 mb-md-0">
+ <img class="img-fluid" src="{{ .image | absURL }}" alt="">
+ </div>
+ <div class="col-md-6 align-self-center text-center text-md-left">
+ <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 .Site.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 }}>{{ .Site.Data.homepage.banner.button }}</button>
+ </div>
+ </div>
+ </div><!-- .row close -->
+ </div><!-- .container close -->
</section><!-- header close -->
-{{- end }}
{{- end }} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index f04ae50..8fee209 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -3,7 +3,7 @@
<div class="row">
<div class="col-md-12">
<div class="block">
- <a href="{{ .Site.BaseURL }}" class="footer-logo mb-4">{{ if .Site.Params.logo }} <img src="{{ .Site.Params.logo | absURL }}" alt="{{ .Title }}"> {{ else }} {{ .Title }} {{ end }}</a>
+ <a href="{{ .Site.BaseURL }}" class="footer-logo mb-4">{{ if .Site.Params.logo }} <img src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}"> {{ else }} {{ .Title }} {{ end }}</a>
<ul class="list-inline footer-menu">
<li class="list-inline-item">
<a href="{{ .Site.BaseURL }}">{{ .Site.Params.home }}</a>
@@ -22,14 +22,20 @@
</footer>
-{{ "<!-- JS Plugins -->" | safeHTML }}
+<!-- Snipcart public key -->
+<div hidden id="snipcart" data-api-key="{{ .Site.Params.snipcart_api }}"></div>
+
+<!-- JS Plugins -->
{{ range .Site.Params.plugins.js}}
<script src="{{ .URL | absURL }}"></script>
{{ end }}
-{{ "<!-- Main Script -->" | safeHTML }}
+
+<!-- Main Script -->
{{ $script := resources.Get "script.js" }}
<script src="{{ $script.Permalink }}"></script>
-{{ "<!-- google analitycs -->" | safeHTML }}
+
+<!-- google analitycs -->
+{{ with .Site.Params.google_analitycs_id }}
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
@@ -42,6 +48,7 @@
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
- ga('create', '{{ .Site.Params.googleAnalitycsID }}', 'auto');
+ ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
-</script> \ No newline at end of file
+</script>
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/preloader.html b/layouts/partials/preloader.html
index 3009475..0707c57 100644
--- a/layouts/partials/preloader.html
+++ b/layouts/partials/preloader.html
@@ -1,5 +1,9 @@
{{ if .Site.Params.preloader.enable }}
-<div id="preloader-wrapper">
- <div class="pre-loader"></div>
+{{ "<!-- preloader start -->" | safeHTML }}
+<div class="preloader">
+ {{ with .Site.Params.preloader.preloader }}
+ <img src="{{ . | absURL }}" alt="preloader">
+ {{ end }}
</div>
+{{ "<!-- preloader end -->" | safeHTML }}
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/testimonials.html b/layouts/partials/testimonials.html
index e85c6f2..f29e369 100644
--- a/layouts/partials/testimonials.html
+++ b/layouts/partials/testimonials.html
@@ -1,7 +1,7 @@
{{ if .Site.Data.homepage.testimonial.enable }}
-{{ with .Site.Data.homepage.testimonial }}
<section class="testimonials section" id="testimonial">
<div class="container">
+ {{ with .Site.Data.homepage.testimonial }}
<div class="row justify-content-center">
<div class="col-12">
<div class="heading">
@@ -22,16 +22,19 @@
</div>
{{ end }}
</div>
- {{ if .button.enable }}
+ {{ end }}
<div class="row mt-100">
<div class="col-md-12 text-center">
- {{ with .button }}
- <a href="{{ .link | absURL }}" class="btn btn-main">{{ .label }}</a>
- {{ end }}
+ <button class="snipcart-add-item btn btn-main" {{with .Site.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 }}>Grab You Product Now</button>
</div>
</div>
- {{ end }}
</div>
</section>
-{{ end }}
{{ end }} \ No newline at end of file