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
<!-- UNIFY CUSTOM --> | |
<div class="uni-addon-products"> | |
<h4>Receive Your Treats Every:</h4> | |
<select class="weekSelect"> | |
<option deselected>Select Frequency</option> | |
<option value="2">One Time Purchase</option> | |
<option value="3" selected>Every 1 Week</option> | |
<option value="4">Every 2 Weeks</option> |
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
We need to use a WeakMap because if we store the actual dom node as on Object or Map we would run into this issue [object Object] | |
class DOMStore { | |
constructor(){ | |
this.store = new WeakMap(); | |
} | |
set(key,val){ | |
this.store.set(key,val); | |
} | |
get(key){ |
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
echo " | |
server { | |
listen 80; | |
server_name $1; | |
location / { | |
proxy_set_header X-Real-IP \$remote_addr; | |
proxy_set_header X-Forwarded-For \$remote_addr; | |
proxy_set_header Host \$host; | |
proxy_pass http://127.0.0.1:$2; |
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
<Fragment> | |
{data.tables.map((table, i) => { | |
return <section key={i} className="ourTable"> | |
<table> | |
<caption>{table.title}</caption> | |
<tbody> | |
{table.rows.map((row, i) => { | |
return <tr className={`col-${i + 1}`} key={i}> | |
{row.cols.map((col, i) => { | |
return <td className={`col-${i + 1}`} key={i}>{col.value}</td> |
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
{ | |
"table":[{ | |
"title":"Table Title", | |
"rows":[{ | |
"cols":[ | |
{ | |
} | |
] | |
}] |
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
<table> | |
<tr> | |
<th></th> | |
</tr> | |
<tr> | |
<td></td> | |
</tr> | |
<tr> | |
<td></td> | |
</tr> |
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
switch (a) { | |
case a: | |
return <Component1 /> | |
case b: | |
return <Component2 /> | |
case …z | |
return <Components 3–26 /> etc… | |
default; | |
} |
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
import { | |
Hero, | |
Footer | |
} from '../../components'; | |
const components = { | |
hero: Hero, | |
footer: Footer | |
}; | |
function DisplayThisStuff() { | |
/* Ajax call to API to get data |
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
window.addEventListener('resize', function(){ | |
let desktopThumbnailWrapper = document.querySelector('.thumbnails-wrapper'); | |
let desktopThumbnailParent = desktopThumbnailWrapper.parentNode; | |
let shopifyProductReviews = document.querySelector('#shopify-product-reviews'); | |
let shopifyReviewsProductParent = shopifyProductReviews.parentNode; |
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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org/", | |
"@type": "Product", | |
"name": "{{ product.title | strip_html | escape }}", | |
"url": "{{ shop.url }}{{ product.url }}", | |
{% if current_variant.sku != blank %} | |
"sku": "{{ current_variant.sku }}", | |
{% endif %} |
NewerOlder