Skip to content

Commit

Permalink
Doc Stite - changed to use linkButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Nguyen committed Dec 14, 2014
1 parent 5740ab6 commit f3812f9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
33 changes: 18 additions & 15 deletions docs/src/app/components/master.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
var React = require('react'),
Router = require('react-router'),
RouteHandler = Router.RouteHandler,
mui = require('mui'),
AppBar = mui.AppBar,
AppCanvas = mui.AppCanvas,
Menu = mui.Menu,
IconButton = mui.IconButton,
AppLeftNav = require('./app-left-nav.jsx');
var React = require('react');
var Router = require('react-router');
var RouteHandler = Router.RouteHandler;
var mui = require('mui');
var AppBar = mui.AppBar;
var AppCanvas = mui.AppCanvas;
var Menu = mui.Menu;
var IconButton = mui.IconButton;
var AppLeftNav = require('./app-left-nav.jsx');

var Master = React.createClass({

Expand All @@ -18,6 +18,13 @@ var Master = React.createClass({
this.isActive('get-started') ? 'Get Started' :
this.isActive('css-framework') ? 'Css Framework' :
this.isActive('components') ? 'Components' : '';
var githubButton = (
<IconButton
className="github-icon-button"
icon="mui-icon-github"
href="https://github.com/callemall/material-ui"
linkButton={true} />
);

return (
<AppCanvas predefinedLayout={1}>
Expand All @@ -27,7 +34,7 @@ var Master = React.createClass({
onMenuIconButtonTouchTap={this._onMenuIconButtonTouchTap}
title={title}
zDepth={0}>
<IconButton className="github-icon-button" icon="mui-icon-github" onTouchTap={this._onGithubTouchTap} />
{githubButton}
</AppBar>

<AppLeftNav ref="leftNav" />
Expand All @@ -39,17 +46,13 @@ var Master = React.createClass({
Hand crafted with love by the engineers at <a href="http://call-em-all.com">Call-Em-All</a> and our
awesome <a href="https://github.com/callemall/material-ui/graphs/contributors">contributors</a>.
</p>
<IconButton className="github-icon-button" icon="mui-icon-github" onTouchTap={this._onGithubTouchTap} />
{githubButton}
</div>

</AppCanvas>
);
},

_onGithubTouchTap: function() {
document.location.href='https://github.com/callemall/material-ui';
},

_onMenuIconButtonTouchTap: function() {
this.refs.leftNav.toggle();
}
Expand Down
24 changes: 11 additions & 13 deletions docs/src/app/components/pages/home.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var React = require('react'),
Router = require('react-router'),
mui = require('mui'),
RaisedButton = mui.RaisedButton,
HomeFeature = require('./home-feature.jsx');
var React = require('react');
var Router = require('react-router');
var mui = require('mui');
var RaisedButton = mui.RaisedButton;
var HomeFeature = require('./home-feature.jsx');

var HomePage = React.createClass({

Expand All @@ -18,10 +18,12 @@ var HomePage = React.createClass({
<div className="tagline">
<h1 className="brand-name">material ui</h1>
<h2 className="mui-font-style-headline">
A CSS Framework and a Set of React Components <span className="no-wrap">that Implement</span> <span className="no-wrap">Google's Material Design</span>
A CSS Framework and a Set of React
Components <span className="no-wrap">that
Implement</span> <span className="no-wrap">Google's Material Design</span>
</h2>
<RaisedButton className="demo-button" label="Demo" onTouchTap={this._onDemoClick} />
<RaisedButton className="github-button" label="GitHub" onTouchTap={this._onGithubClick} />
<RaisedButton className="demo-button" label="Demo" onTouchTap={this._onDemoClick} linkButton={true} />
<RaisedButton className="github-button" label="GitHub" linkButton={true} href="https://github.com/callemall/material-ui" />
</div>
</div>
</div>
Expand Down Expand Up @@ -53,18 +55,14 @@ var HomePage = React.createClass({
<h3>
Want to help make this <span className="no-wrap">project awesome?</span> <span className="no-wrap">Check out our repo.</span>
</h3>
<RaisedButton label="GitHub" primary={true} onTouchTap={this._onGithubClick} />
<RaisedButton label="GitHub" primary={true} linkButton={true} href="https://github.com/callemall/material-ui" />
</div>
</div>

</div>
);
},

_onGithubClick: function() {
window.document.location.href = 'https://github.com/callemall/material-ui';
},

_onDemoClick: function() {
this.transitionTo('components');
}
Expand Down

0 comments on commit f3812f9

Please sign in to comment.