diff --git a/app/components/IndexWorldCard.tsx b/app/components/IndexWorldCard.tsx new file mode 100644 index 0000000..fd3884e --- /dev/null +++ b/app/components/IndexWorldCard.tsx @@ -0,0 +1,22 @@ +import { HiChevronRight } from "react-icons/hi2"; +import { World } from "~/utils/saerro"; +import { CardBase, CardHeader } from "./Card"; +import { FactionBar } from "./FactionBar"; + +export const WorldCard = ({ world }: { world: World }) => { + return ( + + +
{world.name}
+ +
+ +
+
Population: {world.population.total.toLocaleString()}
+
+ +
+
+
+ ); +}; diff --git a/app/globalStyles.ts b/app/globalStyles.ts index f2c8a08..7682d12 100644 --- a/app/globalStyles.ts +++ b/app/globalStyles.ts @@ -7,6 +7,6 @@ export const Body = styled("body", { backgroundAttachment: "fixed", color: "#fff", lineHeight: 1.6, - fontFamily: "Inter, system-ui, sans-serif", + fontFamily: "'IBM Plex Mono', monospace", margin: 0, }); diff --git a/app/root.tsx b/app/root.tsx index a88d724..a8fa317 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -21,7 +21,7 @@ export const meta: MetaFunction = () => ({ export const links: LinksFunction = () => [ { rel: "stylesheet", - href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap", + href: "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;700&display=swap", }, ]; diff --git a/app/routes/index.tsx b/app/routes/index.tsx index f391b99..5653c82 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -5,37 +5,106 @@ import { indexQuery } from "~/utils/saerro"; import { useLoaderData } from "@remix-run/react"; import { json } from "@remix-run/cloudflare"; import { FactionBar } from "~/components/FactionBar"; +import { WorldCard } from "~/components/IndexWorldCard"; +import { styled } from "styletron-react"; +import React, { ReactNode } from "react"; export const loader = async () => { return json(await indexQuery()); }; export default function Index() { - const { allWorlds } = useLoaderData(); + // const { allWorlds } = useLoaderData(); return (
- {allWorlds.map((world) => ( +
+ {/* {allWorlds.map((world) => ( - ))} + ))} */}
); } -const WorldCard = ({ world }: { world: World }) => { - return ( - - -
{world.name}
- -
+const HeaderBase = styled("div", { + display: "flex", + flexDirection: "row", + borderColor: "#fff", + backgroundColor: "#fff", + color: "#fff", + borderLeftWidth: "0.5rem", + borderTopWidth: "0.5rem", + borderRightWidth: "0", + borderBottomWidth: "0.5rem", + borderStyle: "solid", + borderTopLeftRadius: "0.5rem", + position: "relative", +}); -
-
Population: {world.population.total.toLocaleString()}
-
- -
-
-
- ); -}; +const Header = () => ( + + + PS2.LIVE +
+ Realtime tools for PlanetSide 2 +
+ + + Saerro Live Pop API + + + Census API Playground + + + Population API + + + Continents API + + + Discord Character Link + + + Metagame Webhooks + + +
+); + +const QuoteUnquoteLogo = styled("div", { + width: "8rem", + backgroundColor: "#fff", + color: "#000", + textAlign: "right", + padding: "0.5rem", + borderRight: "0.5rem solid #fff", +}); + +const TheList = styled("div", { + backgroundColor: "#000", + borderRadius: "0.5rem", + position: "relative", + left: "-0.5rem", + display: "flex", + flexWrap: "wrap", + padding: "0.5rem", + gap: "0.5rem", + flexDirection: "column", + maxHeight: "8rem", + alignContent: "flex-start", + justifyContent: "center", + flex: 1, +}); + +const ListLink = styled("a", ({ color }: { color: string }) => ({ + display: "block", + padding: "0.5rem", + color, + textDecoration: "none", + borderRadius: "0.4rem", + transition: "all 0.2s ease-in-out", + ":hover": { + backgroundColor: color, + color: "#000", + }, +}));