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
3 changes: 3 additions & 0 deletions client/public/ACMDev-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 22 additions & 12 deletions client/src/components/Core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ const Footer = styled.div`
font-family: var(--font-family);
padding-left: 10px;
padding-right: 10px;
padding-top: 150px;
padding-top: 30px;
padding-bottom: 15px;

@media (max-width: 992px) {
& {
padding-top: 15px;
padding-top: 20px;
}
}
`;
Expand All @@ -42,8 +42,8 @@ const SageLink = styled.a`
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 1rem 2rem;
margin-bottom: 0.5rem;
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);
Expand All @@ -57,30 +57,40 @@ const SageLink = styled.a`
`;

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

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

const SageLogo = styled.img`
height: 1.5rem;
margin-right: 0.5rem;
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.375rem;
height: 1.2rem;
`

const CreditsText = styled.p`
font-size: 0.9rem;
margin: 0.2rem 0;

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

interface CoreProps {
children: ReactNode;
}
Expand Down Expand Up @@ -110,7 +120,7 @@ function Core({ children }: CoreProps) {
Built with <HeartTwoTone twoToneColor="#eb2f96" /> by{" "}
<a href="https://www.acmutd.co" target={"blank"}>ACM Dev</a>
</BuiltWithLove>
<p>
<CreditsText>
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>,{" "}
Expand All @@ -121,7 +131,7 @@ function Core({ children }: CoreProps) {

<a href="https://github.com/acmutd/utd-grades/tree/master/raw_data" target={"blank"}> Raw data available for download</a>

</p>
</CreditsText>
</Footer>
</Container>
);
Expand Down
6 changes: 4 additions & 2 deletions client/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const HeaderText = styled.a`
letter-spacing: 2px;
font-size: 24px;
margin-bottom: 0px;
display: flex;
align-items: center;
gap: 8px;
}
`;

Expand All @@ -45,7 +48,6 @@ const HeaderBold = styled.span`
const Logo = {
height: "36px",
width: "36px",
marginTop: "-8px",
};

export default function Header() {
Expand All @@ -60,7 +62,7 @@ export default function Header() {
<Back onClick={goHome} type="ghost" icon={<HomeOutlined />} shape="circle" size="large" />
<HeaderText href="#" onClick={goHome}>
<h2>
<Image src="/ACMDev-logo.png" alt="ACM Dev Logo" width={24} height={24} style={Logo} /> <HeaderBold>UTD</HeaderBold> Grades
<Image src="/ACMDev-logo.svg" alt="ACM Dev Logo" width={24} height={24} style={Logo} /> <HeaderBold>UTD</HeaderBold> Grades
</h2>
</HeaderText>
<Back
Expand Down
6 changes: 4 additions & 2 deletions client/src/components/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ const Results = React.memo(function Results({ search, sectionId, router }: Resul
if (scrollRef.current) {
const contentArea = scrollRef.current;
const contentRect = contentArea.getBoundingClientRect();
const targetScrollY = window.scrollY + contentRect.top - 80; // 80px padding from top
const offset = window.innerWidth <= 992 ? 5 : 35; // diff offsets for mobile vs desktop
const targetScrollY = window.scrollY + contentRect.top - offset;

scroll.scrollTo(Math.max(0, targetScrollY), {
duration: 400,
Expand Down Expand Up @@ -257,7 +258,8 @@ const Results = React.memo(function Results({ search, sectionId, router }: Resul

const contentArea = scrollRef.current;
const contentRect = contentArea.getBoundingClientRect();
const targetScrollY = window.scrollY + contentRect.top - 80;
const offset = window.innerWidth <= 992 ? 5 : 35; // diff offsets for mobile vs desktop
const targetScrollY = window.scrollY + contentRect.top - offset;

scroll.scrollTo(Math.max(0, targetScrollY), {
duration: 400,
Expand Down
39 changes: 31 additions & 8 deletions client/src/components/SectionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ ChartJS.register(CategoryScale, LinearScale, BarElement, ChartTooltip);
const Container = styled.div`
padding-top: 20px;
padding-bottom: 50px;
display: flex;
flex-direction: column;
height: 100vh;

@media (max-width: 992px) {
& {
padding-left: 25px;
padding-right: 25px;
height: auto;
}
}

Expand All @@ -39,8 +43,8 @@ const Container = styled.div`

const GraphContainer = styled.div`
width: 100%;
height: 50vh;
min-height: 300px;
flex: 1;
min-height: 250px;
max-height: 400px;

@media (max-width: 992px) {
Expand All @@ -49,6 +53,7 @@ const GraphContainer = styled.div`
height: 30vh;
min-height: 200px;
max-height: 300px;
flex: none;
}
}

Expand All @@ -63,7 +68,8 @@ const GraphContainer = styled.div`

const ProfessorDetailsContainer = styled.div`
width: 100%;
margin-top: 2rem;
margin-top: 1rem;
flex-shrink: 0;

@media (max-width: 992px) {
& {
Expand All @@ -85,16 +91,24 @@ const Header = styled.h3`
font-weight: 700;
font-size: 48px;
margin-bottom: 0px !important;
margin-top: 6px !important;
margin-top: 0px !important;
`;

const SubHeader = styled.h5`
font-family: var(--font-family);
font-weight: 600;
font-size: 22px;
color: rgb(117, 117, 117);
margin-top: 1rem !important;
margin-top: 0.25rem !important;
margin-bottom: 0rem !important;
word-wrap: break-word;
overflow-wrap: break-word;

@media (max-width: 992px) {
& {
font-size: 18px;
}
}
`;

const Stat = styled.h5`
Expand Down Expand Up @@ -127,7 +141,7 @@ const RMPScore = styled.span`
const RMPTooltip = styled(Row)`
justify-content: center;
align-items: center;
margin-top: 1rem !important;
margin-top: 0.25rem !important;
gap: 0.5rem;
`;

Expand Down Expand Up @@ -260,6 +274,14 @@ const Section = styled.span`
const Stack = styled.div`
display: flex;
flex-direction: column;
flex-shrink: 0;

@media (max-width: 992px) {
&:first-child {
flex: 1;
min-width: 0; /* Allow text to wrap */
}
}
`;

const FlexSmall = styled.div`
Expand All @@ -271,6 +293,7 @@ const FlexSmall = styled.div`
@media (max-width: 992px) {
& {
gap: 1rem;
flex-wrap: wrap;
}
}
`;
Expand Down Expand Up @@ -345,7 +368,7 @@ const SectionContent = React.memo(function SectionContent({

return (
<Container>
<Stack>
<Stack style={{ marginBottom: "1rem" }}>
<FlexSmall>
<Stack>
<Header>
Expand Down Expand Up @@ -388,7 +411,7 @@ const SectionContent = React.memo(function SectionContent({
</Stat>
</Stack>

<Row style={{ marginBottom: "2rem" }}>
<Row style={{ marginBottom: "0.5rem" }}>
<Col xs={24} sm={24} md={24}>
<GraphContainer>
<Bar options={options} data={data} />
Expand Down
53 changes: 43 additions & 10 deletions client/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,31 @@ const Main = styled.div`
margin-top: 50px;
`;

const Header = styled.h2`
const Header = styled.h1`
font-family: var(--font-family);
text-transform: uppercase;
text-align: center;
color: rgb(78, 78, 78);
font-weight: 300;
letter-spacing: 2px;
font-size: 26px;
letter-spacing: 3px;
font-size: 48px;
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: center;
gap: 16px;

@media (max-width: 768px) {
font-size: 36px;
letter-spacing: 2px;
gap: 12px;
}

@media (max-width: 480px) {
font-size: 28px;
letter-spacing: 1px;
gap: 8px;
}
`;

const Description = styled.p`
Expand All @@ -45,15 +61,28 @@ const HeaderBold = styled.span`
font-weight: 700;
`;

const SmallFont = styled.span`
font-size: 12px;
const ByACM = styled.span`
font-size: 16px;
font-weight: 400;
letter-spacing: 1px;
color: #95989a;
margin-left: 12px;

@media (max-width: 768px) {
font-size: 14px;
margin-left: 8px;
}

@media (max-width: 480px) {
font-size: 12px;
margin-left: 6px;
}
`;

const Logo = {
height: "36px",
width: "36px",
marginTop: "-8px",

height: "52px",
width: "52px",
flexShrink: 0,
};


Expand All @@ -75,7 +104,11 @@ export default function Home() {
<Col lg={{ span: 10, offset: 7 }} xs={{ span: 20, offset: 2 }}>
<FadeIn delay={0}>
<Header>
<Image src="/ACMDev-logo.png" alt="ACM Dev Logo" width={32} height={32} style={Logo} /> <HeaderBold>UTD</HeaderBold> Grades <SmallFont> by <HeaderBold>ACM</HeaderBold></SmallFont>
<Image src="/ACMDev-logo.svg" alt="ACM Dev Logo" width={52} height={52} style={Logo} />
<div>
<HeaderBold>UTD</HeaderBold> GRADES
<ByACM>by <HeaderBold>ACM</HeaderBold></ByACM>
</div>
</Header>
</FadeIn>
<FadeIn delay={300}>
Expand Down