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 * as React from 'react'; | |
import * as Yup from 'yup'; | |
import axios from 'axios'; | |
import { Formik } from 'formik'; | |
const URL = process.env.WP_REST_API_BASE_URL; | |
const USER = process.env.WP_USER; | |
const PASSWORD = process.env.WP_APPLICATION_PASSWORD; | |
const TOKEN = typeof window !== 'undefined' && window.btoa(`${USER}:${PASSWORD}`); // Convert Base64 | |
const CF7_ID = process.env.WP_CF7_ID; |
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
/** | |
* canUseDOM | |
* @return {Boolean} | |
*/ | |
export const canUseDOM = !!( | |
typeof window !== 'undefined' && window.document && window.document.createElement | |
) | |
/** | |
* win |
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
const FulidPlyr = (parentSelector) => { | |
if (parentSelector === undefined) { | |
parentSelector = '.FulidPlyr' | |
} | |
let element = document.querySelector(parentSelector) | |
let ratio = 16 / 9 | |
let height = window.innerHeight | |
let width = window.innerWidth | |
let windowRatio = width / height |
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 checkPls from 'check-pls' | |
import ImagesLoaded from 'imagesLoaded' | |
/* | |
@parentSelectors = [] | |
@selector = '' | |
@className = '' | |
*/ | |
const checkDirection = (parentSelectors, selector, className) => { |
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 function getElements (class) { | |
return Array.prototype.slice.call(document.querySelectorAll('.' + class)); | |
} |
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
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Gutter Control</title> | |
<style type="text/css"> | |
/* debug */ | |
* { | |
background-color: rgba(0, 230, 200, .2); | |
} |
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
<div | |
data-doorman-direction="lr" | |
data-doorman-bgColor="rgb(000, 000, 000)" | |
data-doorman-duration="300" | |
data-doorman-delay="150" | |
data-doorman-easing="cubic-bezier(0.860, 0.000, 0.070, 1.000)" | |
data-doorman-reverse="false" | |
> | |
Content... | |
</div> |
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
{ | |
direction: 'lr', | |
// lr (left to right) || rl (right to left) || tb (top to bottom) || bt (bottom to top). | |
bgColor: 'rgb(000, 000, 000)', | |
duration: '300', // ms | |
delay: '0', // ms | |
easing: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)', // easeInOutQuint | |
reverse: false, | |
begin: function(element) { }, | |
complete: function(element) { } |
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
<style> | |
.section { | |
height: 100vh; | |
} | |
[data-doorman] { | |
display: inline-block; | |
visibility: hidden; | |
} | |
</style> |
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
const elements = document.querySelectorAll('[data-doorman]'); | |
Array.prototype.forEach.call(elements, function (el) { | |
const doorman = new Doorman(el, { /* options */ }); | |
doorman.start(); | |
}); |
NewerOlder