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 | |
%head | |
%body | |
.canvas-container | |
%svg.canvas{width: '100%', height: '86.5%', viewbox: '0 0 100 100', preserveAspectRatio: 'midxMidY slice', xmlns: "http://www.w3.org/2000/svg"} |
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
# A dumb helper to check the overlap. You can use Rails' built-in 'overlaps?' if you like | |
def range_overlap?(r1, r2) | |
r1.cover?(r2.first) || r2.cover?(r1.first) | |
end | |
# Times are expressed here as a number of minutes since midnight, which is just | |
# a way of ignoring the date part of a dateTime | |
times = [(600..660), (630..690), (690..705), (840..900)] | |
# First, create an array of the outer edges of each group, expressed as ranges |
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
<h1>Square cropping images</h1> | |
<p> 2 techniques, useful with <a href="https://github.com/stevenschobert/instafeed.js">Instafeed.js</a>, amongst other things.</p> | |
<div class="image-boxes"> | |
<div class="image-box"> | |
<img src="https://instagram.fmel2-1.fna.fbcdn.net/vp/69d4df6c6e8d6bd852d44ca5e6363d57/5B3986B1/t51.2885-15/e35/25036465_1210383369106751_8835892581469519872_n.jpg"/> | |
<span class="caption">Standard Landscape image</span> | |
</div> |
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
<div class="pdpLongDescriptionSeq"> | |
<div class="pdpLongDescription" id="pdpLongDescription"> | |
<div class="displayBox"> | |
<h3>Details</h3> | |
<p>These black classic round toe court are right on the style scene with visible platform and counter stud detail.</p> | |
</div> | |
</div> | |
<div class="pdpLongDescription" id="pdpLongDescription_005170360" style="display:none"> | |
<div class="displayBox"> |
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
<!-- Using raw static navigation --> | |
<ul id="eCommerceNavBarMenu"> | |
<li class="topLevel navfirstitem"> | |
<a class="topLevel" href="/online/shop/new-in"> | |
New In | |
</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
<!-- Using static navigation --> | |
<ul id="eCommerceNavBarMenu"> | |
<li class="topLevel navfirstitem"><a class="topLevel" href="/online/shop/new-in">New | |
In</a></li> | |
<li class="topLevel"> | |
<a class="topLevel" href="/online/shop/shoes">Shoes</a> | |
<div class="ecommerceMegaMenu Shoes c4"> | |
<!-- floated parents need a width (total of children) --> |
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
Twin Twin XL Full Full XL Queen King Cal King | |
var SKUdata = { | |
savingsConfig: { | |
minSavingAmountToDisplay: 10, | |
minSavingPercentageToDisplay: 10 | |
}, | |
attributes: ['Size','Foundation'], | |
skus: { | |
68858: { |
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
var SKUdata = { | |
savingsConfig: { | |
minSavingAmountToDisplay: 10, | |
minSavingPercentageToDisplay: 10 | |
}, | |
attributes: ['Size','Foundation'], | |
skus: { | |
70191: { | |
'Size': 'Twin', |