Skip to content

Commit fd68c5f

Browse files
Merge pull request #66 from RGBOARD/landing_page
Landing Page
2 parents 85cd8e4 + 9361139 commit fd68c5f

6 files changed

Lines changed: 142 additions & 5 deletions

File tree

view/src/App.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
font-display: swap;
99
}
1010

11+
.content > .landing-container {
12+
flex-direction: row !important;
13+
}
14+
1115
/* Make sure pages within content area use full height */
1216
.content > div {
1317
flex: 1;
@@ -16,6 +20,10 @@
1620
overflow: hidden;
1721
}
1822

23+
.content > .landing-page {
24+
flex-direction: row !important;
25+
}
26+
1927
/* Your existing button menu styles */
2028
.button-menu {
2129
display: flex;

view/src/App.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
1+
import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom';
22
import './App.css';
33
import Header from './components/Header';
44
import Footer from './components/Footer';
@@ -12,12 +12,13 @@ import ViewPage from './pages/ViewPage';
1212
import QueueAdminPage from './pages/QueueAdminPage';
1313
import UserAdminPage from './pages/UserAdminPage';
1414
import LoadingPage from './pages/LoadingPage';
15+
import LandingPage from './pages/LandingPage';
1516
import AuthProvider from './auth/AuthProvider';
1617
import { useAuth } from './auth/authContext';
1718

1819
function AppContent() {
1920
const { isLoading, isAuthenticated, hasRole, hasAnyRole } = useAuth();
20-
21+
const location = useLocation();
2122
if (isLoading) {
2223
return <LoadingPage />;
2324
}
@@ -37,7 +38,7 @@ function AppContent() {
3738

3839
return (
3940
<div className="app-container">
40-
<Header />
41+
{!(location.pathname === '/' && !isAuthenticated) && <Header />}
4142
<main className="content">
4243
<Routes>
4344
<Route
@@ -47,7 +48,7 @@ function AppContent() {
4748
<Route
4849
path="/"
4950
element={
50-
!isAuthenticated ? <Navigate to="/login" /> :
51+
!isAuthenticated ? <LandingPage /> :
5152
hasRole('admin') ? <AdminHome /> : <UserHome />
5253
}
5354
/>

view/src/assets/RGB-Icon.png

-41.6 KB
Loading

view/src/components/styles/Header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.logo img {
12-
height: 100px;
12+
margin: 25px 2px;
1313
width: 180px;
1414
}
1515

view/src/pages/LandingPage.jsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { useNavigate } from 'react-router-dom';
2+
import './styles/LandingPage.css'
3+
import logoImage from '../assets/RGB-Icon.png';
4+
import React from "react";
5+
6+
const LandingPage = () => {
7+
const navigate = useNavigate();
8+
9+
return (
10+
<div className="landing-container">
11+
<div className="desc-container landing-page-animation">
12+
<img className= "landing-logo" src={logoImage} alt="RGB Board"/>
13+
<p className="sponsored font-bold">Sponsored by:</p>
14+
<p className="sponsored bold">IEEE Computer Society – Student Branch, University of Puerto Rico at Mayagüez</p>
15+
<h1 className="desc-title spacing">What are we about?</h1>
16+
<p className= "desc">
17+
RGBoard provides a dynamic, engaging, and simple to understand system
18+
that allows its users to to engage with each other and the wider community of people
19+
that view the images and ads displayed in the board. Using the RGBoard site you can upload
20+
flyers or image ads and have them be displayed in the RGBoard’s LED Board. Being able to display
21+
ads and reach out to students in a fuss-less and convenient way.
22+
</p>
23+
</div>
24+
<div className="choice-container landing-page-animation">
25+
<button className="landing-buttons" onClick={() => navigate('/login')}>Log In</button>
26+
<button className= "landing-buttons" onClick={() => navigate('/signup')}>Sign Up</button>
27+
</div>
28+
</div>
29+
);
30+
};
31+
32+
export default LandingPage;
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
@font-face {
2+
font-family: 'PixelifySans';
3+
src: url('../../assets/fonts/PixelifySans/PixelifySans-VariableFont_wght.ttf') format('truetype');
4+
font-weight: normal;
5+
font-style: normal;
6+
}
7+
8+
@keyframes fadeSlideIn {
9+
0% {
10+
opacity: 0;
11+
transform: translateY(20px);
12+
}
13+
100% {
14+
opacity: 1;
15+
transform: translateY(0);
16+
}
17+
}
18+
19+
.landing-page-animation {
20+
animation: fadeSlideIn 0.6s ease-out both;
21+
}
22+
23+
.landing-container{
24+
background: #D9D9D9;
25+
display: flex;
26+
flex-wrap: wrap;
27+
justify-content: space-evenly;
28+
padding: 1.5rem;
29+
width: 100%;
30+
font-size: larger;
31+
}
32+
33+
.landing-logo{
34+
width: 100%;
35+
max-width: 600px;
36+
height: auto;
37+
}
38+
39+
.desc-container {
40+
display: flex;
41+
justify-content: center;
42+
flex-direction: column;
43+
padding: 1rem;
44+
}
45+
46+
.desc-title {
47+
font-size: clamp(1.5rem, 4vw, 2.5rem);
48+
font-weight: bold;
49+
margin-bottom: 0.5rem;
50+
}
51+
52+
.desc {
53+
max-width: 600px;
54+
width: 100%;
55+
font-size: clamp(1rem, 2.5vw, 1.25rem);
56+
margin: 0 auto;
57+
}
58+
59+
.sponsored{
60+
font-family: "Pixelify Sans", sans-serif;
61+
max-width: 600px;
62+
font-size: 24px;
63+
}
64+
.choice-container{
65+
display: flex;
66+
justify-content: center;
67+
align-items: center;
68+
flex-direction: column;
69+
gap: 1rem;
70+
}
71+
72+
.landing-buttons{
73+
width: 100%;
74+
max-width: 400px;
75+
padding: clamp(1rem, 2.5vw, 2rem) clamp(3rem, 8vw, 6rem);
76+
font-size: clamp(1rem, 3vw, 2rem);
77+
color: white;
78+
font-weight: 600;
79+
border-radius: 2rem;
80+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
81+
outline: none;
82+
background: black;
83+
font-family: "Pixelify Sans", sans-serif;
84+
text-align: center;
85+
cursor: pointer;
86+
}
87+
88+
.landing-buttons:hover {
89+
background-color: white;
90+
color: black;
91+
transform: translateY(-2px);
92+
}
93+
94+
.spacing {
95+
margin-top: 2rem;
96+
}

0 commit comments

Comments
 (0)