Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: styles #127

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/nextjs/src/app/_components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ export const Footer = () => {
name: "Brand Assets",
href: "https://drive.google.com/drive/folders/17vrwIjwqifxBVTkHmxoK1VhQ31hVSbDH",
},
{
name: "Shop",
href: "https://shop.realms.world",
},
];

return (
<div className="my-24 w-full ">
<div className="p my-24 w-full px-4">
<div className="pt-10 sm:pl-56">
<div className="w-full">
<h1>Realms.World</h1>
Expand Down
16 changes: 16 additions & 0 deletions apps/nextjs/src/app/_components/PageLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
interface PageLayoutProps {
children: React.ReactNode;
title: string;
}

export const PageLayout = ({ title, children }: PageLayoutProps) => {
return (
<div className=" w-full pt-12 sm:pl-32 sm:pt-0">
<div className="container mx-auto px-4">
<h1 className="mb-8">{title}</h1>
<hr className="my-8 border" />
{children}
</div>
</div>
);
};
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/collection/CollectionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default async function CollectionsList() {
];

return (
<div className="grid w-full grid-cols-1 gap-6 ">
<div className="grid w-full grid-cols-1 gap-6 px-4 sm:px-0">
{collections?.map((collection: Collection, index) => {
return <CollectionCard collection={collection} key={index} />;
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ export const AttributesDropdown = ({

return (
<div
className={` ${"hidden"} w-screen overscroll-y-none p-3 sm:block sm:w-24 sm:flex-none sm:overscroll-auto lg:w-72`}
className={` ${"hidden"} w-screen overscroll-y-none pr-6 sm:block sm:w-24 sm:flex-none sm:overscroll-auto lg:w-72`}
>
<div className="sticky top-0 z-[100] overflow-y-auto pt-12">
<ScrollArea className="border bg-dark-green px-2">
<div className="sticky top-10 z-[100]">
<ScrollArea className="h-[600px] border-2 bg-dark-green px-3">
<Button className="sm:hidden" variant={"default"}>
Close
</Button>
{finalAttributes?.map((attribute: any, index: number) => {
return (
<Accordion key={index} type="single" collapsible>
<AccordionItem value="item-1">
<AccordionTrigger className="text-lg">
{attribute.key}
<AccordionTrigger className="bg-primary px-2 text-sm">
{attribute.key} ({attribute.values.length})
</AccordionTrigger>
<AccordionContent>
<div className="pt-1">
Expand All @@ -77,7 +77,7 @@ export const AttributesDropdown = ({
attribute.key == "Resource",
)
}
className="my-1 mr-1"
className="font-body my-1 mr-1"
>
{a.value} ({a.tokenCount})
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default async function L2CollectionSummary({
//const comptatible_games = getGamesByContract(games, collection.id);

return (
<div className="sm:mt-10 sm:flex">
<div className="px-4 sm:mt-10 sm:flex">
<div className="flex-none self-center sm:pr-10">
<Image
src={`/collections/${collectionId}.svg`}
Expand Down
14 changes: 1 addition & 13 deletions apps/nextjs/src/app/collection/[id]/(list)/L2ERC721Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,10 @@ export const L2ERC721Card = ({
/>
)}
{isGrid && (
<span className="absolute bottom-3 right-3 border bg-black px-3 py-1 font-sans text-xs">
<span className="absolute bottom-1 right-1 bg-black px-1 py-1 text-xs">
#{token.token_id}
</span>
)}

{isGrid && (
<div className="absolute left-3 top-3 border bg-black text-xs">
<Button
size={"xs"}
variant={"ghost"}
href={`/user/${token.owner ?? token.minter ?? ""}`}
>
{useStarkDisplayName(token.owner ?? token.minter ?? "")}
</Button>
</div>
)}
</div>
</Link>
</div>
Expand Down
13 changes: 4 additions & 9 deletions apps/nextjs/src/app/collection/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { PageLayout } from "../_components/PageLayout";
import CollectionsList from "./CollectionsList";

export const metadata = {
Expand All @@ -9,15 +10,9 @@ export const metadata = {
export default async function Page() {
return (
<>
<div className=" w-full sm:pl-32 ">
<div className="container mx-auto ">
<h1 className="mb-8">Collections</h1>

<hr className="my-8 border" />

<CollectionsList />
</div>
</div>
<PageLayout title="Collections">
<CollectionsList />
</PageLayout>
</>
);
}
20 changes: 8 additions & 12 deletions apps/nextjs/src/app/games/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { GameCard } from "@/app/games/GameCard";
import type { Game } from "@realms-world/constants";
import { games } from "@realms-world/constants";

import { PageLayout } from "../_components/PageLayout";

export const metadata = {
title: "Games of the Realms",
description:
Expand All @@ -11,18 +13,12 @@ export const metadata = {

export default async function Page() {
return (
<div className="sm:pl-32 ">
<div className="container mx-auto px-8">
<h1>Realms Autonomous World</h1>

<hr className="my-8 border" />

<div className="mt-8 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
{games.map((game: Game, index) => (
<GameCard key={index} game={game} />
))}
</div>
<PageLayout title="Games">
<div className="mt-8 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
{games.map((game: Game, index) => (
<GameCard key={index} game={game} />
))}
</div>
</div>
</PageLayout>
);
}
Binary file modified bun.lockb
Binary file not shown.