This file contains hidden or 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
| vendor(prop, args) | |
| -webkit-{prop} args | |
| -moz-{prop} args | |
| -ms-{prop} args | |
| -o-{prop} args | |
| {prop} args | |
| border-radius() | |
| vendor('border-radius', arguments) |
This file contains hidden or 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
| centered(w, h) | |
| width w px | |
| height h px | |
| top 50% | |
| left 50% | |
| position absolute | |
| margin-top ((h/2) * -1) px | |
| margin-left ((w/2) * -1) px |
This file contains hidden or 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
| swipeEvents = ['swipeleft', 'swiperight', 'swipeup', 'swipedown'] | |
| for e in swipeEvents | |
| do (e) -> | |
| ko.bindingHandlers[e] = | |
| init: (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) -> | |
| f = valueAccessor() | |
| $(element).on e, -> f.apply viewModel, [e] |
This file contains hidden or 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
| * | |
| margin 0 | |
| padding 0 | |
| list-style none | |
| box-sizing border-box | |
| font-weight normal | |
| text-decoration none | |
| -webkit-box-sizing border-box | |
| -moz-box-sizing border-box | |
| box-sizing border-box |
This file contains hidden or 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
Show hidden characters
| { | |
| "folders": | |
| [ | |
| { | |
| "path": "* PATH TO PROJECT FILES *" | |
| } | |
| ], | |
| "build_systems": | |
| [ | |
| { |
This file contains hidden or 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
| define (require) -> | |
| $ = require('jquery') | |
| $.fn.slider = (@opts = {}) -> | |
| slider = $(this) | |
| # Initialize slides | |
| $(this).find('.slide').each (i) -> | |
| $(this).attr('data-index', i) | |
| $(this).addClass('hidden-right').appendTo(slider) if i > 0 |
This file contains hidden or 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.requestAnimFrame = ((callback) -> | |
| return window.requestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.mozRequestAnimationFrame || | |
| window.oRequestAnimationFrame || | |
| window.msRequestAnimationFrame || | |
| (callback) -> | |
| window.setTimeout callback, 1000 / 60 | |
| )() |
This file contains hidden or 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
| ko.bindingHandlers.fadeVisible = | |
| init: (element, valueAccessor) -> | |
| value = valueAccessor() | |
| $(element).toggle ko.utils.unwrapObservable(value) | |
| update: (element, valueAccessor) -> | |
| value = valueAccessor() | |
| (if ko.utils.unwrapObservable(value) then $(element).fadeIn(1000) else $(element).fadeOut(1000)) |
This file contains hidden or 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 EventEmitter | |
| constructor: -> | |
| @events = {} | |
| trigger: (keys, args...) -> | |
| for key in keys.split(' ') | |
| if @events[key]? | |
| func.apply @, args for func in @events[key] | |
| @ | |
| on: (keys, func) -> |
This file contains hidden or 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
| ko.bindingHandlers.fileupload = | |
| init: (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) -> | |
| el = $(element).find('input') | |
| el.on 'change', (e) => | |
| form = $('<form class="file-upload" target="_iframe" method="post" action="TARGET_URL" enctype="multipart/form-data"></form>') | |
| frame = $('<iframe name="_iframe">') | |
| frame.appendTo el.parent() | |
| el.wrap form |
OlderNewer