diff --git a/application.js b/application.js deleted file mode 100644 index 0a87d73..0000000 --- a/application.js +++ /dev/null @@ -1,55 +0,0 @@ -var options = { - thumbnailData: [{ - title: 'Show Courses', - number: 12, - header: 'Learn React', - description: 'React is a fantastic new front end library for rendering web pages. React is a fantastic new front end library for rendering web pages.', - imageUrl: 'https://raw.githubusercontent.com/wiki/facebook/react/react-logo-1000-transparent.png' - },{ - title: 'Show Courses', - number: 25, - header: 'Learn Gulp', - description: 'Gulp will speed up your development workflow. Gulp will speed up your development workflow. Gulp will speed up your development workflow.', - imageUrl: 'http://brunch.io/images/others/gulp.png' - }] -}; - -var element = React.createElement(ThumbnailList, options); -React.render(element, document.querySelector('.container')); - -var Badge = React.createClass({displayName: "Badge", - render: function() { - return React.createElement("button", {className: "btn btn-primary", type: "button"}, - this.props.title, " ", React.createElement("span", {className: "badge"}, this.props.number) - ) - } -}); - -var ThumbnailList = React.createClass({displayName: "ThumbnailList", - render: function() { - var list = this.props.thumbnailData.map(function(thumbnailProps){ - return React.createElement(Thumbnail, React.__spread({}, thumbnailProps)) - }); - - return React.createElement("div", null, - list - ) - } -}); - -var Thumbnail = React.createClass({displayName: "Thumbnail", - render: function() { - return React.createElement("div", {className: "col-sm-6 col-md-4"}, - React.createElement("div", {className: "thumbnail"}, - React.createElement("img", {src: this.props.imageUrl, alt: "..."}), - React.createElement("div", {className: "caption"}, - React.createElement("h3", null, this.props.header), - React.createElement("p", null, this.props.description), - React.createElement("p", null, - React.createElement(Badge, {title: this.props.title, number: this.props.number}) - ) - ) - ) - ) - } -}); diff --git a/package.json b/package.json index 4602680..bcf9d81 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "thumbnail-gulp", + "name": "react-starter", "version": "1.0.0", "main": "index.js", "scripts": {