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 truncate(str, length) { | |
if (str.length > length + 3) { /* there needs to be some room for the ellipses */ | |
str = str.substring(0, length); | |
lastChar = str.substring(str.length - 1); | |
// while lastChar is period or space, chop string more | |
while (lastChar === "." || lastChar === " ") { | |
str = str.substring(0, str.length - 1); | |
lastChar = str.substring(str.length - 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
/* Set up Grids */ | |
$susy: ( | |
container: 100%, | |
columns: 16, | |
column-width: 50px, | |
gutters: 1/2, | |
gutter-position: inside | |
); | |
@mixin clearfix { |
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
// BREAKPOINTS | |
@mixin bp($break) { | |
@if $break == xlarge { | |
@media (min-width: 1700px) { @content; } | |
} | |
@if $break == large { | |
@media (min-width: 1200px) { @content; } | |
} | |
@else if $break == medium { | |
@media (min-width: 992px) { @content; } |
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 { | |
font-size: 62.5%; | |
} | |
body { | |
font-size: 1.6em; | |
line-height: 1.625; | |
} | |
h1 { font-size: 6.777rem; } | |
h2 { font-size: 5.483rem; } |
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
Template.registerHelper('getStars', function(rating) { | |
var str = ''; | |
var rating = rating.toString(); | |
var substr = rating.split('.'); | |
var decimal = substr[1]; | |
// put full stars for whole number before the decimal | |
for(i = 0; i < substr[0]; i++) { | |
str += '<i class="icon ion-ios-star"></i>'; | |
count++; |
NewerOlder