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
console.log('%cHello from\n%cThe other side',[ | |
'font-family: \'Helvetica\'', | |
'font-weight: normal', | |
'font-size: 15px', | |
'line-height: 1.25', | |
].join(';'), [ | |
'font-family: "Helvetica"', | |
'font-weight: 600', | |
'font-size: 15px', | |
'line-height: 1.25', |
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
//-------------------------------------------------------------- | |
// NXT.js | |
// jQuery-like micro-lib for creating banners | |
// ico[at]next-dc[dot]com | |
//-------------------------------------------------------------- | |
;(function (window, document, undefined) { | |
'use strict'; | |
var $ = function (expression) { |
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
exportImage(event) { | |
event.stopPropagation(); | |
this.ctx.fillStyle = "#333333"; | |
this.ctx.font = 'bold 16px Helvetica, Arial, sans-serif'; | |
this.ctx.textBaseline = "top"; | |
var textSize = this.ctx.measureText("esimov.com"); | |
//this.ctx.fillText("esimov.com", this.size - textSize.width - 10, 5); | |
//retrieve canvas image as data URL: |
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
let cacheVersion = 10; | |
let apiCacheName = 'api'; | |
let staticCacheNamespace = 'static'; | |
let staticCacheName = staticCacheNamespace + '-' + cacheVersion; | |
let staticFiles = [ | |
'/', | |
'/index.html', |
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 | |
}; |
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
//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
(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
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
<?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(); |