-
Notifications
You must be signed in to change notification settings - Fork 16
Batch 22 home page: scoped styling, contrast fixes, and status panel update #44
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
69a8950
feat: redesign home page with batch-centric UI, theming, and typography
usetech-nick e74ed3d
feat: improve Batch 22 home UI and dark mode contrast
usetech-nick 69b99d3
chore: remove unused contract read variables
usetech-nick b378303
refactor(ui): replace custom CSS with Tailwind theme tokens for dark …
usetech-nick 2374797
fix: improve BatchStatus mobile layout and interaction
usetech-nick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { ReactNode } from "react"; | ||
| import Link from "next/link"; | ||
|
|
||
| type ActionCardProps = { | ||
| href: string; | ||
| icon: ReactNode; | ||
| title: string; | ||
| description: string; | ||
| }; | ||
|
|
||
| export function ActionCard({ href, icon, title, description }: ActionCardProps) { | ||
| return ( | ||
| <Link href={href} className="group"> | ||
| <div | ||
| className=" | ||
| flex flex-col items-center justify-center text-center gap-3 | ||
| w-64 h-40 rounded-2xl | ||
| bg-base-200 | ||
| border border-base-300 | ||
| shadow-[0_10px_30px_rgba(0,0,0,0.35)] | ||
| backdrop-blur-sm | ||
| transition-all duration-300 | ||
| hover:-translate-y-1 | ||
| " | ||
| > | ||
| <div className="action-card-icon">{icon}</div> | ||
|
|
||
| <div> | ||
| <h3 className="font-semibold">{title}</h3> | ||
| <p className="text-sm opacity-70">{description}</p> | ||
| </div> | ||
| </div> | ||
| </Link> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { ActionCard } from "./ActionCard"; | ||
| import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; | ||
|
|
||
| export function ActionCards() { | ||
| return ( | ||
| <section className="relative mt-10 flex justify-center gap-24"> | ||
| <ActionCard | ||
| href="/debug" | ||
| icon={<BugAntIcon className="h-8 w-8" />} | ||
| title="Debug Contracts" | ||
| description="Interact with the batch smart contracts" | ||
| /> | ||
| <div className="connector" /> | ||
| <ActionCard | ||
| href="/blockexplorer" | ||
| icon={<MagnifyingGlassIcon className="h-8 w-8" />} | ||
| title="Block Explorer" | ||
| description="Explore local transactions and blocks" | ||
| /> | ||
| </section> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| import Link from "next/link"; | ||
| import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; | ||
|
|
||
| export function BatchStatus() { | ||
| useScaffoldReadContract({ | ||
| contractName: "BatchRegistry", | ||
| functionName: "checkedInCounter", | ||
| }); | ||
|
|
||
| return ( | ||
| <Link href="/builders" className="block w-full max-w-3xl"> | ||
| <section | ||
| className=" | ||
| relative | ||
| rounded-3xl | ||
| bg-base-200 | ||
| border border-base-300 | ||
| px-12 py-10 | ||
| transition-shadow | ||
| hover:shadow-[0_24px_60px_rgba(0,0,0,0.25)] | ||
| " | ||
| > | ||
| {/* Title */} | ||
| <header className="mb-8"> | ||
| <h2 className="text-2xl font-semibold tracking-tight">Batch Status</h2> | ||
| </header> | ||
|
|
||
| {/* Grid */} | ||
| <div className="grid grid-cols-2 gap-y-6 gap-x-12 text-base"> | ||
| <div> | ||
| <div className="text-sm opacity-60">Builders onboarded</div> | ||
| <div className="mt-1 text-2xl font-mono font-semibold">16</div> | ||
| </div> | ||
|
|
||
| <div> | ||
| <div className="text-sm opacity-60">Registry status</div> | ||
| <div className="mt-1 text-lg font-semibold text-success">Active</div> | ||
| </div> | ||
|
|
||
| <div> | ||
| <div className="text-sm opacity-60">Deployment</div> | ||
| <div className="mt-1 font-mono text-lg">Arbitrum</div> | ||
| </div> | ||
|
|
||
| <div> | ||
| <div className="text-sm opacity-60">Current phase</div> | ||
| <div className="mt-1 text-lg font-medium">Actively building</div> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Footer CTA */} | ||
| <footer className="mt-10 flex justify-end"> | ||
| <div className="batch-cta mt-6 text-sm font-medium">View builders →</div> | ||
| </footer> | ||
| </section> | ||
| </Link> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if you've used Tailwind to style, we find it easier to read and style the code by adding pre-built CSS classes directly to the HTML.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback!
That makes sense, I agree using Tailwind utility classes directly keeps styling more readable and easier to maintain. I’ll refactor the home page styling to rely on Tailwind classes instead of custom CSS rules, while keeping everything scoped to the Batch 22 home page.
I’ll push an update shortly.