mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-05 20:56:13 -05:00
Delete unused
This commit is contained in:
parent
075a04e336
commit
b647574b5e
|
|
@ -1,86 +0,0 @@
|
|||
.dialog {
|
||||
min-width: 100vw;
|
||||
min-height: 100vh;
|
||||
border-radius: 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.closeButton {
|
||||
margin-inline-start: auto;
|
||||
margin-block-end: var(--s-4);
|
||||
margin-inline-end: var(--s-4);
|
||||
}
|
||||
|
||||
.closeButton > svg {
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.itemsContainer {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
gap: var(--s-4) var(--s-4);
|
||||
font-size: 13px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
animation: smooth-appear 0.75s ease-out forwards;
|
||||
margin-top: 27.5px;
|
||||
opacity: 0.25;
|
||||
max-width: 48rem;
|
||||
}
|
||||
|
||||
@keyframes smooth-appear {
|
||||
to {
|
||||
margin-top: 0px;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.navItem {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
color: var(--color-text);
|
||||
font-weight: var(--weight-extra);
|
||||
gap: var(--s-1);
|
||||
text-align: center;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.logInButton {
|
||||
display: grid;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: none;
|
||||
border-radius: 100%;
|
||||
background-color: var(--color-bg-high);
|
||||
color: var(--color-text);
|
||||
place-items: center;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
display: grid;
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
border-radius: var(--radius-box);
|
||||
background-color: var(--color-bg-high);
|
||||
color: var(--color-text);
|
||||
place-items: center;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.imageContainer:hover {
|
||||
background-color: var(--color-bg-higher);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
.dialog {
|
||||
padding-block: var(--s-12) !important;
|
||||
padding-inline: 0 !important;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
import { LogOut, X } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router";
|
||||
import { SendouDialog } from "~/components/elements/Dialog";
|
||||
import { navItems } from "~/components/layout/nav-items";
|
||||
import { useUser } from "~/features/auth/core/user";
|
||||
import { LOG_OUT_URL, navIconUrl, userPage } from "~/utils/urls";
|
||||
import { Avatar } from "../Avatar";
|
||||
import { SendouButton } from "../elements/Button";
|
||||
import { Image } from "../Image";
|
||||
import { LogInButtonContainer } from "./LogInButtonContainer";
|
||||
import styles from "./NavDialog.module.css";
|
||||
|
||||
// xxx: deprecate?
|
||||
export function NavDialog({
|
||||
isOpen,
|
||||
close,
|
||||
}: {
|
||||
isOpen: boolean;
|
||||
close: () => void;
|
||||
}) {
|
||||
const user = useUser();
|
||||
const { t } = useTranslation(["common"]);
|
||||
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<SendouDialog
|
||||
className={styles.dialog}
|
||||
showHeading={false}
|
||||
aria-label="Site navigation"
|
||||
isFullScreen
|
||||
>
|
||||
<SendouButton
|
||||
icon={<X />}
|
||||
variant="minimal-destructive"
|
||||
className={styles.closeButton}
|
||||
onPress={close}
|
||||
aria-label="Close navigation dialog"
|
||||
/>
|
||||
<div className={styles.itemsContainer}>
|
||||
<LogInButton close={close} />
|
||||
{navItems.map((item) => (
|
||||
<Link
|
||||
to={`/${item.url}`}
|
||||
className={styles.navItem}
|
||||
key={item.name}
|
||||
prefetch={item.prefetch ? "render" : undefined}
|
||||
onClick={close}
|
||||
>
|
||||
<div className={styles.imageContainer}>
|
||||
<Image
|
||||
path={navIconUrl(item.name)}
|
||||
height={48}
|
||||
width={48}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div>{t(`common:pages.${item.name}` as any)}</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
{user ? (
|
||||
<div className="mt-6 stack items-center">
|
||||
<form method="post" action={LOG_OUT_URL}>
|
||||
<SendouButton
|
||||
size="small"
|
||||
variant="outlined"
|
||||
icon={<LogOut />}
|
||||
type="submit"
|
||||
>
|
||||
{t("common:header.logout")}
|
||||
</SendouButton>
|
||||
</form>
|
||||
</div>
|
||||
) : null}
|
||||
</SendouDialog>
|
||||
);
|
||||
}
|
||||
|
||||
function LogInButton({ close }: { close: () => void }) {
|
||||
const { t } = useTranslation(["common"]);
|
||||
const user = useUser();
|
||||
|
||||
if (user) {
|
||||
return (
|
||||
<Link to={userPage(user)} className={styles.navItem} onClick={close}>
|
||||
<div className={styles.imageContainer}>
|
||||
<Avatar
|
||||
user={user}
|
||||
alt={t("common:header.loggedInAs", {
|
||||
userName: `${user.username}`,
|
||||
})}
|
||||
className={styles.avatar}
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
{t("common:pages.myPage")}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.navItem}>
|
||||
<LogInButtonContainer>
|
||||
<button
|
||||
className={`${styles.logInButton} ${styles.imageContainer}`}
|
||||
type="submit"
|
||||
>
|
||||
<Image path={navIconUrl("log_in")} height={48} width={48} alt="" />
|
||||
</button>
|
||||
</LogInButtonContainer>
|
||||
{t("common:header.login.discord")}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -157,18 +157,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.headerCollapsedBreadcrumbs {
|
||||
display: none;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
.headerCollapsedBreadcrumbs {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mobileLogo {
|
||||
display: flex;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user