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
| var Feature = (function(){ | |
| var Feature = function(){ | |
| this.init(); | |
| }; | |
| _.extend(Feature.prototype, { | |
| init: function() { | |
| console.log("Feature!"); | |
| } |
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
| loadResultSnippits: function(results){ | |
| var documents = []; | |
| for(var i = 0; i < results.length; i++){ | |
| var url = $(results[i]).attr('url'), | |
| title = $(results[i]).find('content[name="title"]').text(), | |
| fileType = $(results[i]).find('content[name="filetype"]').text(), | |
| language = $(results[i]).find('content[name="language"]').text(), | |
| date = $(results[i]).find('content[name="last-modified"]').text().substring(0, 14), | |
| snippet = $(results[i]).find('content[name="snippet"]').text(); |
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
| var ModelMixin = { | |
| __syncedModels: [], | |
| componentDidMount: function() { | |
| // Whenever there may be a change in the Backbone data, trigger a reconcile. | |
| this.getBackboneModels().forEach(this.injectModel, this); | |
| }, | |
| componentWillUnmount: function() { | |
| // Ensure that we clean up any dangling references when the component is | |
| // destroyed. | |
| this.__syncedModels.forEach(function(model) { |
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
| /** | |
| * @jsx React.DOM | |
| */ | |
| var CommentModel = Backbone.Model.extend({ | |
| defaults: { | |
| author: '', | |
| text: '', | |
| image: '' | |
| } |
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
| /** | |
| * @jsx React.DOM | |
| */ | |
| var App.Views.MyComponent = React.createClass({ | |
| render: function() { | |
| return ( | |
| <p>Awesome Code</p> | |
| ); |
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
| @mixin image-replace($width, $height) | |
| border: 0 | |
| font: 0/0 a | |
| text-shadow: none | |
| color: transparent | |
| width: $width | |
| height: $height |
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
| if ( location.hostname.indexOf('localhost') !== -1 ) { | |
| App.debug = true; | |
| var head = document.getElementsByTagName('head')[0]; | |
| var script = document.createElement('script'); | |
| script.type = 'text/javascript'; | |
| script.src = 'http://localhost:35729/livereload.js'; | |
| head.appendChild(script); | |
| } | |
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
| //Element Variables - Use quotes and comma separted values | |
| $heading-tags: 'h1, h2, h3, h4, h5, h6' | |
| // Usage | |
| #{$heading-tags} | |
| color: #ff0 |
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
| <body> | |
| <h1> | |
| Testing display of HTML elements | |
| </h1> | |
| <h2> | |
| This is 2nd level heading | |
| </h2> | |
| <p> | |
| This is a test paragraph. | |
| </p> |
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
| App.Helpers.AssetsLoader = function() { | |
| window.Modernizr.load([ | |
| ]); | |
| }; |