forked from Shopify/draggable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete polish review of Examples project
- Loading branch information
Showing
114 changed files
with
597 additions
and
710 deletions.
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
function gtag() { | ||
window.dataLayer.push(arguments); // eslint-disable-line prefer-rest-params | ||
} | ||
|
||
export default class Analytics { | ||
constructor(ua) { | ||
this.ua = ua; | ||
} | ||
|
||
init() { | ||
if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') { | ||
console.log('🤖 Analytics disabled in local development.'); | ||
return; | ||
} | ||
|
||
this._appendScript() | ||
.then(() => { | ||
window.dataLayer = window.dataLayer || []; | ||
|
||
gtag('js', new Date()); | ||
gtag('config', this.ua); | ||
|
||
return window.dataLayer; | ||
}) | ||
.catch((error) => console.warn(error)); | ||
} | ||
|
||
_appendScript() { | ||
return new Promise((resolve, reject) => { | ||
const script = document.createElement('script'); | ||
document.body.appendChild(script); | ||
script.onload = resolve; | ||
script.onerror = reject; | ||
script.async = true; | ||
script.src = `https://www.googletagmanager.com/gtag/js?id=${this.ua}`; | ||
}); | ||
} | ||
} |
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<a href="./" class="Brand" title="Return to Examples index"> | ||
<div class="SvgContainer BrandLogo"> | ||
{% include './Logo.html' %} | ||
{% include 'components/Brand/Logo.html' %} | ||
</div> | ||
|
||
<div class="SvgContainer BrandWordmark"> | ||
{% include './Wordmark.html' %} | ||
{% include 'components/Brand/Wordmark.html' %} | ||
</div> | ||
</a> |
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//// | ||
/// Components | ||
/// Brand props | ||
//// | ||
|
||
$logo-width: 4.6rem; | ||
$wordmark-width: 17.6rem; | ||
$logo-bounce-offset: 0.1rem; | ||
|
||
@mixin logo-animation { | ||
.Wave--colorMask { | ||
animation: logo-rainbow-mask get-duration(slow) get-easing() infinite; | ||
} | ||
|
||
.Wave--colorPurple { | ||
animation: logo-rainbow-purple get-duration(slow) get-easing() infinite; | ||
} | ||
|
||
.Wave--colorRed { | ||
animation: logo-rainbow-red get-duration(slow) get-easing() infinite; | ||
} | ||
|
||
.Wave--colorOrange { | ||
animation: logo-rainbow-orange get-duration(slow) get-easing() infinite; | ||
} | ||
|
||
.Hand { | ||
animation: logo-outline-bounce get-duration(slow) linear infinite; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
/// Hamburger keyframes | ||
//// | ||
|
||
@import 'props'; | ||
|
||
@keyframes FadeActivator { | ||
to { | ||
opacity: 1; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/// DragHandle | ||
//// | ||
|
||
@import './props'; | ||
@import 'props'; | ||
|
||
.DragHandle { | ||
position: relative; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/// NopeHandle | ||
//// | ||
|
||
@import './props'; | ||
@import 'props'; | ||
|
||
.NopeHandle { | ||
position: relative; | ||
|
Oops, something went wrong.