└── beginners-blog
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── public
├── assets
│ └── images
│ │ ├── 13525-empty.gif
│ │ ├── Purple-Combination-colors-graphic-design-predictions-1024x576-1024x576.jpg
│ │ ├── Synthwave-Postmodern.jpg
│ │ ├── author.jpg
│ │ ├── designer-1.jpg
│ │ ├── f67396fc3cfce63a28e07ebb35d974ac.jpg
│ │ ├── fQwuyKJ9qxjSbr6REcgtmW-1200-80.jpg
│ │ ├── graphic-design-trends.png
│ │ └── make-it-personal.jpg
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
└── src
├── App.css
├── App.jsx
├── components
├── Home
│ ├── BlogList
│ │ ├── BlogItem
│ │ │ ├── index.jsx
│ │ │ └── styles.css
│ │ ├── index.jsx
│ │ └── styles.css
│ ├── Header
│ │ ├── index.jsx
│ │ └── styles.css
│ └── SearchBar
│ │ ├── index.jsx
│ │ └── styles.css
└── common
│ ├── Chip
│ ├── index.jsx
│ └── styles.css
│ └── EmptyList
│ ├── index.jsx
│ └── styles.css
├── config
└── data.js
├── index.js
└── pages
├── Blog
├── index.jsx
└── styles.css
└── Home
└── index.jsx
/beginners-blog/.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 |
--------------------------------------------------------------------------------
/beginners-blog/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 | ### `npm 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 | ### `npm 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 | ### `npm run 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 | ### `npm run 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 | ### `npm run 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 |
--------------------------------------------------------------------------------
/beginners-blog/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "blog-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.12.0",
7 | "@testing-library/react": "^11.2.7",
8 | "@testing-library/user-event": "^12.8.3",
9 | "react": "^17.0.2",
10 | "react-dom": "^17.0.2",
11 | "react-router-dom": "^5.2.0",
12 | "react-scripts": "4.0.3",
13 | "web-vitals": "^1.1.2"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": [
23 | "react-app",
24 | "react-app/jest"
25 | ]
26 | },
27 | "browserslist": {
28 | "production": [
29 | ">0.2%",
30 | "not dead",
31 | "not op_mini all"
32 | ],
33 | "development": [
34 | "last 1 chrome version",
35 | "last 1 firefox version",
36 | "last 1 safari version"
37 | ]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/13525-empty.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/13525-empty.gif
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/Purple-Combination-colors-graphic-design-predictions-1024x576-1024x576.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/Purple-Combination-colors-graphic-design-predictions-1024x576-1024x576.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/Synthwave-Postmodern.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/Synthwave-Postmodern.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/author.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/author.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/designer-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/designer-1.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/f67396fc3cfce63a28e07ebb35d974ac.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/f67396fc3cfce63a28e07ebb35d974ac.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/fQwuyKJ9qxjSbr6REcgtmW-1200-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/fQwuyKJ9qxjSbr6REcgtmW-1200-80.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/graphic-design-trends.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/graphic-design-trends.png
--------------------------------------------------------------------------------
/beginners-blog/public/assets/images/make-it-personal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/assets/images/make-it-personal.jpg
--------------------------------------------------------------------------------
/beginners-blog/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefreeeze/react-beginner-blog/cd3818c9c3189650345a8eaebdb8afb7b3c41b91/beginners-blog/public/favicon.ico
--------------------------------------------------------------------------------
/beginners-blog/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | );
9 |
10 | export default EmptyList;
11 |
--------------------------------------------------------------------------------
/beginners-blog/src/components/common/EmptyList/styles.css:
--------------------------------------------------------------------------------
1 | .emptyList-wrap {
2 | display: flex;
3 | justify-content: center;
4 | }
5 | .emptyList-wrap img {
6 | max-width: 250px;
7 | width: 100%;
8 | }
9 |
--------------------------------------------------------------------------------
/beginners-blog/src/config/data.js:
--------------------------------------------------------------------------------
1 | export const blogList = [
2 | {
3 | id: 1,
4 | title: '7 CSS tools you should be using ',
5 | category: 'development',
6 | subCategory: ['frontend', 'ui/ux', 'design'],
7 | description:
8 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
9 | authorName: 'John Doe',
10 | authorAvatar: '/assets/images/author.jpg',
11 | createdAt: 'June 03, 2021',
12 | cover: '/assets/images/designer-1.jpg',
13 | },
14 | {
15 | id: 2,
16 | title: 'Milan Places That Highlight The City',
17 | category: 'travel',
18 | subCategory: ['vacation', 'holidays', 'sight seeing'],
19 | description:
20 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
21 | authorName: 'John Doe',
22 | authorAvatar: '/assets/images/author.jpg',
23 | createdAt: 'June 03, 2021',
24 | cover: '/assets/images/f67396fc3cfce63a28e07ebb35d974ac.jpg',
25 | },
26 | {
27 | id: 3,
28 | title: 'Online Shopping – An Alternative to Shopping in the Mall',
29 | category: 'shopping',
30 | subCategory: ['e-commerce store', 'clothing', 'shopping store'],
31 | description:
32 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
33 | authorName: 'John Doe',
34 | authorAvatar: '/assets/images/author.jpg',
35 | createdAt: 'June 03, 2021',
36 | cover: '/assets/images/fQwuyKJ9qxjSbr6REcgtmW-1200-80.jpg',
37 | },
38 | {
39 | id: 4,
40 | title: 'ADVENTURE IN YOU',
41 | category: 'adventure',
42 | subCategory: ['adrenaline', 'stay-fit', 'lifestyle'],
43 | description:
44 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
45 | authorName: 'John Doe',
46 | authorAvatar: '/assets/images/author.jpg',
47 | createdAt: 'June 03, 2021',
48 | cover: '/assets/images/graphic-design-trends.png',
49 | },
50 | {
51 | id: 5,
52 | title: 'Loaded BBQ Baked Potatoes',
53 | category: 'cooking',
54 | subCategory: ['bbq', 'food', 'lifestyle'],
55 | description:
56 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
57 | authorName: 'John Doe',
58 | authorAvatar: '/assets/images/author.jpg',
59 | createdAt: 'June 03, 2021',
60 | cover: '/assets/images/make-it-personal.jpg',
61 | },
62 | {
63 | id: 6,
64 | title: 'Beyond the Beach',
65 | category: 'travel',
66 | subCategory: ['beaches', 'sea', 'holidays'],
67 | description:
68 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
69 | authorName: 'John Doe',
70 | authorAvatar: '/assets/images/author.jpg',
71 | createdAt: 'June 03, 2021',
72 | cover:
73 | '/assets/images/Purple-Combination-colors-graphic-design-predictions-1024x576-1024x576.jpg',
74 | },
75 | {
76 | id: 7,
77 | title: 'Art & Perception',
78 | category: 'art',
79 | subCategory: ['skill', 'design', 'passion'],
80 | description:
81 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
82 | authorName: 'John Doe',
83 | authorAvatar: '/assets/images/author.jpg',
84 | createdAt: 'June 03, 2021',
85 | cover: '/assets/images/Synthwave-Postmodern.jpg',
86 | },
87 | ];
88 |
--------------------------------------------------------------------------------
/beginners-blog/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 | import { BrowserRouter } from 'react-router-dom';
5 |
6 | ReactDOM.render(
7 |
8 |
9 |
10 |
11 | ,
12 | document.getElementById('root')
13 | );
14 |
--------------------------------------------------------------------------------
/beginners-blog/src/pages/Blog/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import { useParams } from 'react-router';
3 | import { blogList } from '../../config/data';
4 | import Chip from '../../components/common/Chip';
5 | import EmptyList from '../../components/common/EmptyList';
6 | import './styles.css';
7 | import { Link } from 'react-router-dom';
8 |
9 | const Blog = () => {
10 | const { id } = useParams();
11 | const [blog, setBlog] = useState(null);
12 |
13 | useEffect(() => {
14 | let blog = blogList.find((blog) => blog.id === parseInt(id));
15 | if (blog) {
16 | setBlog(blog);
17 | }
18 | }, []);
19 |
20 | return (
21 | <>
22 |
23 | ←Go Back
24 |
25 | {blog ? (
26 |