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
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
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 copyTextToClipboard = (textString) => { | |
const textarea = document.createElement('textarea') | |
textarea.value = textString | |
document.body.appendChild(textarea) | |
textarea.select() | |
document.execCommand('copy') | |
document.body.removeChild(textarea) | |
} |
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
// Device sizes | |
$phone: 599px; | |
$tablet-portrait: 600px; | |
$tablet-landscape: 900px; | |
$desktop: 1200px; | |
$desktop-big: 1800px; | |
// Media queries | |
@mixin for-phone-only { | |
@media (max-width: $phone) { |
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
* { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} |
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
body { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
* { | |
box-sizing: inherit; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; |
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
p { | |
overflow: hidden; | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
} |
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 shuffleArray (array) { | |
let currentIndex = array.length | |
let temporaryValue | |
let randomIndex | |
// While there remain elements to shuffle. | |
while (currentIndex !== 0) { | |
// Pick a remaining element | |
randomIndex = Math.floor(Math.random() * currentIndex) | |
currentIndex -= 1 |
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 debounce (func, wait = 100, immediate) { | |
let timeout | |
return function () { | |
const context = this | |
const args = arguments | |
const later = function () { | |
timeout = null | |
if (!immediate) func.apply(context, args) |
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
setTimeout(() => { | |
if (!HAS_LOADED_CONDITION) { | |
// This should be sent to your error tracking system | |
console.error('⚠️ Slow connection!') | |
} | |
}, 10000) |
NewerOlder