| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
27 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,8 +35,8 @@ Follow the guide [Creating a pull request from a fork](https://help.github.com/a | |||
| 35 | 35 | ## Resources | |
| 36 | 36 | ||
| 37 | 37 | - [Syllabus](https://docs.google.com/document/d/1jr0HNb1p7APeSTSsMfz4CpeGs0xk94ighMLIdkF4w0U/edit?usp=sharing) | |
| 38 | - - Projects: [1 Retrospective Board](https://docs.google.com/document/d/1ePLNNU1BKLD9WByelb7WyfdGpntwhpDIKn0KkhGxboI/edit?usp=sharing) | ||
| 39 | - - [Slides](https://slides.com/accjavascriptframeworks) | [2 Bookstore App](https://docs.google.com/document/d/1nDpv2dALdW2HUSJ-DpsOM644FM9BbxNjrzYtyQCpj-M/edit?usp=sharing) | ||
| 38 | + - Projects: [1 Retrospective Board](https://docs.google.com/document/d/1ePLNNU1BKLD9WByelb7WyfdGpntwhpDIKn0KkhGxboI/edit?usp=sharing) | [2 Bookstore App](https://docs.google.com/document/d/1nDpv2dALdW2HUSJ-DpsOM644FM9BbxNjrzYtyQCpj-M/edit?usp=sharing) | ||
| 39 | + - [Slides](https://slides.com/accjavascriptframeworks) | ||
| 40 | 40 | - Installation Guide: [Mac](docs/InstallationGuideMac.md) | [Windows](docs/InstallationGuideWindows.md) | [React Native](docs/InstallationGuideReactNative.md) | |
| 41 | 41 | - [MDN](https://developer.mozilla.org/en-US/) (Unofficial JavaScript Manual) | |
| 42 | 42 | - React Native: [General Documentation](https://facebook.github.io/react-native/docs/getting-started) | [Debugging](https://facebook.github.io/react-native/docs/debugging) | [Styles Cheatsheet](https://github.com/vhpoet/react-native-styling-cheat-sheet#text) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,68 @@ | |||
| 1 | + This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
| 2 | + | ||
| 3 | + ## Available Scripts | ||
| 4 | + | ||
| 5 | + In the project directory, you can run: | ||
| 6 | + | ||
| 7 | + ### `npm start` | ||
| 8 | + | ||
| 9 | + Runs the app in the development mode.<br> | ||
| 10 | + Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
| 11 | + | ||
| 12 | + The page will reload if you make edits.<br> | ||
| 13 | + You will also see any lint errors in the console. | ||
| 14 | + | ||
| 15 | + ### `npm test` | ||
| 16 | + | ||
| 17 | + Launches the test runner in the interactive watch mode.<br> | ||
| 18 | + See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
| 19 | + | ||
| 20 | + ### `npm run build` | ||
| 21 | + | ||
| 22 | + Builds the app for production to the `build` folder.<br> | ||
| 23 | + It correctly bundles React in production mode and optimizes the build for the best performance. | ||
| 24 | + | ||
| 25 | + The build is minified and the filenames include the hashes.<br> | ||
| 26 | + Your app is ready to be deployed! | ||
| 27 | + | ||
| 28 | + See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
| 29 | + | ||
| 30 | + ### `npm run eject` | ||
| 31 | + | ||
| 32 | + **Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
| 33 | + | ||
| 34 | + If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
| 35 | + | ||
| 36 | + Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
| 37 | + | ||
| 38 | + You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
| 39 | + | ||
| 40 | + ## Learn More | ||
| 41 | + | ||
| 42 | + You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
| 43 | + | ||
| 44 | + To learn React, check out the [React documentation](https://reactjs.org/). | ||
| 45 | + | ||
| 46 | + ### Code Splitting | ||
| 47 | + | ||
| 48 | + This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting | ||
| 49 | + | ||
| 50 | + ### Analyzing the Bundle Size | ||
| 51 | + | ||
| 52 | + This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size | ||
| 53 | + | ||
| 54 | + ### Making a Progressive Web App | ||
| 55 | + | ||
| 56 | + This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app | ||
| 57 | + | ||
| 58 | + ### Advanced Configuration | ||
| 59 | + | ||
| 60 | + This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration | ||
| 61 | + | ||
| 62 | + ### Deployment | ||
| 63 | + | ||
| 64 | + This section has moved here: https://facebook.github.io/create-react-app/docs/deployment | ||
| 65 | + | ||
| 66 | + ### `npm run build` fails to minify | ||
| 67 | + | ||
| 68 | + This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,26 @@ | |||
| 1 | + { | ||
| 2 | + "name": "17-routing-browser", | ||
| 3 | + "version": "0.1.0", | ||
| 4 | + "private": true, | ||
| 5 | + "dependencies": { | ||
| 6 | + "react": "^16.8.6", | ||
| 7 | + "react-dom": "^16.8.6", | ||
| 8 | + "react-router-dom": "^5.0.0", | ||
| 9 | + "react-scripts": "2.1.8" | ||
| 10 | + }, | ||
| 11 | + "scripts": { | ||
| 12 | + "start": "react-scripts start", | ||
| 13 | + "build": "react-scripts build", | ||
| 14 | + "test": "react-scripts test", | ||
| 15 | + "eject": "react-scripts eject" | ||
| 16 | + }, | ||
| 17 | + "eslintConfig": { | ||
| 18 | + "extends": "react-app" | ||
| 19 | + }, | ||
| 20 | + "browserslist": [ | ||
| 21 | + ">0.2%", | ||
| 22 | + "not dead", | ||
| 23 | + "not ie <= 11", | ||
| 24 | + "not op_mini all" | ||
| 25 | + ] | ||
| 26 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,29 @@ | |||
| 1 | + <!DOCTYPE html> | ||
| 2 | + <html lang="en"> | ||
| 3 | + | ||
| 4 | + <head> | ||
| 5 | + <meta charset="utf-8"> | ||
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
| 7 | + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" | ||
| 8 | + crossorigin="anonymous"> | ||
| 9 | + <title>React Router Example</title> | ||
| 10 | + </head> | ||
| 11 | + | ||
| 12 | + <body> | ||
| 13 | + <noscript> | ||
| 14 | + You need to enable JavaScript to run this app. | ||
| 15 | + </noscript> | ||
| 16 | + <div id="root"></div> | ||
| 17 | + <!-- | ||
| 18 | + This HTML file is a template. | ||
| 19 | + If you open it directly in the browser, you will see an empty page. | ||
| 20 | + | ||
| 21 | + You can add webfonts, meta tags, or analytics to this file. | ||
| 22 | + The build step will place the bundled scripts into the <body> tag. | ||
| 23 | + | ||
| 24 | + To begin the development, run `npm start` or `yarn start`. | ||
| 25 | + To create a production bundle, use `npm run build` or `yarn build`. | ||
| 26 | + --> | ||
| 27 | + </body> | ||
| 28 | + | ||
| 29 | + </html> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,24 @@ | |||
| 1 | + import React from "react"; | ||
| 2 | + import { Switch, Route } from "react-router-dom"; | ||
| 3 | + import NavBar from "./Navbar/Navbar"; | ||
| 4 | + import NowPlaying from "./NowPlaying/NowPlaying"; | ||
| 5 | + import Theatres from "./Theatres/Theatres"; | ||
| 6 | + import Movie from "./Movie/Movie"; | ||
| 7 | + | ||
| 8 | + function App() { | ||
| 9 | + return ( | ||
| 10 | + <div> | ||
| 11 | + <NavBar /> | ||
| 12 | + <main className="container"> | ||
| 13 | + <Switch> | ||
| 14 | + <Route exact path="/" component={NowPlaying} /> | ||
| 15 | + <Route exact path="/now-playing" component={NowPlaying} /> | ||
| 16 | + <Route exact path="/theatres" component={Theatres} /> | ||
| 17 | + <Route path="/movie/:title" component={Movie} /> | ||
| 18 | + </Switch> | ||
| 19 | + </main> | ||
| 20 | + </div> | ||
| 21 | + ); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + export default App; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,37 @@ | |||
| 1 | + import React from "react"; | ||
| 2 | + | ||
| 3 | + import movies from "../../movies/movies.js"; | ||
| 4 | + | ||
| 5 | + function Movie(props) { | ||
| 6 | + const movieKey = props.match.params.title; | ||
| 7 | + const movie = movies[movieKey]; | ||
| 8 | + return ( | ||
| 9 | + <div> | ||
| 10 | + <h1>{movie.title}</h1> | ||
| 11 | + <div> | ||
| 12 | + <img | ||
| 13 | + src={movie.poster} | ||
| 14 | + alt="" | ||
| 15 | + width="240" | ||
| 16 | + height="360" | ||
| 17 | + className="mb-3" | ||
| 18 | + /> | ||
| 19 | + </div> | ||
| 20 | + <p>{movie.synopsis}</p> | ||
| 21 | + <p> | ||
| 22 | + <strong>Release Date</strong> {movie.releaseDate} | ||
| 23 | + </p> | ||
| 24 | + <div> | ||
| 25 | + <strong>Show Times</strong> | ||
| 26 | + <ul> | ||
| 27 | + {movie.times.map((time, index) => { | ||
| 28 | + const timeKey = `${movieKey}-time-${index}`; | ||
| 29 | + return <li key={timeKey}>{time}</li>; | ||
| 30 | + })} | ||
| 31 | + </ul> | ||
| 32 | + </div> | ||
| 33 | + </div> | ||
| 34 | + ); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + export default Movie; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,9 @@ | |||
| 1 | + .navbar-expand-lg .navbar-nav { | ||
| 2 | + -ms-flex-direction: row; | ||
| 3 | + flex-direction: row; | ||
| 4 | + margin-top: 0 !important; | ||
| 5 | + } | ||
| 6 | + .navbar-expand-lg .navbar-nav .nav-link { | ||
| 7 | + padding-right: 0.5rem; | ||
| 8 | + padding-left: 0.5rem; | ||
| 9 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,28 @@ | |||
| 1 | + import React from "react"; | ||
| 2 | + import { NavLink } from "react-router-dom"; | ||
| 3 | + import "./NavBar.css"; | ||
| 4 | + | ||
| 5 | + function NavBar(props) { | ||
| 6 | + return ( | ||
| 7 | + <nav className="navbar navbar-expand-lg navbar-dark bg-primary mb-4"> | ||
| 8 | + <NavLink to="/" className="navbar-brand"> | ||
| 9 | + Movies | ||
| 10 | + </NavLink> | ||
| 11 | + | ||
| 12 | + <ul className="navbar-nav mr-auto mt-2 mt-lg-0"> | ||
| 13 | + <li className="nav-item"> | ||
| 14 | + <NavLink to="/now-playing" className="nav-link"> | ||
| 15 | + Now Playing | ||
| 16 | + </NavLink> | ||
| 17 | + </li> | ||
| 18 | + <li className="nav-item"> | ||
| 19 | + <NavLink to="/theatres" className="nav-link"> | ||
| 20 | + Theatres | ||
| 21 | + </NavLink> | ||
| 22 | + </li> | ||
| 23 | + </ul> | ||
| 24 | + </nav> | ||
| 25 | + ); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + export default NavBar; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,29 @@ | |||
| 1 | + import React from "react"; | ||
| 2 | + import { Link } from "react-router-dom"; | ||
| 3 | + import movies from "../../movies/movies.js"; | ||
| 4 | + | ||
| 5 | + function NowPlaying() { | ||
| 6 | + return ( | ||
| 7 | + <div> | ||
| 8 | + <h1>Now Playing</h1> | ||
| 9 | + <div className="row"> | ||
| 10 | + {Object.entries(movies).map(entry => { | ||
| 11 | + const [movieKey, movie] = entry; | ||
| 12 | + const link = "/movie/" + movieKey; | ||
| 13 | + return ( | ||
| 14 | + <div className="col" key={movieKey}> | ||
| 15 | + <h2> | ||
| 16 | + <Link to={link}>{movie.title}</Link> | ||
| 17 | + </h2> | ||
| 18 | + <Link to={link}> | ||
| 19 | + <img src={movie.poster} alt="" width="180" height="270" /> | ||
| 20 | + </Link> | ||
| 21 | + </div> | ||
| 22 | + ); | ||
| 23 | + })} | ||
| 24 | + </div> | ||
| 25 | + </div> | ||
| 26 | + ); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + export default NowPlaying; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,24 @@ | |||
| 1 | + import React from "react"; | ||
| 2 | + | ||
| 3 | + function Theatres() { | ||
| 4 | + return ( | ||
| 5 | + <div> | ||
| 6 | + <h1>Theatres</h1> | ||
| 7 | + <dl> | ||
| 8 | + <dt>Regal Crossgates Stadium 18 & IMAX</dt> | ||
| 9 | + <dd>120 B Washington Avenue Ext Albany, NY</dd> | ||
| 10 | + | ||
| 11 | + <dt>Regal Colonie Center Stadium 13 & RPX</dt> | ||
| 12 | + <dd>131 Colonie Center Albany, NY</dd> | ||
| 13 | + | ||
| 14 | + <dt>Regal East Greenbush 8</dt> | ||
| 15 | + <dd>279 Troy Road Rensselaer, NY</dd> | ||
| 16 | + | ||
| 17 | + <dt>Regal Clifton Park Stadium 10 & RPX</dt> | ||
| 18 | + <dd>22 Clifton Country Road Clifton Park, NY</dd> | ||
| 19 | + </dl> | ||
| 20 | + </div> | ||
| 21 | + ); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + export default Theatres; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments