diff --git a/app/components/MapPoolSelector.module.css b/app/components/MapPoolSelector.module.css
new file mode 100644
index 000000000..e476d5ffb
--- /dev/null
+++ b/app/components/MapPoolSelector.module.css
@@ -0,0 +1,76 @@
+.templateSelection {
+ display: grid;
+ gap: var(--s-2);
+ grid-template-columns: 1fr;
+}
+
+@media screen and (min-width: 640px) {
+ .templateSelection {
+ grid-template-columns: 1fr 1fr;
+ }
+}
+
+.stageRow {
+ display: flex;
+ width: 100%;
+ align-items: center;
+ gap: var(--s-3);
+}
+
+.stageNameRow {
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ align-items: center;
+ justify-content: space-between;
+ border-radius: var(--rounded);
+ background-color: var(--bg-lighter);
+ font-size: var(--fonts-xs);
+ font-weight: var(--semi-bold);
+ gap: var(--s-2);
+ padding-block: var(--s-1-5);
+ padding-inline: var(--s-3);
+}
+
+@media screen and (min-width: 640px) {
+ .stageNameRow {
+ flex-direction: row;
+ }
+}
+
+.stageImage {
+ border-radius: var(--rounded);
+}
+
+.modeButtonsContainer {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: var(--s-1-5);
+}
+
+.modeButton {
+ padding: 0;
+ padding: var(--s-1);
+ border: 2px solid var(--bg-darker);
+ border-radius: var(--rounded-full);
+ background-color: transparent;
+ color: var(--theme);
+ opacity: 1 !important;
+ outline: initial;
+}
+
+.modeButton.selected {
+ border: 2px solid transparent;
+ background-color: var(--bg-mode-active);
+}
+
+.modeButton.preselected {
+ border: 2px solid var(--theme-info);
+ background-color: var(--bg-mode-active);
+}
+
+.mode:not(.selected, .preselected) {
+ filter: var(--inactive-image-filter);
+ opacity: 0.6;
+}
diff --git a/app/components/MapPoolSelector.tsx b/app/components/MapPoolSelector.tsx
index f9f2b75b5..f5782f39d 100644
--- a/app/components/MapPoolSelector.tsx
+++ b/app/components/MapPoolSelector.tsx
@@ -20,6 +20,8 @@ import { MapPoolEventsCombobox } from "./Combobox";
import { ArrowLongLeftIcon } from "./icons/ArrowLongLeft";
import { CrossIcon } from "./icons/Cross";
+import styles from "./MapPoolSelector.module.css";
+
export type MapPoolSelectorProps = {
mapPool: MapPool;
preselectedMapPool?: MapPool;
@@ -138,7 +140,7 @@ export function MapPoolSelector({
)}
{allowBulkEdit && (
-
+
{stageIds.filter(stageRowIsVisible).map((stageId) => (
-
+
{t(`game-misc:STAGE_${stageId}`)}
-
+
{modes
.filter(
(mode) =>
@@ -274,8 +276,8 @@ export function MapPoolStages({
return (
{
const data = args.data as SerializeFrom;
diff --git a/app/features/calendar/routes/calendar.new.tsx b/app/features/calendar/routes/calendar.new.tsx
index 82a3b5814..e7f082cba 100644
--- a/app/features/calendar/routes/calendar.new.tsx
+++ b/app/features/calendar/routes/calendar.new.tsx
@@ -50,7 +50,6 @@ import { canAddNewEvent } from "../calendar-utils";
import { BracketProgressionSelector } from "../components/BracketProgressionSelector";
import { Tags } from "../components/Tags";
import "~/styles/calendar-new.css";
-import "~/styles/maps.css";
import { SendouSwitch } from "~/components/elements/Switch";
import { metaTags } from "~/utils/remix";
diff --git a/app/features/map-list-generator/routes/maps.module.css b/app/features/map-list-generator/routes/maps.module.css
new file mode 100644
index 000000000..b6dc33ec7
--- /dev/null
+++ b/app/features/map-list-generator/routes/maps.module.css
@@ -0,0 +1,56 @@
+.container {
+ max-width: 38rem;
+}
+
+.poolSelector {
+ padding-block: var(--s-3);
+}
+
+.poolMeta {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.poolInfo {
+ font-size: var(--fonts-xs);
+ font-weight: var(--bold);
+}
+
+.poolInfo a {
+ font-weight: var(--semi-bold);
+}
+
+.tournamentMapListLink {
+ font-size: var(--fonts-xxs);
+ text-align: center;
+}
+
+.mapListCreator {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: var(--s-4);
+}
+
+.toggleContainer {
+ --label-margin: 0;
+
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: var(--s-2);
+}
+
+.mapList {
+ font-size: var(--fonts-xs);
+ font-weight: var(--semi-bold);
+ margin-block-start: var(--s-4);
+}
+
+.modeAbbr {
+ color: var(--text-lighter);
+ font-weight: var(--bold);
+ text-decoration: none;
+}
diff --git a/app/features/map-list-generator/routes/maps.tsx b/app/features/map-list-generator/routes/maps.tsx
index 18213ada6..252a52783 100644
--- a/app/features/map-list-generator/routes/maps.tsx
+++ b/app/features/map-list-generator/routes/maps.tsx
@@ -12,7 +12,6 @@ import { SendouSwitch } from "~/components/elements/Switch";
import { EditIcon } from "~/components/icons/Edit";
import type { Tables } from "~/db/tables";
import { type ModeWithStage, stageIds } from "~/modules/in-game-lists";
-import "~/styles/maps.css";
import invariant from "~/utils/invariant";
import { metaTags } from "~/utils/remix";
import type { SendouRouteHandle } from "~/utils/remix.server";
@@ -27,6 +26,8 @@ import { modesOrder } from "../core/map-list-generator/modes";
import { mapPoolToNonEmptyModes } from "../core/map-list-generator/utils";
import { MapPool } from "../core/map-pool";
+import styles from "./maps.module.css";
+
import { loader } from "../loaders/maps.server";
export { loader };
@@ -66,16 +67,14 @@ export default function MapListPage() {
useSearchParamPersistedMapPool();
return (
-
+
{searchParams.has("readonly") && data.calendarEvent && (
-
-
+
+
{t("common:maps.mapPool")}:{" "}
- {
-
- {data.calendarEvent.name}
-
- }
+
+ {data.calendarEvent.name}
+
)}
{t("common:maps.tournamentMaplist")}
@@ -112,7 +111,7 @@ export default function MapListPage() {
);
}
-function useSearchParamPersistedMapPool() {
+export function useSearchParamPersistedMapPool() {
const data = useLoaderData
();
const [searchParams, setSearchParams] = useSearchParams();
@@ -185,8 +184,8 @@ function MapListCreator({ mapPool }: { mapPool: MapPool }) {
mapPool.isEmpty() || (szEveryOther && !mapPool.hasMode("SZ"));
return (
-
-
+
+
{mapList && (
<>
-
+
{mapList.map(({ mode, stageId }, i) => (
-
{t(`game-misc:MODE_SHORT_${mode}`)}
diff --git a/app/features/tournament/routes/to.$id.tsx b/app/features/tournament/routes/to.$id.tsx
index 8e539f050..d16a821d0 100644
--- a/app/features/tournament/routes/to.$id.tsx
+++ b/app/features/tournament/routes/to.$id.tsx
@@ -28,7 +28,6 @@ import { type TournamentLoaderData, loader } from "../loaders/to.$id.server";
export { loader };
import "~/styles/calendar-event.css";
-import "~/styles/maps.css";
import "../tournament.css";
export const shouldRevalidate: ShouldRevalidateFunction = (args) => {
diff --git a/app/styles/maps.css b/app/styles/maps.css
deleted file mode 100644
index 7a2bd6144..000000000
--- a/app/styles/maps.css
+++ /dev/null
@@ -1,133 +0,0 @@
-.maps__container {
- max-width: 38rem;
-}
-
-.maps__pool-selector {
- padding-block: var(--s-3);
-}
-
-.maps__pool-meta {
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-
-.maps__pool-info {
- font-size: var(--fonts-xs);
- font-weight: var(--bold);
-}
-
-.maps__pool-info a {
- font-weight: var(--semi-bold);
-}
-
-.maps__tournament-map-list-link {
- font-size: var(--fonts-xxs);
- text-align: center;
-}
-
-.maps__stage-row {
- display: flex;
- width: 100%;
- align-items: center;
- gap: var(--s-3);
-}
-
-.maps__stage-name-row {
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- align-items: center;
- justify-content: space-between;
- border-radius: var(--rounded);
- background-color: var(--bg-lighter);
- font-size: var(--fonts-xs);
- font-weight: var(--semi-bold);
- gap: var(--s-2);
- padding-block: var(--s-1-5);
- padding-inline: var(--s-3);
-}
-
-@media screen and (min-width: 640px) {
- .maps__stage-name-row {
- flex-direction: row;
- }
-}
-
-.maps__mode-buttons-container {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- gap: var(--s-1-5);
-}
-
-.maps__mode-button {
- padding: 0;
- padding: var(--s-1);
- border: 2px solid var(--bg-darker);
- border-radius: var(--rounded-full);
- background-color: transparent;
- color: var(--theme);
- opacity: 1 !important;
- outline: initial;
-}
-
-.maps__mode-button.selected {
- border: 2px solid transparent;
- background-color: var(--bg-mode-active);
-}
-
-.maps__mode-button.preselected {
- border: 2px solid var(--theme-info);
- background-color: var(--bg-mode-active);
-}
-
-.maps__stage-image {
- border-radius: var(--rounded);
-}
-
-.maps__mode:not(.selected, .preselected) {
- filter: var(--inactive-image-filter);
- opacity: 0.6;
-}
-
-.maps__map-list-creator {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: var(--s-4);
-}
-
-.maps__toggle-container {
- --label-margin: 0;
-
- display: flex;
- align-items: center;
- justify-content: center;
- gap: var(--s-2);
-}
-
-.maps__map-list {
- font-size: var(--fonts-xs);
- font-weight: var(--semi-bold);
- margin-block-start: var(--s-4);
-}
-
-.maps__mode-abbr {
- color: var(--text-lighter);
- font-weight: var(--bold);
- text-decoration: none;
-}
-
-.maps__template-selection {
- display: grid;
- gap: var(--s-2);
- grid-template-columns: 1fr;
-}
-
-@media screen and (min-width: 640px) {
- .maps__template-selection {
- grid-template-columns: 1fr 1fr;
- }
-}