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
... | |
<script> | |
var theme = { | |
vue: { | |
availableApps: [] | |
}, | |
breakpoints: { | |
medium: 750, | |
large: 990, |
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
... | |
{%- assign app_type = 'vue-quotes' -%} | |
<div class="vue-quote-app" | |
data-app-type="{{ app_type }}" | |
data-app-id="{{ section.id }}"> | |
<script id="{{ section.id }}-{{ app_type }}"> | |
window.theme.vue.availableApps.push({ | |
type: "{{ app_type }}", | |
id: "{{ section.id }}", |
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
import './vue-section-quotes.scss'; | |
import Vue from 'vue'; | |
import Quotes from './quotes.vue'; | |
export class QuotesApp { | |
constructor(id, data) { | |
this._sectionId = id; | |
this._appType = 'vue-quotes'; | |
this._appInstance = null; | |
this._appData = data; |
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
<template> | |
<div class="vue-quote-app"> | |
<div v-if="settings.title.length > 0" class="section-header text-center"> | |
<h2>{{ settings.title }}</h2> | |
</div> | |
<div class="quotes-wrapper"> | |
<div class="quotes-slider" :data-count="`${blocks.length}`"> | |
<div v-for="(block, index) in blocks" :key="`block-id-${index}`"> | |
<blockquote class="quotes-slider__text text-center"> | |
<span class="quote-icon"> |
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
... | |
if (Shopify.designMode) { | |
// editor mode helper function | |
const registerNewApps = function(event) { | |
const eventSectionId = event.detail.sectionId; | |
event | |
.target | |
.querySelectorAll(`div[data-app-id="${eventSectionId}"]`) | |
.forEach(appElement => { |
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
(t.prototype.initialize = function (e) { | |
(this.pageCalled = !1), this.loadGAScript(); | |
var n = this.options; | |
"localhost" === c.hostname() && (n.domain = "none"), | |
n.enhancedEcommerce && this.enhancedEcommerce(), | |
window.ga("create", n.trackingId, { cookieDomain: n.domain || t.defaultOptions.domain, siteSpeedSampleRate: n.siteSpeedSampleRate, sampleRate: n.sampleRate, allowLinker: !0 }), | |
n.doubleClick && window.ga("require", "displayfeatures"), | |
n.enhancedLinkAttribution && window.ga("require", "linkid"), | |
n.anonymizeIp && window.ga("set", "anonymizeIp", !0), | |
e(); |
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
(t.prototype.enhancedEcommerce = function () { | |
(this.viewedProduct = this.viewedProductEnhanced), | |
(this.addedProduct = this.addedProductEnhanced), | |
(this.startedOrder = this.startedOrderEnhanced), | |
(this.completedOrder = this.completedOrderEnhanced); | |
}), |
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
(t.prototype.enhancedEcommerceTrackProduct = function (e) { | |
var t = { | |
id: e.sku || e.variantId, | |
name: e.name, | |
category: e.category, | |
quantity: this.getProductQuantity(e), | |
price: e.price, | |
brand: e.brand, | |
variant: e.variant, | |
currency: this.getCurrency(e.currency) |
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
(t.prototype.viewedProductEnhanced = function (e) { | |
var t = e.properties; | |
this.loadEnhancedEcommerce(e); | |
var n = this.enhancedEcommerceTrackProduct(t); | |
window.ga("ec:setAction", "detail"); | |
var r = this.pushEnhancedEcommerce(e); | |
this.addMonorailBatchEvent({ eventName: a.ANALYTICS_VIEWED_PRODUCT, eventProperties: JSON.stringify({ item: n, event: r }) }); | |
}), | |
(t.prototype.addedProductEnhanced = function (e) { | |
var t = e.properties; |
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
var v = { | |
id: t.orderName || t.checkoutId, | |
affiliation: t.affiliation, | |
revenue: t.total || t.revenue || 0, | |
tax: t.tax, | |
shipping: t.shipping, | |
coupon: t.coupon | |
}; |
OlderNewer