Skip to content

Instantly share code, notes, and snippets.

@nielsnuebel
Created January 17, 2018 11:18
Show Gist options
  • Save nielsnuebel/6e5048f18f069eb7c95049e7fe120513 to your computer and use it in GitHub Desktop.
Save nielsnuebel/6e5048f18f069eb7c95049e7fe120513 to your computer and use it in GitHub Desktop.
// Main JS File
import cq from 'cq-prolyfill' // eslint-disable-line
import Vue from 'vue'
import VeeValidate, { Validator } from 'vee-validate'
import de from 'vee-validate/dist/locale/de'
import VueI18n from 'vue-i18n'
import './partial/contentBuilder'
import lazySizes from 'lazysizes'
import lazybgset from 'lazysizes/plugins/bgset/ls.bgset' // eslint-disable-line
import 'babel-polyfill'
import 'svgxuse' // eslint-disable-line
import './partial/kicktempad' // Small Advertising for Kicktemp :)
import './partial/modernizer-loader'
import './partial/detect-browser'
import './partial/disable-pointerevents'
import Contact from './contact'
const messages = window.i18n || {}
const currentLocale = typeof messages.locale !== 'undefined' ? messages.locale.substr(0, 2) : 'de'
Validator.localize('de', de)
Vue.use(VueI18n)
const i18n = new VueI18n(messages)
Vue.use(VeeValidate, {
locale: currentLocale,
delay: 1000
})
/* eslint-disable no-new */
new Vue({
i18n,
el: '#contact',
render: (h) => h(Contact)
})
// Lasysizes Lazyload Config
const lazySizesConfig = window.lazySizesConfig || {}
window.lazySizesConfig = lazySizesConfig
window.lazySizesConfig.expand = 130
lazySizesConfig.expFactor = 1.3
// Lazy Sizes Init
lazySizes.init()
// Activate Container Queries
cq({ postcss: true })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment