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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
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
if (document.querySelector('html').getAttribute('dir') == 'rtl') { | |
document.querySelector('html').setAttribute('dir', 'ltr'); | |
} else { | |
document.querySelector('html').setAttribute('dir', 'rtl'); | |
} | |
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
body { | |
font-size: calc(1em + 1vw); | |
} |
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
function setup() { | |
var count = 0; | |
return function() { | |
return ++count; | |
}; | |
} | |
var next = setup(); | |
next(); // 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
.masonry-grid { | |
column-count: 1; | |
column-gap: 0; | |
column-fill: auto; | |
@media (min-width: 768px) { | |
column-count: 3; | |
} | |
} |
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
.flex-grid { | |
clear: both; | |
display: flex; | |
flex-wrap: wrap; | |
&-item { | |
display: flex; | |
} | |
.panel { |
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
html { | |
box-sizing: border-box; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
} |
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
/* Title: detach | |
* Description: take element off the DOM while manipulating them | |
*/ | |
var table = $('#some-table'); | |
var parent = table.parent(); | |
table.detach(); | |
table.addLotsAndLotsOfRows(); | |
parent.append(table); |
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
{{block type="cms/block" block_id="your_block_id"}} |
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
function replaceUrlParam(uri, key, value) { | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"), | |
separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (uri.match(re)) { | |
return uri.replace(re, '$1' + key + "=" + value + '$2'); | |
} else { | |
return uri + separator + key + "=" + value; | |
} | |
} |
NewerOlder