Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added basic styling with purecss, created about page, basic nav and router
- Loading branch information
1 parent
303b95a
commit 507b3a1
Showing
11 changed files
with
130 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
var React = require('react'), | ||
Layout = require('../elements/Layout.jsx'); | ||
Router = require('react-router'), | ||
Layout = require('../elements/Layout.jsx'), | ||
Routes = require('../elements/Routes.jsx'); | ||
|
||
require('../bower_components/pure/pure.css'); | ||
require('../elements/style.css'); | ||
|
||
React.render(<Layout title="React Static Site" >Hello World</Layout>, document); | ||
|
||
Router.run(Routes, Router.HistoryLocation, function (Handler) { | ||
React.render(React.createElement(Handler, null), document); | ||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<html data-reactid=".d3jmodpqm8" data-react-checksum="1282699795"><head data-reactid=".d3jmodpqm8.0"><title data-reactid=".d3jmodpqm8.0.0">React Static Site</title></head><body data-reactid=".d3jmodpqm8.1"><span data-reactid=".d3jmodpqm8.1.0">Hello World</span><script src="http://localhost:3000/scripts/bundle.js" data-reactid=".d3jmodpqm8.1.1"></script></body></html> | ||
<html data-reactid=".9aeijba8e8" data-react-checksum="947465188"><head data-reactid=".9aeijba8e8.0"><title data-reactid=".9aeijba8e8.0.0">React Static Site</title></head><body data-reactid=".9aeijba8e8.1"><div id="layout" data-reactid=".9aeijba8e8.1.0"><nav id="layout-nav" data-reactid=".9aeijba8e8.1.0.0"><div class="pure-menu pure-menu-open" data-reactid=".9aeijba8e8.1.0.0.0"><a class="pure-menu-heading" data-reactid=".9aeijba8e8.1.0.0.0.0">Site Nav</a><ul data-reactid=".9aeijba8e8.1.0.0.0.1"><li data-reactid=".9aeijba8e8.1.0.0.0.1.0"><a href="/" class="active" data-reactid=".9aeijba8e8.1.0.0.0.1.0.0">Home</a></li><li data-reactid=".9aeijba8e8.1.0.0.0.1.1"><a href="/about" class="" data-reactid=".9aeijba8e8.1.0.0.0.1.1.0">About</a></li></ul></div></nav><main role="main" data-reactid=".9aeijba8e8.1.0.1"><h1 data-reactid=".9aeijba8e8.1.0.1.1">Home</h1></main></div><script src="http://localhost:3000/scripts/bundle.js" data-reactid=".9aeijba8e8.1.1"></script></body></html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var React = require('react'); | ||
|
||
var About = React.createClass({ | ||
render: function() { | ||
return ( | ||
<h1>About</h1> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = About; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var React = require('react'); | ||
|
||
var Home = React.createClass({ | ||
render: function() { | ||
return ( | ||
<h1>Home</h1> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = Home; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var React = require('react'); | ||
Router = require('react-router'), | ||
Link = Router.Link; | ||
|
||
var LayoutNav = React.createClass({ | ||
render: function() { | ||
return ( | ||
<nav id="layout-nav"> | ||
<div className="pure-menu pure-menu-open"> | ||
<a className="pure-menu-heading">Site Nav</a> | ||
|
||
<ul> | ||
<li><Link to="home">Home</Link></li> | ||
<li><Link to="about">About</Link></li> | ||
</ul> | ||
</div> | ||
</nav> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = LayoutNav; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var React = require('react'), | ||
Router = require('react-router'); | ||
Route = Router.Route, | ||
NotFoundRoute = Router.NotFoundRoute, | ||
DefaultRoute = Router.DefaultRoute, | ||
RouteHandler = Router.RouteHandler, | ||
Layout = require('./Layout.jsx'), | ||
Home = require('./Home.jsx'), | ||
About = require('./About.jsx'); | ||
|
||
|
||
// create the index.html to be used by webpack | ||
var Routes = ( | ||
<Route name="home" path="/" handler={Layout}> | ||
<Route name="about" handler={About}/> | ||
<DefaultRoute handler={Home}/> | ||
</Route> | ||
); | ||
|
||
module.exports = Routes; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#layout { | ||
padding-left: 150px; | ||
left: 0; | ||
position: relative; | ||
} | ||
|
||
#layout-nav { | ||
left: 150px; | ||
margin-left: -150px; | ||
width: 150px; | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
z-index: 1000; | ||
background: #191818; | ||
color: #999; | ||
overflow-y: auto; | ||
-webkit-overflow-scroll: touch; | ||
} | ||
|
||
#layout-nav .pure-menu, | ||
#layout-nav .pure-menu ul { | ||
border: none; | ||
background: transparent; | ||
} | ||
|
||
main { | ||
padding: 2em; | ||
} |
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
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
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