Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic setup of application (SEO Optimized) #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-hot-toast": "^2.4.1",
"react-router-dom": "^6.21.1",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
34 changes: 4 additions & 30 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,16 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<meta name="description" content="A social voice platform" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>RESONATE</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
5 changes: 3 additions & 2 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
Disallow: /private/
Disallow: /restricted/
Disallow: /admin/
38 changes: 0 additions & 38 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +0,0 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
24 changes: 6 additions & 18 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
import logo from './logo.svg';
import './App.css';
import { Routes, Route } from "react-router-dom";
import "./App.css";
import Home from "./Pages/Home/Home";

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<Routes>
<Route exact path="/" element={<Home />} />
</Routes>
);
}

Expand Down
7 changes: 7 additions & 0 deletions src/Components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

const Footer = () => {
return <div>Footer</div>;
};

export default Footer;
7 changes: 7 additions & 0 deletions src/Components/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

const Header = () => {
return <div>Header</div>;
};

export default Header;
33 changes: 33 additions & 0 deletions src/Components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Footer from "../Footer/Footer";
import Header from "../Header/Header";
import { Helmet } from "react-helmet";
import { Toaster } from "react-hot-toast";
const Layout = ({ children, description, keyword, author, title }) => {
return (
<>
<Helmet>
<meta charSet="utf-8" />
<meta name="description" content={description} />
<meta name="keywords" content={keyword} />
<meta name="author" content={author} />
<title>{title}</title>
</Helmet>

<Header />
<main>
<Toaster />
{children}
</main>
<Footer />
</>
);
};

Layout.defaultProps = {
title: "RESONATE",
description: "A social voice platform",
keyword: "resonate",
author: "Dhanush B, Chandan S Gowda",
};

export default Layout;
11 changes: 11 additions & 0 deletions src/Pages/Home/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

const Home = () => {
return (
<div>
<p>Home Page</p>
</div>
);
};

export default Home;
21 changes: 12 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";

const root = ReactDOM.createRoot(document.getElementById('root'));
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
<>
<BrowserRouter>
<App />
</BrowserRouter>
</>
);

// If you want to start measuring performance in your app, pass a function
Expand Down
1 change: 0 additions & 1 deletion src/logo.svg

This file was deleted.