Skip to content

Commit

Permalink
feat: updated sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Dec 19, 2024
1 parent f50b1bc commit e0ba1e0
Show file tree
Hide file tree
Showing 63 changed files with 1,072 additions and 1,102 deletions.
1 change: 0 additions & 1 deletion app/[locale]/[...uriSegments]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const sectionMap = {
searchResults: SearchPageTemplate,
slideshows: SlideshowPageTemplate,
staffProfiles: StaffPageTemplate,
// userProfilePage: UserProfilePageTemplate,
};

const UriSegmentsPage: FunctionComponent<UriSegmentProps> = async ({
Expand Down
36 changes: 36 additions & 0 deletions components/atomic/Button/Hamburger/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"use client";
import { FunctionComponent } from "react";
import classNames from "classnames";
import { useTranslation } from "react-i18next";
import { IconComposer } from "@rubin-epo/epo-react-lib";
import styles from "./styles.module.scss";

interface HamburgerProps {
active: boolean;
onClick: MouseEventHandler<HTMLButtonElement>;
className?: string;
}

const Hamburger: FunctionComponent<HamburgerProps> = ({
active,
onClick,
className,
}) => {
const { t } = useTranslation();

return (
<button
aria-haspopup="dialog"
aria-expanded={active}
onClick={onClick}
className={classNames(styles.hamburger, className)}
>
<span className="a-hidden">{t("toggle-nav")}</span>
<IconComposer icon="Hamburger" />
</button>
);
};

Hamburger.displayName = "Atom.Button.Hamburger";

export default Hamburger;
22 changes: 22 additions & 0 deletions components/atomic/Button/Hamburger/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use "abstracts/mixins/base";
@use "abstracts/functions";

.hamburger {
@include base.fluid-scale(
width,
functions.header(button-width-tablet),
functions.header(button-width-mobile),
functions.break(tablet),
functions.break(mobile)
);

height: 100%;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;

&[aria-expanded="true"] {
background-color: var(--color-rubin-teal-600, #0c4a47);
}
}
1 change: 1 addition & 0 deletions components/atomic/Button/patterns/GoogleSSOButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use client";
import PropTypes from "prop-types";
import { useGoogleLogin } from "@react-oauth/google";
import { usePathname, useRouter } from "next/navigation";
Expand Down
1 change: 1 addition & 0 deletions components/atomic/Button/patterns/SSOButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use client";
/* eslint-disable react/prop-types */
import { useState, useEffect } from "react";
import PropTypes from "prop-types";
Expand Down
3 changes: 0 additions & 3 deletions components/auth/AuthorizePage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ const AUTHORIZED_TYPES = {
pages: false,
educatorPages: true,
studentPages: false,
userProfilePage: true,
investigationLandingPage: false,
};

function isAuthorized(typeHandle, user, status) {
if (typeHandle === "educatorPages")
return user?.group === "educators" && status === "active";
if (typeHandle === "userProfilePage") return !!user && status === "active";
return false;
}

Expand Down Expand Up @@ -95,7 +93,6 @@ AuthorizePage.propTypes = {
"pages",
"educatorPages",
"studentPages",
"userProfilePage",
"investigationLandingPage",
]),
children: PropTypes.node,
Expand Down
30 changes: 0 additions & 30 deletions components/global/Header/Hamburger.js

This file was deleted.

169 changes: 0 additions & 169 deletions components/global/Header/Navigation.js

This file was deleted.

82 changes: 0 additions & 82 deletions components/global/Header/UserNav/index.js

This file was deleted.

Loading

0 comments on commit e0ba1e0

Please sign in to comment.