Skip to content

Commit

Permalink
nav complete
Browse files Browse the repository at this point in the history
  • Loading branch information
amaan-aly246 committed Jun 24, 2024
1 parent 1aea417 commit 3291c00
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 150 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<html lang="en">
<head>
<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>Post Pilot</title>
</head>
<body>
<div id="root"></div>
Expand Down
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

28 changes: 3 additions & 25 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import Navigation from "./components/Navigation"

function App() {
const [count, setCount] = useState(0)


return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
<Navigation/>
</>
)
}
Expand Down
Binary file added src/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

31 changes: 31 additions & 0 deletions src/components/Navigation.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react"
import logo from '../assets/images/logo.png'
function Navigation() {
return (
<>
<nav className="flex justify-between p-2 m-2">
{/* logo */}
<p className=""><img src={logo} alt="logo" /></p>
{/* nav links */}
<div className="capitalize flex gap-4 items-center text-xl -z-0 font-sans font-medium">
<p>Resources</p>
<p>Success stories</p>
<p>companies</p>
<p>prices</p>
<div className="relative">
<button className=" z-30 border-[2px] p-1 px-4 border-black rounded-md bg-white">Login</button>
<button className=" -z-10 absolute left-1 top-1 border-[2px] p-1 px-4 border-black rounded-md bg-black">Login</button>
</div>
<div className="relative">
<button className=" text-white z-30 border-[2px] p-1 px-4 border-black rounded-md bg-[#FF6D2C]">Create free account</button>

<button className=" -z-10 absolute left-1 top-4 px-4 border-black rounded-md bg-[#2E2F35] ">Create free account</button>
</div>
</div>
</nav>

</>
)
}

export default Navigation
71 changes: 3 additions & 68 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
: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;
}

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;
}
}
@tailwind base;
@tailwind components;
@tailwind utilities;
8 changes: 5 additions & 3 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [],
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}

}

0 comments on commit 3291c00

Please sign in to comment.