-
Notifications
You must be signed in to change notification settings - Fork 5
Index redesign #1719
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
Index redesign #1719
Changes from 16 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
508243d
wip
simo6529 8392624
wip
simo6529 3ff5988
wip
simo6529 1e5426d
wip
simo6529 027fffe
Merge branch 'main' into index-redesign
simo6529 33b796d
wip
simo6529 283105f
wip
simo6529 165ad92
wip
simo6529 4fc3aa7
wip
simo6529 122da89
wip
simo6529 72197e1
wip
simo6529 a4c9fb5
Merge branch 'main' into index-redesign
simo6529 f227c4f
wip
simo6529 b6860f8
wip
simo6529 6dc7e3c
wip
simo6529 e06c61f
wip
simo6529 829c9dc
wip
simo6529 09e5e49
Merge branch 'main' into index-redesign
simo6529 5958626
wip
simo6529 5e3526e
wip
simo6529 25073bb
wip
simo6529 7d63b9d
wip
simo6529 0ba8171
wip
ragnep cbeadc6
Merge branch 'main' into index-redesign
ragnep d8461db
wip
ragnep ede1f58
Merge branch 'main' into index-redesign
ragnep 8016a0d
wip
ragnep 3dfc5a2
wip
ragnep 38ba440
wip
ragnep f4202fc
wip
ragnep 88fa05c
wip
ragnep 0854974
wip
ragnep b2c7ae6
Merge branch 'main' into index-redesign
ragnep ff8d417
wip
ragnep d8bd5da
wip
ragnep 54aa2c4
wip
simo6529 bdaf3d4
wip
ragnep 1499116
wip
simo6529 09e60c5
wip
simo6529 60a07ed
wip
simo6529 90ccc1f
wip
ragnep 15de448
Merge branch 'index-redesign-2' into index-redesign
simo6529 55f136e
wip
ragnep f6fad7e
Merge branch 'main' into index-redesign
simo6529 42cb7a5
wip
simo6529 0f4bb07
wip
simo6529 009671a
wip
simo6529 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
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,17 @@ | ||
| "use client"; | ||
|
|
||
| import SubmissionCarousel from "./carousel/SubmissionCarousel"; | ||
| import { NowMintingSection } from "./now-minting"; | ||
| import { NextMintLeadingSection } from "./next-mint-leading"; | ||
| import { BoostedSection } from "./boosted"; | ||
|
|
||
| export default function HomePageContent() { | ||
| return ( | ||
| <div className="tw-py-8"> | ||
| <SubmissionCarousel /> | ||
| <NowMintingSection /> | ||
| <NextMintLeadingSection /> | ||
| <BoostedSection /> | ||
| </div> | ||
| ); | ||
| } |
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,77 @@ | ||
| "use client"; | ||
|
|
||
| import { memo } from "react"; | ||
| import BoostIcon from "@/components/common/icons/BoostIcon"; | ||
| import ProfileAvatar, { | ||
| ProfileBadgeSize, | ||
| } from "@/components/common/profile/ProfileAvatar"; | ||
| import DropListItemContentMedia from "@/components/drops/view/item/content/media/DropListItemContentMedia"; | ||
| import type { ApiDrop } from "@/generated/models/ApiDrop"; | ||
|
|
||
| interface BoostedDropCardProps { | ||
| readonly drop: ApiDrop; | ||
| readonly onClick?: () => void; | ||
| } | ||
|
|
||
| const BoostedDropCard = memo(({ drop, onClick }: BoostedDropCardProps) => { | ||
| const media = drop.parts[0]?.media[0]; | ||
| const textContent = drop.parts[0]?.content ?? ""; | ||
| const truncatedContent = | ||
| textContent.length > 120 ? `${textContent.slice(0, 120)}...` : textContent; | ||
|
|
||
| const author = drop.author; | ||
| const waveName = drop.wave.name; | ||
|
|
||
| return ( | ||
| <button | ||
| type="button" | ||
| onClick={onClick} | ||
| className="tw-group tw-relative tw-flex tw-w-60 tw-flex-shrink-0 tw-cursor-pointer tw-flex-col tw-overflow-hidden tw-rounded-xl tw-border tw-border-iron-800 tw-bg-iron-950 tw-p-0 tw-text-left tw-transition-all tw-duration-200 hover:tw-border-iron-700 hover:tw-bg-iron-900" | ||
| > | ||
| {/* Boost badge */} | ||
| <div className="tw-absolute tw-right-2 tw-top-2 tw-z-10 tw-flex tw-items-center tw-gap-1 tw-rounded-lg tw-bg-black/60 tw-px-2 tw-py-1 tw-backdrop-blur-sm"> | ||
| <BoostIcon className="tw-size-3.5 tw-text-amber-500" variant="filled" /> | ||
| <span className="tw-text-xs tw-font-semibold tw-text-amber-400"> | ||
| {drop.boosts} | ||
| </span> | ||
| </div> | ||
|
|
||
| {/* Content area */} | ||
| <div className="tw-aspect-[3/4] tw-w-full tw-overflow-hidden"> | ||
| {media ? ( | ||
| <DropListItemContentMedia | ||
| media_mime_type={media.mime_type} | ||
| media_url={media.url} | ||
| /> | ||
| ) : ( | ||
| <div className="tw-flex tw-size-full tw-items-center tw-justify-center tw-bg-iron-900 tw-p-4"> | ||
| <p className="tw-m-0 tw-line-clamp-6 tw-text-center tw-text-sm tw-leading-relaxed tw-text-iron-300"> | ||
| {truncatedContent || "View drop..."} | ||
| </p> | ||
| </div> | ||
| )} | ||
| </div> | ||
|
|
||
| {/* Footer */} | ||
| <div className="tw-flex tw-flex-col tw-gap-0.5 tw-border-t tw-border-iron-800 tw-bg-iron-950 tw-px-3 tw-py-2.5"> | ||
| <div className="tw-flex tw-items-center tw-gap-2"> | ||
| <ProfileAvatar | ||
| pfpUrl={author.pfp} | ||
| alt={author.handle ?? "User"} | ||
| size={ProfileBadgeSize.SMALL} | ||
| /> | ||
| <span className="tw-truncate tw-text-sm tw-font-medium tw-text-iron-200"> | ||
| {author.handle ?? "Anonymous"} | ||
| </span> | ||
| </div> | ||
| <span className="tw-truncate tw-pl-9 tw-text-xs tw-text-iron-500"> | ||
| {waveName} | ||
| </span> | ||
| </div> | ||
| </button> | ||
| ); | ||
| }); | ||
|
|
||
| BoostedDropCard.displayName = "BoostedDropCard"; | ||
|
|
||
| export default BoostedDropCard; | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.