Skip to content

Commit

Permalink
modified landing page button (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yousef-Taha1 authored Jul 1, 2024
2 parents dfb0827 + cb72858 commit a3d33a9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 24 deletions.
82 changes: 59 additions & 23 deletions frontend/src/Components/LandingPage.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,66 @@
import React from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import backgroundImage from '../Misc/compute-ea4c57a4.png';
import Navbar from './Navbar/Navbar';
import React from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import backgroundImage from "../Misc/compute-ea4c57a4.png";
import Navbar from "./Navbar/Navbar";
import { Link } from "react-router-dom";
import { useAuth } from "react-oidc-context";

const LandingPage = () => {
React.useEffect(() => {
document.body.style.overflow = 'hidden';
return () => {
document.body.style.overflow = 'auto';
};
}, []);
const auth = useAuth();
React.useEffect(() => {
document.body.style.overflow = "hidden";
return () => {
document.body.style.overflow = "auto";
};
}, []);

return (
<div>
<div className="vh-100 vw-100 d-flex justify-content-center align-items-center" style={{ backgroundImage: `url(${backgroundImage})`, backgroundSize: 'cover', backgroundPosition: 'center', backgroundRepeat: 'no-repeat' }}>
<div className="text-white p-4 rounded text-center">
<main role="main">
<h1 className="font-weight-bold" style={{ fontSize: '4rem', textShadow: '2px 2px 4px rgba(0, 0, 0, 0.8)' }}>TEAMAGOCHI</h1>
<p className="lead pt-4 pb-2" style={{ fontSize: '1.75rem', textShadow: '1px 1px 2px rgba(0, 0, 0, 0.8)' }}>Teamagochi is more than just a toy, it's a pet.<br></br> Customize it the way you want it and complete fun challenges to earn rewards.<br>
</br>Take care of your pet and you will make it happy and thankful!</p>
<button type='button' className='btn btn-lg btn-success py-3' style={{ fontSize: '2rem' }}>Get started!</button>
</main>
</div>
</div>
return (
<div>
<div
className="vh-100 vw-100 d-flex justify-content-center align-items-center"
style={{
backgroundImage: `url(${backgroundImage})`,
backgroundSize: "cover",
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
}}
>
<div className="text-white p-4 rounded text-center">
<main role="main">
<h1
className="font-weight-bold"
style={{
fontSize: "4rem",
textShadow: "2px 2px 4px rgba(0, 0, 0, 0.8)",
}}
>
TEAMAGOCHI
</h1>
<p
className="lead pt-4 pb-2"
style={{
fontSize: "1.75rem",
textShadow: "1px 1px 2px rgba(0, 0, 0, 0.8)",
}}
>
Teamagochi is more than just a toy, it's a pet.<br></br> Customize
it the way you want it and complete fun challenges to earn
rewards.<br></br>Take care of your pet and you will make it happy
and thankful!
</p>
{/* <button type='button' className='btn btn-lg btn-success py-3' style={{ fontSize: '2rem' }}>Get started!</button> */}
<a
className="btn btn-lg btn-success py-3"
href="#"
onClick={() => auth.signinRedirect()}
>
Get started!
</a>
</main>
</div>
);
</div>
</div>
);
};

export default LandingPage;
2 changes: 1 addition & 1 deletion frontend/src/Components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const Navbar = () => {
{auth.isAuthenticated ? (
<>
<li
className={`nav-item ${
className={`nav-item ${
activePage === "Pet Page" ? "active" : ""
}`}
>
Expand Down

0 comments on commit a3d33a9

Please sign in to comment.