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

styled homepage #16

Merged
merged 1 commit into from
Apr 28, 2024
Merged
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
60 changes: 57 additions & 3 deletions trivia-forge/frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
@import url("https://fonts.googleapis.com/css2?family=Russo+One&display=swap");




/* Header Animation */
.header-animation {
font-family: "Russo One", sans-serif;
width: 100%; height: 100%;
}
.header-animation text {
animation: stroke 5s infinite alternate;
stroke-width: 2;
stroke: #365FA0;
font-size: 100px;
}
@keyframes stroke {
0% {
fill: rgba(72,138,204,0); stroke: rgba(54,95,160,1);
stroke-dashoffset: 25%; stroke-dasharray: 0 50%; stroke-width: 2;
}
70% {fill: rgba(72,138,204,0); stroke: rgba(54,95,160,1); }
80% {fill: rgba(72,138,204,0); stroke: rgba(54,95,160,1); stroke-width: 3; }
100% {
fill: rgba(72,138,204,1); stroke: rgba(54,95,160,0);
stroke-dashoffset: -25%; stroke-dasharray: 50% 0; stroke-width: 0;
}
}

.wrapper {background-color: #FFFFFF};
/* End Header Animation */

.App {
text-align: center;
background-color: #dee2ff;
Expand Down Expand Up @@ -58,8 +90,30 @@ footer{

.homepage-container .col {
margin: 10px;
flex: 0 0 auto;
text-align: center;
}

.homepage-container .button {
background-color: #e0d6b7;
}
.homepage-container .btn-primary {
padding: 20px;
background: linear-gradient(to bottom, #ff8c00, #ff6700);
color: white;
font-weight: bold;
border: 3px solid #ee7600;
font-family: 'Fredoka One', cursive;
font-size: 40px;
border-radius: 70px; /* Rounded corners */
box-shadow: 0 8px #999;
/* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.1); */
width: 40%;
text-shadow: 1px 1px 2px black;
transition: all 0.3s ease;
}

.homepage-container .btn-primary:hover,
.homepage-container .btn-primary:focus {
transform: translateY(-2px);
background: linear-gradient(to bottom, #ff6700, #ff8c00);
border: 3px solid #ee7600;
outline: none;
}
27 changes: 22 additions & 5 deletions trivia-forge/frontend/src/Pages/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
import React from "react";
import { Button, Container, Row, Col} from 'react-bootstrap';
import '../App.css';
import { FaRegFolderOpen } from "react-icons/fa";
import { FaRegFolderOpen, FaPlusCircle, FaUserCircle, FaUserPlus } from "react-icons/fa";
import { useNavigate } from 'react-router-dom';

function Home() {
const navigate = useNavigate();

return (
<Container className="homepage-container">
<Row>
<Col>
<h1>Trivia Forge</h1>
</Col>
<svg class="header-animation">
<text x="50%" y="50%" dy=".35em" text-anchor="middle">
Trivia Forge
</text>
</svg>
</Col >
</Row>
<Row >
<Row>
<Col>
<Button variant="primary"> <FaRegFolderOpen /> My Trivia Games </Button>
</Col>
</Row>
<Row>
<Col>
<Button variant="primary">Create New Game </Button>
<Button variant="primary" onClick={() => navigate('/triviagen')}> <FaPlusCircle /> Create New Game </Button>
</Col>
</Row>
<Row>
<Col>
<Button variant="primary"> <FaUserCircle /> Login </Button>
</Col>
</Row>
<Row>
<Col>
<Button variant="primary"> <FaUserPlus /> Sign Up </Button>
</Col>
</Row>
</Container>
Expand Down