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
Example: player._addCard(options) | |
_addCard | |
_fireEvent | |
_hideOutro | |
_overrideControlbarBehavior | |
_removeCard | |
_setControlbarVisibility | |
_setEmailCapture | |
_setEmbedEditor |
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
// Una Kravet's Formula for breaking out of a parent container to fill the page's full width | |
/* | |
This can be used to make an element the full-width of the page is *most* cases | |
Original Idea: https://twitter.com/Una/status/951519740840873984 | |
*/ | |
.una-full-width { | |
width: 100vw; |
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 getContrastYIQ(hexcolor){ | |
var r = parseInt(hexcolor.substr(0,2),16); | |
var g = parseInt(hexcolor.substr(2,2),16); | |
var b = parseInt(hexcolor.substr(4,2),16); | |
var yiq = ((r*299)+(g*587)+(b*114))/1000; | |
return (yiq >= 128) ? 'black' : 'white'; | |
} |
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
var sectionId = ''; | |
var isDev; | |
var assetDomain = 'https://production.now.sh'; | |
if(window.localStorage) { | |
isDev = localStorage.getItem("isDev"); | |
} | |
if (isDev) { |
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
<!-- Blade --> | |
<div class="{{ $classList }} {{ $spacingClasses ?? 'm-3' }} {{ $colorClasses ?? 'text-light' }}"> | |
</div> | |
<!-- Vue --> | |
<div :class="`${ classList } ${ spacingClasses || 'm-3' } ${ colorClasses || 'text-light' }`"> | |
</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
/* | |
* Just add vc_reverse-rows to the classes of what you want to reverse | |
*/ | |
.vc_reverse-rows .col { | |
flex-direction: row-reverse; | |
} |
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
/* | |
This a helper for adding Facebook's Javascript SDK in a modern development environment with build tools. | |
Runs as a promise so you can run: | |
await const FB = facebook() | |
OR | |
facebook().then((FB) => { | |
}) | |
and then know that your facebook SDK is initialized | |
It also should work with fullstack frameworks like Next.js and Nuxt.js |
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
// Cropping towards a focal point | |
/* | |
This controls where the image is cropped toward as | |
the design flows around it responsively. | |
This would be the same as a focal point in photography. | |
Original Idea: https://designshack.net/articles/mobile/focal-point-intelligent-cropping-of-responsive-images/ | |
*/ |
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 | |
/** | |
* Get a users first name from the full name | |
* or return the full name if first name cannot be found | |
* e.g. | |
* James Smith -> James | |
* James C. Smith -> James | |
* Mr James Smith -> James | |
* Mr Smith -> Mr Smith |
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
.fb_dialog, | |
.fb_dialog.fb_dialog_advanced.fb_shrink_active, | |
.fb_iframe_widget iframe, | |
.fb_dialog_content iframe { | |
display: none; | |
} |