Skip to content

Commit

Permalink
Quiet navbar, perhaps?
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepTester committed Sep 23, 2024
1 parent f0b2381 commit 28274cd
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 12 deletions.
21 changes: 14 additions & 7 deletions src/components/layout/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import styles from './style.module.scss';

interface NavbarProps {
accessType?: UserAccessType;
quiet?: boolean;
}
const Navbar = ({ accessType }: NavbarProps) => {
const Navbar = ({ accessType, quiet }: NavbarProps) => {
const size = useWindowSize();
const headerRef = useRef<HTMLHeadElement>(null);

Expand Down Expand Up @@ -50,14 +51,20 @@ const Navbar = ({ accessType }: NavbarProps) => {
if (!accessType) {
return (
<header className={styles.header}>
<div className={styles.content}>
<Link href={config.homeRoute} className={styles.navLeft}>
<Image src={LightModeLogo} alt="ACM General Logo" width={48} height={48} />
<span className={styles.headerTitle}>Membership Portal</span>
</Link>
<div className={`${styles.content} ${quiet ? styles.quiet : ''}`}>
{quiet ? (
<span className={styles.navLeft}>
<Image src={LightModeLogo} alt="ACM General Logo" width={48} height={48} />
</span>
) : (
<Link href={config.homeRoute} className={styles.navLeft}>
<Image src={LightModeLogo} alt="ACM General Logo" width={48} height={48} />
<span className={styles.headerTitle}>Membership Portal</span>
</Link>
)}
<ThemeToggle />
</div>
<hr className={`${styles.wainbow} ${styles.loggedOut}`} />
{!quiet ? <hr className={`${styles.wainbow} ${styles.loggedOut}`} /> : null}
</header>
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/layout/Navbar/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
width: 100%;
z-index: 20;

&.quiet {
border-bottom: 1px solid var(--theme-elevated-stroke);
height: vars.$header-height;
}

.toggleIcon {
background-color: inherit;
display: none;
Expand Down Expand Up @@ -64,7 +69,6 @@

.navLeft {
align-items: center;
cursor: pointer;
display: flex;
gap: 1.25rem;
height: 100%;
Expand Down
1 change: 1 addition & 0 deletions src/components/layout/Navbar/style.module.scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type Styles = {
mobileSwitch: string;
navLeft: string;
portalLinks: string;
quiet: string;
toggleIcon: string;
wainbow: string;
};
Expand Down
5 changes: 3 additions & 2 deletions src/components/layout/PageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import styles from './style.module.scss';

interface LayoutProps {
accessType?: UserAccessType;
quietNavbar?: boolean;
}

const PageLayout = ({ accessType, children }: PropsWithChildren<LayoutProps>) => (
const PageLayout = ({ accessType, quietNavbar, children }: PropsWithChildren<LayoutProps>) => (
<>
<Navbar accessType={accessType} />
<Navbar accessType={accessType} quiet={quietNavbar} />
<main className={styles.content}>{children}</main>
</>
);
Expand Down
15 changes: 14 additions & 1 deletion src/components/onboarding/OnboardingScreen/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Button, Typography } from '@/components/common';
import Communities from '@/components/onboarding/Communities';
import Intro from '@/components/onboarding/Intro';
import { CollectionSlider } from '@/components/store';
import Step4 from '@/public/assets/graphics/store/step4.svg';
import { ReactNode, useState } from 'react';
import { AiOutlineClockCircle } from 'react-icons/ai';
Expand Down Expand Up @@ -39,7 +40,19 @@ const steps: Step[] = [
{
title: 'Redeem your points at the ACM Store!',
caption: 'Purchase merch with your points and show off your ACM spirit!',
content: <div className={styles.rainbow} />,
content: (
<>
<div className={styles.rainbow} />
<div style={{ padding: '2rem', textAlign: 'left' }}>
<CollectionSlider
uuid=""
title="The Cozy Collection"
description="Bundle up by the fire with a blanket and this new collection of cute sweaters and hoodies."
items={[]}
/>
</div>
</>
),
},
{
title: 'That’s a glimpse on how we run ACM at UCSD.',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function MyApp({ Component, pageProps, router }: AppProps) {
/>
<ThemeProvider>
<ToastContainer />
<PageLayout accessType={pageProps?.user?.accessType}>
<PageLayout accessType={pageProps?.user?.accessType} quietNavbar={pageProps.quietNavbar}>
<Component {...pageProps} />
</PageLayout>
</ThemeProvider>
Expand Down
1 change: 1 addition & 0 deletions src/pages/onboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const getServerSideProps: GetServerSideProps<OnboardProps> = async ({ que
return {
props: {
destination: route || config.homeRoute,
quietNavbar: true,
},
};
};

0 comments on commit 28274cd

Please sign in to comment.