├── .eslintcache ├── .gitignore ├── README.md ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.js ├── assets │ ├── css │ │ ├── main.css │ │ └── main.css.map │ └── scss │ │ └── main.scss ├── components │ ├── AnimeCard.js │ ├── Header.js │ ├── MainContent.js │ └── Sidebar.js └── index.js └── yarn.lock /.eslintcache: -------------------------------------------------------------------------------- 1 | [{"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/index.js":"1","/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/App.js":"2","/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/Header.js":"3","/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/Sidebar.js":"4","/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/MainContent.js":"5","/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/AnimeCard.js":"6"},{"size":229,"mtime":1610121899590,"results":"7","hashOfConfig":"8"},{"size":1165,"mtime":1610123302032,"results":"9","hashOfConfig":"8"},{"size":127,"mtime":1610121999796,"results":"10","hashOfConfig":"8"},{"size":336,"mtime":1610122887284,"results":"11","hashOfConfig":"8"},{"size":608,"mtime":1610123398814,"results":"12","hashOfConfig":"8"},{"size":349,"mtime":1610123488190,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"11vxty4",{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/index.js",[],"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/App.js",[],"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/Header.js",[],"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/Sidebar.js",[],"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/MainContent.js",[],"/Users/tylerpotts/Desktop/tyler/web/youtube/tutorials/react-anime/react-anime-yt/src/components/AnimeCard.js",["26"],{"ruleId":"27","severity":1,"message":"28","line":11,"column":6,"nodeType":"29","endLine":13,"endColumn":27},"jsx-a11y/img-redundant-alt","Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop.","JSXOpeningElement"] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | 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. 37 | 38 | 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. 39 | 40 | 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. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-anime-yt", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.11.4", 7 | "@testing-library/react": "^11.1.0", 8 | "@testing-library/user-event": "^12.1.10", 9 | "react": "^17.0.1", 10 | "react-dom": "^17.0.1", 11 | "react-scripts": "4.0.1", 12 | "web-vitals": "^0.2.4" 13 | }, 14 | "scripts": { 15 | "start": "react-scripts start", 16 | "build": "react-scripts build", 17 | "test": "react-scripts test", 18 | "eject": "react-scripts eject" 19 | }, 20 | "eslintConfig": { 21 | "extends": [ 22 | "react-app", 23 | "react-app/jest" 24 | ] 25 | }, 26 | "browserslist": { 27 | "production": [ 28 | ">0.2%", 29 | "not dead", 30 | "not op_mini all" 31 | ], 32 | "development": [ 33 | "last 1 chrome version", 34 | "last 1 firefox version", 35 | "last 1 safari version" 36 | ] 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TylerPottsDev/react-anime-db/68eb7a12c5246ff0d2ab75936c27a4365609f437/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TylerPottsDev/react-anime-db/68eb7a12c5246ff0d2ab75936c27a4365609f437/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TylerPottsDev/react-anime-db/68eb7a12c5246ff0d2ab75936c27a4365609f437/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | import Header from './components/Header'; 3 | import Sidebar from './components/Sidebar'; 4 | import MainContent from './components/MainContent'; 5 | 6 | function App() { 7 | const [animeList, SetAnimeList] = useState([]); 8 | const [topAnime, SetTopAnime] = useState([]); 9 | const [search, SetSearch] = useState(""); 10 | 11 | const GetTopAnime = async () => { 12 | const temp = await fetch(`https://api.jikan.moe/v3/top/anime/1/bypopularity`) 13 | .then(res => res.json()); 14 | 15 | SetTopAnime(temp.top.slice(0, 5)); 16 | } 17 | 18 | const HandleSearch = e => { 19 | e.preventDefault(); 20 | 21 | FetchAnime(search); 22 | } 23 | 24 | const FetchAnime = async (query) => { 25 | const temp = await fetch(`https://api.jikan.moe/v3/search/anime?q=${query}&order_by=title&sort=asc&limit=10`) 26 | .then(res => res.json()); 27 | 28 | SetAnimeList(temp.results); 29 | } 30 | 31 | useEffect(() => { 32 | GetTopAnime(); 33 | }, []); 34 | 35 | return ( 36 |
37 |
38 |
39 | 41 | 46 |
47 |
48 | ); 49 | } 50 | 51 | export default App; 52 | -------------------------------------------------------------------------------- /src/assets/css/main.css: -------------------------------------------------------------------------------- 1 | *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:'Fira Sans', sans-serif}header{padding-top:50px;padding-bottom:50px}header h1{color:#AAA;font-size:36px;font-weight:400;text-align:center}header h1 strong{color:#313131}.content-wrap{display:-webkit-box;display:-ms-flexbox;display:flex}.content-wrap aside{-webkit-box-flex:1;-ms-flex:1 1 250px;flex:1 1 250px;max-width:250px;padding-right:16px}.content-wrap aside nav{padding-left:16px;padding-right:16px}.content-wrap aside nav h3{color:#313131;font-size:24px;margin-bottom:16px}.content-wrap aside nav a{display:block;padding:8px 16px;text-align:left;color:#888;font-size:16px;margin-bottom:16px;background-color:#EEE;border-radius:999px;text-decoration:none;-webkit-transition:0.4s;transition:0.4s}.content-wrap aside nav a:hover{background-color:#313131;color:#AAA}.content-wrap main{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;padding:0px 16px}.content-wrap main .main-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.content-wrap main .main-head .search-box{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%}.content-wrap main .main-head .search-box input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;outline:none;border:none;display:block;width:100%;max-width:400px;padding:16px;border-radius:999px;background-color:#EEE;-webkit-transition:0.4s;transition:0.4s}.content-wrap main .main-head .search-box input ::-webkit-input-placeholder{color:#888}.content-wrap main .main-head .search-box input :-ms-input-placeholder{color:#888}.content-wrap main .main-head .search-box input ::-ms-input-placeholder{color:#888}.content-wrap main .main-head .search-box input ::placeholder{color:#888}.content-wrap main .main-head .search-box input:focus,.content-wrap main .main-head .search-box input:valid{background-color:#313131;color:#FFF}.content-wrap main .anime-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:32px;margin:32px -8px 0px}.content-wrap main .anime-list .anime-card{-webkit-box-flex:1;-ms-flex:1 1 33.333%;flex:1 1 33.333%;max-width:33.333%;padding:16px 8px}.content-wrap main .anime-list .anime-card a{text-decoration:none}.content-wrap main .anime-list .anime-card figure{display:block;margin-bottom:16px}.content-wrap main .anime-list .anime-card figure img{display:block;width:100%;height:350px;-o-object-fit:cover;object-fit:cover;border-radius:16px;-webkit-box-shadow:0px 0px 0px rgba(0,0,0,0.15);box-shadow:0px 0px 0px rgba(0,0,0,0.15);-webkit-transition:0.4s;transition:0.4s}.content-wrap main .anime-list .anime-card h3{color:#313131}.content-wrap main .anime-list .anime-card:hover figure img{-webkit-box-shadow:0px 6px 12px rgba(0,0,0,0.25);box-shadow:0px 6px 12px rgba(0,0,0,0.25);-webkit-transform:scale(1.05);transform:scale(1.05)} 2 | /*# sourceMappingURL=main.css.map */ -------------------------------------------------------------------------------- /src/assets/css/main.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,AAAA,CAAC,AAAC,CACD,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,UAAU,CAEtB,WAAW,CAAE,uBAAuB,CACpC,AAED,AAAA,MAAM,AAAC,CACN,WAAW,CAAE,IAAI,CACjB,cAAc,CAAE,IAAI,CAYpB,AAdD,AAIC,MAJK,CAIL,EAAE,AAAC,CACF,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,GAAG,CAChB,UAAU,CAAE,MAAM,CAKlB,AAbF,AAUE,MAVI,CAIL,EAAE,CAMD,MAAM,AAAC,CACN,KAAK,CAAE,OAAO,CACd,AAIH,AAAA,aAAa,AAAC,CACb,OA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CAwCH,WAAW,CAMV,WAAW,CASV,MAAM,CAIL,GAAG,AAAC,CACH,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,KAAK,CACb,UAAU,CAAE,KAAK,CACjB,aAAa,CAAE,IAAI,CACnB,UAAU,CAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,gBAAmB,CAE3C,UAAU,CAAE,IAAI,CAChB,AA7GN,AAgHI,aAhHS,CAyCZ,IAAI,CAwCH,WAAW,CAMV,WAAW,CAyBV,EAAE,AAAC,CACF,KAAK,CAAE,OAAO,CACd,AAlHL,AAsHM,aAtHO,CAyCZ,IAAI,CAwCH,WAAW,CAMV,WAAW,AA6BT,MAAM,CACN,MAAM,CACL,GAAG,AAAC,CACH,UAAU,CAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAmB,CAC5C,SAAS,CAAE,WAAW,CACtB", 4 | "sources": [ 5 | "../scss/main.scss" 6 | ], 7 | "names": [], 8 | "file": "main.css" 9 | } -------------------------------------------------------------------------------- /src/assets/scss/main.scss: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | 6 | font-family: 'Fira Sans', sans-serif; 7 | } 8 | 9 | header { 10 | padding-top: 50px; 11 | padding-bottom: 50px; 12 | 13 | h1 { 14 | color: #AAA; 15 | font-size: 36px; 16 | font-weight: 400; 17 | text-align: center; 18 | 19 | strong { 20 | color: #313131; 21 | } 22 | } 23 | } 24 | 25 | .content-wrap { 26 | display: flex; 27 | 28 | aside { 29 | flex: 1 1 250px; 30 | max-width: 250px; 31 | padding-right: 16px; 32 | 33 | nav { 34 | padding-left: 16px; 35 | padding-right: 16px; 36 | 37 | h3 { 38 | color: #313131; 39 | font-size: 24px; 40 | margin-bottom: 16px; 41 | } 42 | 43 | a { 44 | display: block; 45 | padding: 8px 16px; 46 | text-align: left; 47 | 48 | color: #888; 49 | font-size: 16px; 50 | margin-bottom: 16px; 51 | 52 | background-color: #EEE; 53 | border-radius: 999px; 54 | text-decoration: none; 55 | 56 | transition: 0.4s; 57 | 58 | &:hover { 59 | background-color: #313131; 60 | color: #AAA; 61 | } 62 | } 63 | } 64 | } 65 | 66 | main { 67 | flex: 1 1 0%; 68 | padding: 0px 16px; 69 | 70 | .main-head { 71 | display: flex; 72 | justify-content: flex-end; 73 | 74 | .search-box { 75 | display: flex; 76 | justify-content: flex-end; 77 | flex: 1 1 0%; 78 | 79 | input { 80 | appearance: none; 81 | background: none; 82 | outline: none; 83 | border: none; 84 | 85 | display: block; 86 | width: 100%; 87 | max-width: 400px; 88 | padding: 16px; 89 | border-radius: 999px; 90 | background-color: #EEE; 91 | 92 | transition: 0.4s; 93 | 94 | ::placeholder { 95 | color: #888; 96 | } 97 | 98 | &:focus, &:valid { 99 | background-color: #313131; 100 | color: #FFF; 101 | } 102 | } 103 | } 104 | } 105 | 106 | .anime-list { 107 | display: flex; 108 | flex-wrap: wrap; 109 | margin-top: 32px; 110 | margin: 32px -8px 0px; 111 | 112 | .anime-card { 113 | flex: 1 1 33.333%; 114 | max-width: 33.333%; 115 | padding: 16px 8px; 116 | 117 | a { 118 | text-decoration: none; 119 | } 120 | 121 | figure { 122 | display: block; 123 | margin-bottom: 16px; 124 | 125 | img { 126 | display: block; 127 | width: 100%; 128 | height: 350px; 129 | object-fit: cover; 130 | border-radius: 16px; 131 | box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.15); 132 | 133 | transition: 0.4s; 134 | } 135 | } 136 | 137 | h3 { 138 | color: #313131; 139 | } 140 | 141 | &:hover { 142 | figure { 143 | img { 144 | box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25); 145 | transform: scale(1.05); 146 | } 147 | } 148 | } 149 | } 150 | } 151 | } 152 | } -------------------------------------------------------------------------------- /src/components/AnimeCard.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function AnimeCard({anime}) { 4 | return ( 5 |
6 | 10 |
11 | Anime Image 14 |
15 |

{ anime.title }

16 |
17 |
18 | ) 19 | } 20 | 21 | export default AnimeCard 22 | -------------------------------------------------------------------------------- /src/components/Header.js: -------------------------------------------------------------------------------- 1 | function Header() { 2 | return ( 3 |
4 |

TheAnimeDatabase

5 |
6 | ) 7 | } 8 | 9 | export default Header 10 | -------------------------------------------------------------------------------- /src/components/MainContent.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AnimeCard from './AnimeCard'; 3 | 4 | function MainContent(props) { 5 | return ( 6 |
7 |
8 |
11 | props.SetSearch(e.target.value)}/> 17 |
18 |
19 |
20 | {props.animeList.map(anime => ( 21 | 24 | ))} 25 |
26 |
27 | ) 28 | } 29 | 30 | export default MainContent 31 | -------------------------------------------------------------------------------- /src/components/Sidebar.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Sidebar({ topAnime }) { 4 | return ( 5 | 19 | ) 20 | } 21 | 22 | export default Sidebar 23 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './assets/css/main.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render( 7 | 8 | 9 | , 10 | document.getElementById('root') 11 | ); 12 | --------------------------------------------------------------------------------