[
  {
    "path": "Data/db.json",
    "content": "{\n    \"blogs\": [\n      {\n        \"title\": \"My First Blog\",\n        \"body\": \"Why do we use it?\\nIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).\\n\\n\\nWhere does it come from?\\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \\\"de Finibus Bonorum et Malorum\\\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \\\"Lorem ipsum dolor sit amet..\\\", comes from a line in section 1.10.32.\\n\\nThe standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from \\\"de Finibus Bonorum et Malorum\\\" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.\\n\\nWhere can I get some?\\nThere are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.\",\n        \"author\": \"mario\",\n        \"id\": 1\n      },\n      {\n        \"title\": \"Opening Party!\",\n        \"body\": \"Why do we use it?\\nIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).\\n\\n\\nWhere does it come from?\\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \\\"de Finibus Bonorum et Malorum\\\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \\\"Lorem ipsum dolor sit amet..\\\", comes from a line in section 1.10.32.\\n\\nThe standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from \\\"de Finibus Bonorum et Malorum\\\" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.\\n\\nWhere can I get some?\\nThere are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.\",\n        \"author\": \"yoshi\",\n        \"id\": 2\n      }\n    ]\n}"
  },
  {
    "path": "README.md",
    "content": "# Getting Started with Create React App\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in your browser.\n\nThe page will reload when you make changes.\\\nYou may also see any lint errors in the console.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\\\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\\\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\\\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can't go back!**\n\nIf 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.\n\nInstead, 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.\n\nYou 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.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n\n### Code Splitting\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)\n\n### Analyzing the Bundle Size\n\nThis 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)\n\n### Making a Progressive Web App\n\nThis 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)\n\n### Advanced Configuration\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)\n\n### Deployment\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)\n\n### `npm run build` fails to minify\n\nThis 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)\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"my-react-project\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@testing-library/jest-dom\": \"^5.16.5\",\n    \"@testing-library/react\": \"^13.3.0\",\n    \"@testing-library/user-event\": \"^13.5.0\",\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-scripts\": \"5.0.1\",\n    \"web-vitals\": \"^2.1.4\"\n  },\n  \"scripts\": {\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test\",\n    \"eject\": \"react-scripts eject\"\n  },\n  \"eslintConfig\": {\n    \"extends\": [\n      \"react-app\",\n      \"react-app/jest\"\n    ]\n  },\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  },\n  \"devDependencies\": {\n    \"tailwindcss\": \"^3.1.8\"\n  }\n}\n"
  },
  {
    "path": "public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"icon\" href=\"%PUBLIC_URL%/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <meta\n      name=\"description\"\n      content=\"Web site created using create-react-app\"\n    />\n    <link rel=\"apple-touch-icon\" href=\"%PUBLIC_URL%/logo192.png\" />\n    <!--\n      manifest.json provides metadata used when your web app is installed on a\n      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/\n    -->\n    <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\" />\n    <!--\n      Notice the use of %PUBLIC_URL% in the tags above.\n      It will be replaced with the URL of the `public` folder during the build.\n      Only files inside the `public` folder can be referenced from the HTML.\n\n      Unlike \"/favicon.ico\" or \"favicon.ico\", \"%PUBLIC_URL%/favicon.ico\" will\n      work correctly both with client-side routing and a non-root public URL.\n      Learn how to configure a non-root public URL by running `npm run build`.\n    -->\n    <title>React App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n    <!--\n      This HTML file is a template.\n      If you open it directly in the browser, you will see an empty page.\n\n      You can add webfonts, meta tags, or analytics to this file.\n      The build step will place the bundled scripts into the <body> tag.\n\n      To begin the development, run `npm start` or `yarn start`.\n      To create a production bundle, use `npm run build` or `yarn build`.\n    -->\n  </body>\n</html>\n"
  },
  {
    "path": "public/manifest.json",
    "content": "{\n  \"short_name\": \"React App\",\n  \"name\": \"Create React App Sample\",\n  \"icons\": [\n    {\n      \"src\": \"favicon.ico\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    },\n    {\n      \"src\": \"logo192.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"192x192\"\n    },\n    {\n      \"src\": \"logo512.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"512x512\"\n    }\n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#000000\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "public/robots.txt",
    "content": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\nDisallow:\n"
  },
  {
    "path": "src/App.js",
    "content": "//import logo from './logo.svg';\n//import './App.css';\nimport Navbar from './Navbar';\nimport Home from './Home';\n\nfunction App() {\n  //we can declare some variable here and some javascript after retur n it \n  //const title = 'this is starter blog to revise react tricks ';\n  // let persone = {name : 'salim',age : 29}\n  // const link= 'http://www.google.com';\n\n  return (\n    <div className=\"App\">\n      <Navbar />\n      <div className=\"content\">\n       <h1>this is React JS</h1>\n        {/* <h3>Hello this is just  a { title } </h3> */}\n        <Home />\n        {/* React cant call boolean & object like this exemple below  */}\n      {/* <p> I'm { persone }</p> */}\n      {/* <p>{'this is string : My name is taha yacine salim '}</p>\n      <p>{\"this is anumber : \"+30}</p>\n      <p>{ [1,2,3,4]}</p> */}\n      {/* <a href={link}>this is a link </a> */}\n      </div>\n    </div>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "src/App.test.js",
    "content": "import { render, screen } from '@testing-library/react';\nimport App from './App';\n\ntest('renders learn react link', () => {\n  render(<App />);\n  const linkElement = screen.getByText(/learn react/i);\n  expect(linkElement).toBeInTheDocument();\n});\n"
  },
  {
    "path": "src/BlogList.js",
    "content": "const BlogList = ({blogs, title , handDelete}) => {\n\n    \n    // const title = props.title;\n    // const blogs = props.blogs;\n    //console.log(props,blogs)\n    return ( \n        <div className=\"blog-list\">\n            <h2>{title}</h2>\n            {blogs.map((blog) => (\n                <div className=\"blog-preview\" key={blog.id}>\n                    <h2>{blog.title}</h2>\n                    <p>this blog is written by {blog.author}</p>\n                    <button onClick={() => handDelete(blog.id)}>Delete Blog</button>\n                </div>\n            ))}\n        </div>\n     );\n}\n \nexport default BlogList;"
  },
  {
    "path": "src/Home.js",
    "content": "import { useState,useEffect } from \"react\";\nimport BlogList from \"./BlogList\";\n\nconst Home = () => {\n    //lists outpputing\n    const [blogs,setBlogs] = useState(null);\n//useEffect()\n    useEffect(() => {\n        fetch('http://localhost:8000/blogs')\n        .then(res => {\n           return res.json();\n        })\n        .then(data => {\n            console.log(data);\n        })\n    }, []);\n\n    const handClick = (e) => {\n        console.log('Hello, ninjas', e);\n    }\n\n    const handlclickagain = (name,e) => {\n        console.log('Hello ' +name, e.target);\n    }\n    //let name = 'mario';\n    //useState for update states like this example \n    const [name,setName] = useState('mario');\n    const [age,setAge] = useState(20);\n    const handlclickusestate =() =>{\n        setName('Salim Taha Yacine');\n        setAge('sorry is '+29+' :p ')\n    }\n    //BUTTON HANDLE Color using this anonymos function\n    const [color,setColor] = useState(\"black\");\n    const handlColorchange = () => {\n        setColor(color === \"black\" ? \"#f3a039\" : \"black\")\n    }\n    //BUTTON HANDLE DELETE using this anonymos function\n    const handDelete = (id) => {\n        const newBlogs = blogs.filter(blog => blog.id !== id );\n        setBlogs(newBlogs);\n    }\n\n\n        /*============================= */\n    return ( \n        <div>\n            <h4 style={{color:color}}> this is Home </h4>\n            <button onClick={handClick}>Click Me</button> <br></br>\n            <button onClick={ (e) => handlclickagain('Salim', e)}> click on Me Again</button>\n            <br /> <br />\n            <h4 style={{color:color}}>my name is {name} and {age} old</h4>\n            <button onClick={handlclickusestate}>button for usestate</button>\n            <button onClick={handlColorchange}>change Color</button>\n            <br /> <br /><br /> <br />\n           {/*<BlogList  blogs={blogs} title=\"This is a Title props\" handDelete={handDelete}/>\n            <BlogList  blogs={blogs.filter((blog)=> blog.author === 'salim')} title=\"Salim's Blogs\"/>*/} \n        </div>\n     );\n}\n \nexport default Home;"
  },
  {
    "path": "src/Navbar.js",
    "content": "const Navbar = () => {\n    return ( \n        <nav className=\"navbar\">\n            <h1>Stronglover Blog </h1>\n            <div className=\"links\">\n                <a href=\"/\" style={{color:\"#f3a039\"}}>Home</a>\n                <a href=\"/create\" style={{ \n                    color: \"white\",\n                    backgroundColor: '#f3a039',\n                    borderRadius: '8px'\n                    }}>New Blog</a>\n            </div>\n            \n        </nav>\n     );\n}\n //we can also make style css by using style ={{ css here }}\nexport default Navbar;"
  },
  {
    "path": "src/index.css",
    "content": "@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');\n\n/* base styles */\n* {\n  margin: 0;\n  font-family: \"Quicksand\";\n  color: #333;\n}\n.navbar {\n  padding: 20px;\n  display: flex;\n  align-items: center;\n  max-width:auto;\n  margin: 0 auto;\n  border-bottom: 1px solid #f2f2f2;\n}\n.navbar h1 {\n  color: #f3a039;\n}\n.navbar .links {\n  margin-left: auto;\n}\n.navbar a {\n  margin-left: 16px;\n  text-transform: uppercase;\n  text-decoration: none;\n  padding: 6px;\n}\n.navbar a:hover {\n  color: black;\n  text-decoration: solid;\n}\n.content {\n  text-align: center;\n  max-width:500px  ;\n  margin: 45px auto;\n  padding: 20px;\n}\n.blog-preview{\n  padding:10px 16px;\n  margin: 20px 0;\n  border-bottom: 1px solid #fafafa;\n}\n.blog-preview:hover{\n  box-shadow: 1px 3px 5px #f3a039;\n  border-radius: 8px;\n}\n.blog-preview h2 {\n  font-size: 20px;\n  color: #f3a039;\n  margin-bottom: 8px;\n}"
  },
  {
    "path": "src/index.js",
    "content": "import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));\nroot.render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"
  },
  {
    "path": "src/reportWebVitals.js",
    "content": "const reportWebVitals = onPerfEntry => {\n  if (onPerfEntry && onPerfEntry instanceof Function) {\n    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n      getCLS(onPerfEntry);\n      getFID(onPerfEntry);\n      getFCP(onPerfEntry);\n      getLCP(onPerfEntry);\n      getTTFB(onPerfEntry);\n    });\n  }\n};\n\nexport default reportWebVitals;\n"
  },
  {
    "path": "src/setupTests.js",
    "content": "// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport '@testing-library/jest-dom';\n"
  },
  {
    "path": "tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n  content: [\"./src/**/*.{html,js}\"],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n"
  }
]