Skip to content

Commit

Permalink
day1 of react
Browse files Browse the repository at this point in the history
  • Loading branch information
barathraju-43 committed Jun 8, 2023
1 parent 0c39bfe commit 7475e91
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 119 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>React_testPage</title>
</head>
<body>
<div id="root"></div>
Expand Down
67 changes: 37 additions & 30 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
header{
position: relative;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
.nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);

.nav-logo {
width: 60px;
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
.nav-items {
list-style: none;
display: flex;
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
.nav-items > li {
padding: 10px;
}

.card {
padding: 2em;
header::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background-color: #090202;
}

.footer-section{
bottom: 0;
border: 3px solid grey;
}

.read-the-docs {
color: #888;


.mainHeader{
font-family: 'Roboto', sans-serif;
}





32 changes: 13 additions & 19 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
// import './App.css'
import "./App.css";
import React from "react";
import Header from "./components/Header/Header";
import MainContent from "./components/MainContent/MainContent";
import Footer from "./components/Footer/Footer";
import ReactDOM from "react-dom";

function App() {
return (
<>
<div>
<h1>The Exchange HUB</h1>
<ul>
<li>Topics</li>
<li>About</li>
<li>Contact</li>
</ul>
</div>
<div>
<p>This is just a test page to understand react</p>
</div>
</>
)
<div>
<Header />
<MainContent />
<Footer />
</div>
);
}

export default App
export default App;
Binary file added src/assets/reactlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
10 changes: 10 additions & 0 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import "./Footer.css";

export default function Footer() {
return (
<footer className="footer-section">
<small>© 2021 xyz development. All rights reserved.</small>
</footer>
);
}
Empty file.
18 changes: 18 additions & 0 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import logo from "../../assets/reactlogo.png";
import "./Header.css";

export default function Header() {
return (
<header>
<nav className="navbar">
<img src={logo} width="40px" />
<ul className="nav-items">
<li>Pricing</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</header>
);
}
Empty file.
16 changes: 16 additions & 0 deletions src/components/MainContent/MainContent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import "./MainContent.css";

export default function MainContent() {
return (
<div>
<h1 className="mainHeader">Reasons I'm excited to learn React</h1>
<ol>
<li>
It's a popular library, so I'll be able to fit in with the cool kids!
</li>
<li>I'm more likely to get a job as a developer if I know React</li>
</ol>
</div>
);
}
69 changes: 0 additions & 69 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,69 +0,0 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}

a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}

body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}

h1 {
font-size: 3.2em;
line-height: 1.1;
}

button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

0 comments on commit 7475e91

Please sign in to comment.