diff --git a/app/features/admin/routes/generate-images.tsx b/app/features/admin/routes/generate-images.tsx new file mode 100644 index 000000000..efdef131f --- /dev/null +++ b/app/features/admin/routes/generate-images.tsx @@ -0,0 +1,149 @@ +import { Divider } from "~/components/Divider"; +import { Image } from "~/components/Image"; +import { Main } from "~/components/Main"; +import { list } from "~/features/mmr/core/Seasons"; +import { navIconUrl, tierImageUrl } from "~/utils/urls"; + +// this page is not accessible in production, just used to generate images for social media + +export default function GenerateImages() { + return ( +
+

Generate Images

+ + +
+ ); +} + +const season = list.at(-1)!; + +function SendouQSeason() { + return ( +
+
+

Season {season.nth}

+
+ {season.starts.toLocaleDateString("en-US", { + month: "long", + day: "numeric", + year: "numeric", + })}{" "} + -{" "} + {season.ends.toLocaleDateString("en-US", { + month: "long", + day: "numeric", + year: "numeric", + })} +
+
+ +
+ + + + + + + + + +
+ + + EVENTS + + + + + + + + +
+ Check all ranked tournaments on the calendar! +
+
+ ); +} + +function InfoSquare({ + title, + children, +}: { title: string; children: React.ReactNode }) { + return ( +
+ {title} +
+ {children} +
+
+ ); +} + +function EventSchedule({ + name, + date, + imgId, +}: { name: string; date: Date; imgId: string }) { + return ( +
+ +
+
{name}
+
+ {date.toLocaleDateString("en-US", { + month: "long", + day: "numeric", + year: "numeric", + })} +
+
+
+ ); +} diff --git a/app/routes.ts b/app/routes.ts index 5439968b7..405d65c28 100644 --- a/app/routes.ts +++ b/app/routes.ts @@ -5,6 +5,16 @@ import { route, } from "@remix-run/route-config"; +const devOnlyRoutes = + process.env.NODE_ENV === "development" + ? ([ + route( + "/admin/generate-images", + "features/admin/routes/generate-images.tsx", + ), + ] satisfies RouteConfig) + : []; + export default [ index("features/front-page/routes/index.tsx"), route("/patrons-list", "features/front-page/routes/patrons-list.ts"), @@ -281,4 +291,5 @@ export default [ route("impersonate", "features/auth/routes/auth.impersonate.ts"), route("impersonate/stop", "features/auth/routes/auth.impersonate.stop.ts"), ]), + ...devOnlyRoutes, ] satisfies RouteConfig; diff --git a/app/styles/utils.css b/app/styles/utils.css index 817daa811..760100310 100644 --- a/app/styles/utils.css +++ b/app/styles/utils.css @@ -110,6 +110,10 @@ background-color: var(--bg); } +.bg-lighter { + background-color: var(--bg-lighter); +} + .bg-transparent-important { background-color: transparent !important; }