diff --git a/app/components/Main.module.css b/app/components/Main.module.css new file mode 100644 index 000000000..e80d6f8b2 --- /dev/null +++ b/app/components/Main.module.css @@ -0,0 +1,34 @@ +.container { + display: flex; + flex-direction: row; +} + +.main { + padding-block: var(--s-4) var(--s-32); +} + +.normal { + width: 100%; + max-width: 48rem; + margin: 0 auto; + padding-inline: var(--s-3); + min-height: 75vh; +} + +.narrow { + width: 100%; + max-width: 24rem; + margin: 0 auto; +} + +.wide { + width: 100%; + max-width: 72rem; + margin: 0 auto; +} + +@media screen and (display-mode: standalone) { + .main { + padding-block-start: env(safe-area-inset-top); + } +} diff --git a/app/components/Main.tsx b/app/components/Main.tsx index 70acd8ad6..4ae8be565 100644 --- a/app/components/Main.tsx +++ b/app/components/Main.tsx @@ -2,6 +2,7 @@ import { isRouteErrorResponse, useRouteError } from "@remix-run/react"; import clsx from "clsx"; import type * as React from "react"; import { useHasRole } from "~/modules/permissions/hooks"; +import styles from "./Main.module.css"; export const Main = ({ children, @@ -26,20 +27,20 @@ export const Main = ({ !isRouteErrorResponse(error); return ( -
+
{ if (width === "narrow") { - return "half-width"; + return styles.narrow; } if (width === "wide") { - return "bigger"; + return styles.wide; } - return "main"; + return styles.normal; }; diff --git a/app/components/layout/AnythingAdder.tsx b/app/components/layout/AnythingAdder.tsx index 8021b9f40..58e7b6b18 100644 --- a/app/components/layout/AnythingAdder.tsx +++ b/app/components/layout/AnythingAdder.tsx @@ -21,6 +21,7 @@ import { type SendouMenuItemProps, } from "../elements/Menu"; import { PlusIcon } from "../icons/Plus"; +import styles from "./TopRightButtons.module.css"; export function AnythingAdder() { const { t } = useTranslation(["common"]); @@ -103,10 +104,10 @@ export function AnythingAdder() { - + } > diff --git a/app/components/layout/Footer.module.css b/app/components/layout/Footer.module.css new file mode 100644 index 000000000..8dfc72a18 --- /dev/null +++ b/app/components/layout/Footer.module.css @@ -0,0 +1,121 @@ +.footer { + display: flex; + flex-direction: column; + padding: var(--s-2-5); + background-color: var(--color-bg-high); + gap: var(--s-6); + margin-block-start: auto; + padding-block-end: var(--s-32); +} + +.linkList { + display: flex; + justify-content: space-evenly; + font-size: var(--fonts-xxs); +} + +.socials { + display: flex; + justify-content: center; + gap: var(--s-2); +} + +.socialLink { + display: flex; + max-width: 10rem; + height: 12rem; + flex: 1 1 0; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: var(--s-4); + border-radius: var(--rounded); + background-color: var(--color-bg-higher); + cursor: pointer; + font-size: var(--fonts-lg); +} + +.socialIcon { + height: 2.25rem; + transition: transform 0.25s ease-in-out; +} + +.socialLink:hover > .socialIcon { + transform: translateY(-0.3rem); +} + +.socialHeader { + text-align: center; +} + +.socialHeader > p { + font-size: var(--fonts-xxs); +} + +.patronTitle { + display: flex; + align-items: flex-end; + justify-content: center; + font-size: var(--fonts-sm); + font-weight: var(--semi-bold); + gap: var(--s-2); +} + +.patronList { + display: flex; + max-width: 75vw; + flex-wrap: wrap; + justify-content: center; + padding: 0; + margin: 0 auto; + font-size: var(--fonts-xs); + gap: var(--s-1); + list-style: none; + margin-block-start: var(--s-2); +} + +.patron { + max-width: 250px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: block; +} + +.copyrightNote { + display: flex; + flex-direction: column; + color: var(--color-text-high); + font-size: var(--fonts-xxs); + text-align: center; +} + +@media screen and (max-width: 640px) { + .socials { + flex-direction: column; + } + + .socialLink { + max-width: initial; + flex-direction: row; + } + + .socialHeader { + display: flex; + align-items: center; + gap: var(--s-2); + text-align: initial; + } + + .socialHeader > p { + margin-block-start: var(--s-1); + } + + .socialIcon { + height: 1.75rem; + } + + .socialLink:hover > .socialIcon { + transform: translateX(-0.3rem); + } +} diff --git a/app/components/layout/Footer.tsx b/app/components/layout/Footer.tsx index 8f75484e5..cb8067ee8 100644 --- a/app/components/layout/Footer.tsx +++ b/app/components/layout/Footer.tsx @@ -17,6 +17,7 @@ import { Image } from "../Image"; import { DiscordIcon } from "../icons/Discord"; import { GitHubIcon } from "../icons/GitHub"; import { PatreonIcon } from "../icons/Patreon"; +import styles from "./Footer.module.css"; export function Footer() { const { t } = useTranslation(); @@ -24,45 +25,45 @@ export function Footer() { const currentYear = new Date().getFullYear(); return ( -