Skip to content
Open
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
8 changes: 8 additions & 0 deletions client/public/ACMDev-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/public/fonts/Gilroy-Bold.ttf
Binary file not shown.
Binary file added client/public/fonts/Gilroy-Light.ttf
Binary file not shown.
Binary file added client/public/fonts/Gilroy-Regular.ttf
Binary file not shown.
Binary file added client/public/fonts/Gilroy-SemiBold.ttf
Binary file not shown.
79 changes: 18 additions & 61 deletions client/src/components/Core.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { HeartTwoTone } from "@ant-design/icons";
import { Popover } from "antd";
import type { ReactNode } from "react";
import { useEffect } from "react";
import styled from "styled-components";
Expand Down Expand Up @@ -38,60 +36,35 @@ const Footer = styled.div`
}
`;

const SageLink = styled.a`
background: linear-gradient(90deg, rgba(7,67,37,1) 0%, rgba(22,50,36,1) 100%);
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.6rem 1.2rem;
margin-bottom: 0.3rem;
border-radius: 100rem;
color: #5AED86;
text-shadow: 0 0 4px rgb(0 0 0 / 0.6);
box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
transition: transform cubic-bezier(0.4, 0, 0.2, 1) 150ms, box-shadow cubic-bezier(0.4, 0, 0.2, 1) 150ms;
&:hover {
color: #5AED86;
box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
transform: scale(1.01);
}
`;

const SageText = styled.p`
line-height: 1.2rem;
margin-bottom: 0;
font-size: 0.9rem;
`;

const BuiltWithLove = styled.p`
/*const BuiltWithLove = styled.p`
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
font-size: 1rem;
margin: 0.3rem 0;
font-weight: 550;
`;

const SageLogo = styled.img`
height: 1.2rem;
margin-right: 0.4rem;
filter: drop-shadow(0 0 4px rgb(0 0 0 / 0.6));
`;

const SageTextMark = styled.img`
height: 1.2rem;
`
`;*/

const CreditsText = styled.p`
font-size: 0.9rem;
font-family: 'Gilroy-Bold', sans-serif;
color: var(--muted-text);
margin: 0.2rem 0;

@media (max-width: 768px) {
display: none;
}
`;

const GitHubLink = styled.a`
color: var(--link-color) !important;
text-decoration: none;

&:hover {
text-decoration: underline;
}
`;

interface CoreProps {
children: ReactNode;
}
Expand Down Expand Up @@ -148,40 +121,24 @@ function Core({ children }: CoreProps) {
window.removeEventListener("keydown", handleKeyDown);
};
}, []);
const donors = (
<div style={{ width: "300px" }}>
<p>
Thank you to the following people for donating and making this possible (in order of most
monetary support): Anthony-Tien Huynh, Adam Butcher, Paul Denino, Thomas Sowders, Xavier
Brown, Enza Denino, David Garvin, Alastair Feille, Andrew Vaccaro and other anonymous
donors.
</p>
</div>
);

return (
<Container>
<Body>{children}</Body>
<Footer>
<SageLink href="https://utdsage.com/" target={"blank"}>
<SageLogo src="/SAGE-Logo.svg" />
<SageText>Get AI-powered UTD advising with </SageText>
<SageTextMark src="/SAGE-Textmark.svg" />
</SageLink>
<BuiltWithLove>
{/*<BuiltWithLove>
Built with <HeartTwoTone twoToneColor="#eb2f96" /> by{" "}
<a href="https://www.acmutd.co" target={"blank"}>ACM Dev</a>
</BuiltWithLove>
</BuiltWithLove>*/}
<CreditsText>
Designed by <a href="https://www.arimilli.io" target={"blank"}>Bharat Arimilli</a>. Thanks to{" "}
{/*Designed by <a href="https://www.arimilli.io" target={"blank"}>Bharat Arimilli</a>. Thanks to{" "}
<a href="https://garrettgu.com/" target={"blank"}>Garrett Gu</a>,{" "}
<a href="https://jeffw.xyz/" target={"blank"}>Jeffrey Wang</a>,{" "}
<a href="https://www.linkedin.com/in/josephwickline/" target={"blank"}>Joseph Wickline</a> and our{" "}
<Popover content={donors}>
<span style={{ textDecoration: "underline" }}>donors</span>.
</Popover>

<a href="https://github.com/acmutd/utd-grades/tree/master/raw_data" target={"blank"}> Raw data available for download</a>
</Popover>*/}
See the full source code on our <GitHubLink href="https://github.com/acmutd/utd-grades" target="_blank">GitHub</GitHubLink>

</CreditsText>
</Footer>
Expand Down
79 changes: 66 additions & 13 deletions client/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HomeOutlined } from "@ant-design/icons";
import { Button, Row } from "antd";
import Image from "next/image";
import Router from "next/router";
import React from "react";
import React, { useEffect, useState } from "react";
import styled from "styled-components";

