Skip to content
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
9 changes: 9 additions & 0 deletions frontend/bun.lock

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"react": "^18.3.1",
"react-bootstrap": "^2.10.0",
"react-dom": "^18.3.1",
"react-router-dom": "^7.14.0",
"react-treeview": "^0.4.7",
"styled-components": "^6.1.0",
"uuid": "^8.2.0"
Expand Down
62 changes: 62 additions & 0 deletions frontend/src/assets/TigerPath Landing Graphic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions frontend/src/assets/TigerPath Waves.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions frontend/src/components/Landing.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react'
import 'styles/landing.css'
import tigerImg from '../assets/TigerPath Landing Graphic.svg'
import waveImg from '../assets/TigerPath Waves.svg'


function Landing() {
return (
<div className="landing-container">
<svg className="landing-filter" width="0" height="0" aria-hidden="true">
<defs>
<filter id="sketchy">
<feTurbulence type="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" />
<feDisplacementMap in="SourceGraphic" in2="noise" scale="2.5" />
</filter>
</defs>
</svg>

<div className="upper-bar">
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdjBwHsURKujVqfnUk7nyocAMnFDFI6fyubDmqYMgLElpm_Nw/viewform"
className="feedback-link hyperlink"
target="_blank"
rel="noopener noreferrer">
feedback
</a>
</div>
<main className="body">
<div className="landing-left">
<div className="landing-left-graphics">
<img src={tigerImg} className="tiger-illustration"
alt="Tiger on a ship" />
</div>
</div>

<div className="landing-right">
<div className="landing-header">
<h1 className="landing-title">TigerPath</h1>
<h2 className="landing-subtitle">
Plan your entire Princeton journey with TigerPath.</h2>
</div>
<a href="/login" className="sign-in-button">SIGN IN</a>
<p className="landing-credit">Made by <a href="https://tigerapps.org/" className="hyperlink">TigerApps</a>
</p>
</div>
</main>

<div className="wave-wrapper" aria-hidden="true">
<div className="wave-carousel">
<img src={waveImg} className="wave-illustration" alt=""/>
<img src={waveImg} className="wave-illustration" alt=""/>
<img src={waveImg} className="wave-illustration" alt=""/>
</div>
</div>
</div>
)
}

export default Landing
2 changes: 2 additions & 0 deletions frontend/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import './legacy/tutorial';

import React from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter, Routes, Route } from 'react-router-dom'; // landing page
import App from 'components/App';
import Landing from 'components/Landing';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove landing module import from planner entrypoint

Importing components/Landing in index.jsx has side effects because that module imports global CSS and large SVG assets, so the authenticated planner entrypoint now pulls landing-page styles/assets even though <Landing /> is never rendered there. This increases bundle weight and can leak global style rules into the main app unnecessarily.

Useful? React with 👍 / 👎.

import 'styles/app-style.css';
import 'styles/messages.css';
import 'styles/Courses.css';
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/landing.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import './bootstrap-init';

import React from 'react';
import { createRoot } from 'react-dom/client';
import Landing from 'components/Landing';

const container = document.getElementById('app');
const root = createRoot(container);
root.render(<Landing />);
1 change: 1 addition & 0 deletions frontend/src/styles/app-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ h6 {
margin-left: 0;
}

/* account for navbar, 56 px*/
#app {
height: calc(100vh - 78px);
overflow: hidden;
Expand Down
Loading
Loading