Skip to content

Commit

Permalink
ui bugs removed, routes fixed, responsiveness 90% fix, f.. (#5)
Browse files Browse the repository at this point in the history
* ui bugs removed, routes fixed, responsiveness 90% fix, broilerplate for other pages done

* dependency error fixed
  • Loading branch information
Sami3160 authored Jun 26, 2024
1 parent 95ee3a1 commit 94c8da9
Show file tree
Hide file tree
Showing 15 changed files with 844 additions and 200 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="./src/assets/fitness1.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FitFlux</title>
<title>FitFlex</title>
</head>
<body>
<div id="root"></div>
Expand Down
104 changes: 103 additions & 1 deletion package-lock.json

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

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@emailjs/browser": "^4.3.3",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
Expand All @@ -18,12 +19,15 @@
"@mui/icons-material": "^5.15.20",
"@mui/material": "^5.15.20",
"chart.js": "^4.4.3",
"emailjs": "^4.0.3",
"emailjs-com": "^3.2.0",
"framer-motion": "^11.2.10",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.1"
"react-router-dom": "^6.23.1",
"react-slick": "^0.30.2",
"slick-carousel": "^1.8.1"
},
"devDependencies": {
"@types/react": "^18.2.66",
Expand Down
43 changes: 33 additions & 10 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
import './App.css'
import Home from "./views/Home.jsx"
import Contact from "./components/Contact.jsx"
function App() {
import "./App.css";
import { Suspense, lazy } from "react";
import { Routes, Router, Route, Outlet, BrowserRouter } from "react-router-dom";
const Navbar = lazy(() => import("./components/Navbar.jsx"));
const Home = lazy(() => import("./views/Home.jsx"));
const Contact = lazy(() => import("./views/Contact.jsx"));
const About = lazy(() => import("./views/About.jsx"));
const Profile = lazy(() => import("./views/Profile.jsx"));
const Plans = lazy(() => import("./views/Plans.jsx"));
const Workout = lazy(() => import("./views/Workout.jsx"));

function App() {
return (
<div>
<Home/>
<Contact/>
</div>
)
<>
<Suspense fallback={<div>Loading...</div>}>
<BrowserRouter>
<Navbar />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/home" element={<Home />} />
<Route path="/contact" element={<Contact />} />
<Route path="/about" element={<About />} />
<Route path="/plans" element={<Plans />} />
<Route path="/plans:plansId" element={<Plans />} />
<Route path="/workout:workoutId" element={<Workout />} />
<Route path="/progress" element={<Profile />} />
<Route path="/login" element={<Contact />} />
<Route path="/signup" element={<Contact />} />
<Route path="/*" element={<div>404 page not found</div>} />
</Routes>
</BrowserRouter>
</Suspense>
</>
);
}

export default App
export default App;
66 changes: 66 additions & 0 deletions src/components/CounterCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
function CounterCard({ val, icon, text }) {
return (
<div
className="data-container"
id="a0"
style={{
fontFamily: "Poppins, sans-serif",
width: "28vmin",
height: "28vmin",
display: "flex",
flexDirection: "column",
justifyContent: "space-around",
padding: "1em 0",
position: "relative",
fontSize: "16px",
borderRadius: "0.5em",
backgroundColor: "#21242b",
borderBottom: "10px solid #FF4F04",
transition: "transform 0.5s ease, box-shadow 0.7s ease",
}}
>
<i className="fas fa-male"></i>
<FontAwesomeIcon
style={{
paddingTop: "20px",
color: "#FF4F04",
fontSize: "2.5em",
textAlign: "center",
}}
icon={icon}
/>
<span
style={{
color: "#ffffff",
display: "grid",
placeItems: "center",
fontWeight: "600",
fontSize: "3em",
marginBottom: "70px",
}}
className="num"
data-val="20"
id="hero"
>
{val}
</span>
<span
style={{
color: "#e0e0e0",
fontSize: "1em",
textAlign: " center",
padding: " 0.7em 0",
fontWeight: "400",
lineHeight: "0",
}}
className="text"
>
{text}
</span>
</div>
);
}

export default CounterCard;
22 changes: 22 additions & 0 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// this component is temperary and will be replaced with the actual workout and exercise components
const Footer = () => {
return (
<footer style={{ height: '25vh' }}>
<div>
<h3>Contact Us</h3>
<p>Email: [email protected]</p>
<p>Phone: 123-456-7890</p>
</div>
<div>
<h3>Follow Us</h3>
<ul>
<li><a href="#">Facebook</a></li>
<li><a href="#">Twitter</a></li>
<li><a href="#">Instagram</a></li>
</ul>
</div>
</footer>
);
};

export default Footer;
Loading

0 comments on commit 94c8da9

Please sign in to comment.