This file contains hidden or 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
(function ($, window, undefined) { | |
var App = (window.App === undefined) ? (window.App = {}) : window.App; | |
(App.Views === undefined && (App.Views = {})); | |
App.Views.DragSlides = Backbone.View.extend({ | |
el: '.dragslides', | |
initialize: function () { | |
if (!this.$el.length) { |
This file contains hidden or 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
[ | |
"", | |
"1, улица", | |
"2, улица", | |
"3, улица", | |
"4, улица", | |
"5, улица", | |
"6, улица", | |
"7, улица", | |
"8, улица", |
This file contains hidden or 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
export default function slugify(text) { | |
const a = 'àáäâèéëêìíïîòóöôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;'; | |
const b = 'aaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------'; | |
const p = new RegExp(a.split('').join('|'), 'g'); | |
/* eslint-disable */ | |
return text | |
.toString() | |
.toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - |
This file contains hidden or 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
/* | |
Package.json | |
{ | |
"name": "gulpdev", | |
"version": "0.0.1", | |
"description": "", | |
"main": "index.php", | |
"scripts": { | |
"dev": "gulp" |
This file contains hidden or 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
<?php | |
$args = array( | |
'post_type' => 'product', | |
'stock' => 1, | |
'posts_per_page' => 4, | |
'orderby' => 'date', | |
'order' => 'DESC' | |
); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); |
This file contains hidden or 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 {TRACKING_ID} from '../appConfig'; | |
import store from '../store/store'; | |
let gaAvailable = false; | |
let ga = null; | |
const loadAnalytics = () => { | |
const isPageSpeedBot = (navigator.userAgent.indexOf('Speed Insights') !== -1); | |
const blockTracking = store.getters.track.toString() === 'false'; | |
if (blockTracking || isPageSpeedBot) { |
This file contains hidden or 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
(function(window){ | |
const mediaRegex = /img|video/gi; | |
const linkStyles = { | |
display: 'inline-block', | |
padding: '5px 10px', | |
backgroundColor: '#ffffff', | |
color: '#262626', | |
fontWeight: '600', | |
cursor: 'pointer', |
This file contains hidden or 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
//Test if the PWA is running in standalone mode | |
window.matchMedia( '(display-mode: standalone)' ).matches |
This file contains hidden or 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
/* | |
* Converts firebase object to Array; | |
* Each object from the array will contain 'key' property, | |
* corresponding to the firebase key | |
* */ | |
const toArray = function (firebaseObj) { | |
return Object.keys(firebaseObj).map((key)=> { | |
return Object.assign(firebaseObj[key], {key}); |
This file contains hidden or 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
'use strict'; | |
window._ = {}; | |
_.templateSettings = { | |
evaluate: /<%([\s\S]+?)%>/g, | |
interpolate: /<%=([\s\S]+?)%>/g, | |
escape: /<%-([\s\S]+?)%>/g | |
}; |