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
class @GoogleAnalytics | |
@load: -> | |
# Google Analytics depends on a global _gaq array. window is the global scope. | |
window._gaq = [] | |
window._gaq.push ["_setAccount", GoogleAnalytics.analyticsId()] | |
# Create a script element and insert it in the DOM | |
ga = document.createElement("script") | |
ga.type = "text/javascript" |
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
foo = (param, callback) -> | |
callback param | |
foo 3, (x) -> | |
console.log x |
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
en: | |
recipient_mailer: | |
verification: | |
subject: Please confirm your email address. | |
email_body: | | |
Thanks for participating in the {survey_title}. | |
Please click the link below to confirm your email address. By doing so, you'll ensure your responses are counted. | |
Click here: {url} |
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
$.fn.e = (eventName, callback) -> | |
console.log 'eventName: ' + eventName + ' callback: ' + callback | |
$(document).on eventName, this, (event) => | |
console.log 'this.html(): ' + this.html() + ' event.currentTarget: ' + event.currentTarget | |
el = $(event.currentTarget) | |
callback(event, el) | |
$('[showmodal]').e 'click', (e, el) -> | |
href = el.attr('href') | |
console.log 'click callback called! modal: ' + href |
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
class @E | |
@on: (selector, eventName, callback) -> | |
$(document).on eventName, selector, (event) => | |
el = $(event.currentTarget) | |
callback(event, el) | |
@click: (selector, callback) -> | |
@on selector, 'click', (event) => | |
target = $(event.currentTarget) |
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
# general event handler | |
$.e = (selector, eventName, callback) -> | |
$(document).on eventName, selector, (event) => | |
el = $(event.currentTarget) | |
callback(event, el) | |
# click handler | |
$.click = (selector, callback) -> | |
$.e selector, 'click', callback |
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
{ | |
"name": "Vocal Video Charts", | |
"id": 1, | |
"colors": { | |
"common": [ | |
"#FF4C6C", | |
"#00D1C0", | |
"#FF7D58", | |
"#4087F9", | |
"#A17CFF", |
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
without a caption: | |
<video controls poster=''> | |
<source type='video/mp4' src=''> | |
</video> | |
with a caption: | |
<figure> | |
<video controls poster=''> |
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
Max 300px wide: | |
<figure class="kg-card kg-image-card"> | |
<img class="kg-image max-width-300 centered" alt="" src=""> | |
<figcaption>Optional caption here</figcaption> | |
</figure> | |
Max 400px wide: | |
<figure class="kg-card kg-image-card"> |