diff --git a/app/components/layout/nav-items.json b/app/components/layout/nav-items.json index 560043d78..89bc4d3bb 100644 --- a/app/components/layout/nav-items.json +++ b/app/components/layout/nav-items.json @@ -3,6 +3,7 @@ "name": "admin", "url": "admin" }, + { "name": "calendar", "url": "calendar" }, { "name": "badges", "url": "badges" }, { "name": "plus", diff --git a/app/routes/calendar.tsx b/app/routes/calendar.tsx new file mode 100644 index 000000000..a905a3072 --- /dev/null +++ b/app/routes/calendar.tsx @@ -0,0 +1,41 @@ +import { type LinksFunction } from "@remix-run/node"; +import { Link } from "@remix-run/react"; +import * as React from "react"; +import { Main } from "~/components/Main"; +import styles from "~/styles/calendar.css"; + +export const links: LinksFunction = () => { + return [{ rel: "stylesheet", href: styles }]; +}; + +export default function CalendarPage() { + const [weeks, setWeeks] = React.useState([ + "10", + "Last", + "This", + "Next", + "14", + ]); + + return ( +
+
+
+ {weeks.map((week) => ( +
setWeeks(["Last", "This", "Next", "14", "15"])} + className="calendar__week" + > +
+ {week}
+ Week +
+
×12
+
+ ))} +
+
+
+ ); +} diff --git a/app/styles/calendar.css b/app/styles/calendar.css new file mode 100644 index 000000000..14e79d179 --- /dev/null +++ b/app/styles/calendar.css @@ -0,0 +1,57 @@ +.calendar__weeks { + display: flex; + max-width: 24rem; + align-items: center; + justify-content: space-between; + gap: var(--s-2); + padding-inline: var(--s-2-5); + + --full-size-week-height: 6.75rem; + + /* xxx: this should be behind a media query */ + --full-size-week-width: 6rem; +} + +.calendar__week { + display: flex; + width: var(--full-size-week-width); + height: var(--full-size-week-height); + flex-direction: column; + justify-content: space-between; + padding: var(--s-2); + background-color: var(--theme-transparent); + border-radius: var(--rounded); + color: var(--theme); + font-size: var(--fonts-sm); + font-weight: var(--bold); + text-align: center; +} + +.calendar__event-count { + font-size: var(--fonts-xs); + font-weight: var(--body); +} + +.calendar__week:nth-child(1), +.calendar__week:nth-child(5) { + width: calc(var(--full-size-week-width) - 2rem); + height: calc(var(--full-size-week-height) - 2rem); + font-size: var(--fonts-xxs); +} + +.calendar__week:nth-child(1) > .calendar__event-count, +.calendar__week:nth-child(5) > .calendar__event-count { + font-size: var(--fonts-xxxs); +} + +.calendar__week:nth-child(2), +.calendar__week:nth-child(4) { + width: calc(var(--full-size-week-width) - 1rem); + height: calc(var(--full-size-week-height) - 1rem); + font-size: var(--fonts-xs); +} + +.calendar__week:nth-child(2) > .calendar__event-count, +.calendar__week:nth-child(4) > .calendar__event-count { + font-size: var(--fonts-xxs); +} diff --git a/public/img/layout/calendar.avif b/public/img/layout/calendar.avif new file mode 100644 index 000000000..995929ce7 Binary files /dev/null and b/public/img/layout/calendar.avif differ diff --git a/public/img/layout/calendar.png b/public/img/layout/calendar.png new file mode 100644 index 000000000..dc99ebe8a Binary files /dev/null and b/public/img/layout/calendar.png differ diff --git a/public/locales/en/common.json b/public/locales/en/common.json index d7266a8c2..d5fc1c09f 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -3,6 +3,7 @@ "pages.badges": "Badges", "pages.plus": "Plus Server", "pages.contributors": "Contributors", + "pages.calendar": "Calendar", "pages.faq": "FAQ", "header.profile": "Profile",