const Menu = styled(Row)`
Expand All @@ -16,11 +16,12 @@ const Back = styled(Button) <{ $dummy?: boolean }>`
outline: none;
border: none;
cursor: pointer;
outline: none;
border: none;
box-shadow: none;
color: var(--text-color);
svg {
color: inherit;
}
visibility: ${(props) => (props.$dummy ? "hidden" : "visible")};

&:hover,
&:focus,
&:active {
Expand All @@ -35,15 +36,30 @@ const Back = styled(Button) <{ $dummy?: boolean }>`
}
`;

const Toggle = styled(Button)`
background: none;
outline: none;
border: none;
cursor: pointer;
box-shadow: none;
color: var(--muted-text);
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px;
svg {
width: 18px;
height: 18px;
}
`;

const HeaderText = styled.a`
margin-right: auto;
margin-left: auto;
display: block;

& h2 {
font-family: var(--font-family);
text-transform: uppercase;
color: rgb(78, 78, 78);
color: var(--text-color);
font-weight: 300;
letter-spacing: 2px;
font-size: 24px;
Expand All @@ -55,15 +71,36 @@ const HeaderText = styled.a`
`;

const HeaderBold = styled.span`
font-family: 'Gilroy-Bold', sans-serif;
font-weight: 700;
`;

const HeaderLight = styled.span`
font-family: 'Gilroy-Light', sans-serif;
`;

const Logo = {
height: "36px",
width: "36px",
};

export default function Header() {
const [theme, setTheme] = useState<"light" | "dark">(() => {
if (typeof window === "undefined") return "dark";
const saved = localStorage.getItem("theme");
if (saved === "light" || saved === "dark") return saved;
return "dark";
});

useEffect(() => {
try {
document.documentElement.setAttribute("data-theme", theme);
localStorage.setItem("theme", theme);
} catch (e) {
// ignore during SSR
}
}, [theme]);

function goHome() {
(async function () {
await Router.push("/");
Expand All @@ -75,17 +112,33 @@ export default function Header() {
<Back onClick={goHome} type="ghost" icon={<HomeOutlined />} shape="circle" size="large" />
<HeaderText href="#" onClick={goHome}>
<h2>
<Image src="/ACMDev-logo.svg" alt="ACM Dev Logo" width={24} height={24} style={Logo} /> <HeaderBold>UTD</HeaderBold> Grades
<Image
src={theme === "light" ? "/ACMDev-logo.svg" : "/ACMDev-logo-white.svg"}
alt="ACM Dev Logo"
width={24}
height={24}
style={Logo}
/>
<HeaderBold>UTD</HeaderBold> <HeaderLight>GRADES</HeaderLight>
</h2>
</HeaderText>
<Back
$dummy
onClick={goHome}
<Toggle
onClick={() => setTheme((t) => (t === "light" ? "dark" : "light"))}
type="ghost"
icon={<HomeOutlined />}
shape="circle"
size="large"
/>
aria-label={`Switch to ${theme === "light" ? "dark" : "light"} mode`}
>
{theme === "light" ? (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden>
<path d="M6.76 4.84l-1.8-1.79L3.17 4.83l1.79 1.79 1.8-1.78zM1 13h3v-2H1v2zm10 9h2v-3h-2v3zm7.03-2.03l1.79 1.79 1.79-1.79-1.79-1.79-1.79 1.79zM17.24 4.84l1.8-1.79L19.83 1.2l-1.79 1.79-0.8 1.85zM12 6a6 6 0 100 12 6 6 0 000-12z" fill="currentColor" />
</svg>
) : (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden>
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z" fill="currentColor" />
</svg>
)}
</Toggle>
</Menu>
);
}
Loading