diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000000..8f0989f6b6 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,9 @@ +### React Router Examples + +In order to try out the examples, you need to follow these steps: + +1. Clone this repo +1. Run `npm -g install webpack`, if you don't have it installed already +1. Run `npm install` from the repo's root directory +1. Run `./script/build-examples` from the repo's root directory +1. Point your browser to the `index.html` location in this directory diff --git a/examples/animations/app.css b/examples/animations/app.css new file mode 100644 index 0000000000..4eeef9a770 --- /dev/null +++ b/examples/animations/app.css @@ -0,0 +1,30 @@ +.Image { + position: relative; +} + +.Image img { + position: absolute; + top: 0; + left: 0; + height: 400; + width: 400; + background: gray; +} + +.example-enter { + opacity: 0.01; + transition: opacity .5s ease-in; +} + +.example-enter.example-enter-active { + opacity: 1; +} + +.example-leave { + opacity: 1; + transition: opacity .5s ease-in; +} + +.example-leave.example-leave-active { + opacity: 0.01; +} diff --git a/examples/animations/app.js b/examples/animations/app.js index 5fa0cf5e37..874376e1be 100644 --- a/examples/animations/app.js +++ b/examples/animations/app.js @@ -41,4 +41,4 @@ var routes = ( ); -React.renderComponent(routes, document.body); +React.renderComponent(routes, document.getElementById('example')); diff --git a/examples/animations/index.html b/examples/animations/index.html index a68f5fa076..024f779cd9 100644 --- a/examples/animations/index.html +++ b/examples/animations/index.html @@ -1,37 +1,8 @@ Animation Example - - + + +

React Router Examples / Animations

+
diff --git a/examples/auth-flow/app.js b/examples/auth-flow/app.js index 8d710887e7..d08dd71fcd 100644 --- a/examples/auth-flow/app.js +++ b/examples/auth-flow/app.js @@ -29,7 +29,6 @@ var App = React.createClass({ Sign in; return (
-

Auth User Flow