-
-
Notifications
You must be signed in to change notification settings - Fork 6
Add Shop By Category Section and Update Layout #2
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
Draft
steve8708
wants to merge
5
commits into
main
Choose a base branch
from
builder-io/update-1746237723966
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
09fd171
ai: Add Shop By Category Section and Update Layout
builderio-bot 653d476
Builder.io: Update from Visual Editor
builderio-bot 2ad94b4
Update from Builder.io Visual Editor
builderio-bot 94d9c4a
Update from Builder.io Visual Editor
builderio-bot cf16a34
Update from Builder.io Visual Editor
builderio-bot 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export default function SectionContainer({ children }) { | ||
| return <div className="mx-auto max-w-3xl px-4 sm:px-6 xl:max-w-5xl xl:px-0">{children}</div> | ||
| return <div className="mx-auto flex flex-col px-4 sm:px-6 xl:px-0">{children}</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,61 @@ | ||
| import Link from './Link' | ||
| import Image from './Image' | ||
|
|
||
| export default function ShopByCategory() { | ||
| const categories = [ | ||
| { | ||
| name: 'Women', | ||
| image: | ||
| 'https://cdn.builder.io/api/v1/image/assets/77864f6bd1864e1f80adffa8c03ae9d0/a38c5259adc22ec1ed5e60e564e554708e5bbc8f', | ||
| }, | ||
| { | ||
| name: 'Men', | ||
| image: | ||
| 'https://cdn.builder.io/api/v1/image/assets/77864f6bd1864e1f80adffa8c03ae9d0/a38c5259adc22ec1ed5e60e564e554708e5bbc8f', | ||
| }, | ||
| { | ||
| name: 'Accessories', | ||
| image: | ||
| 'https://cdn.builder.io/api/v1/image/assets/77864f6bd1864e1f80adffa8c03ae9d0/a38c5259adc22ec1ed5e60e564e554708e5bbc8f', | ||
| }, | ||
| { | ||
| name: 'Sale', | ||
| image: | ||
| 'https://cdn.builder.io/api/v1/image/assets/77864f6bd1864e1f80adffa8c03ae9d0/a38c5259adc22ec1ed5e60e564e554708e5bbc8f', | ||
| }, | ||
| ] | ||
|
|
||
| return ( | ||
| <div className="mx-auto mt-20 flex max-w-7xl flex-col items-center justify-center text-sm font-semibold text-black"> | ||
| <div className="text-center text-2xl tracking-widest">SHOP BY CATEGORY</div> | ||
|
|
||
| <div className="mt-16 flex flex-wrap items-start justify-start gap-8"> | ||
| {categories.map((category, index) => ( | ||
| <div key={index} className="flex w-[278px] min-w-[240px] flex-col items-center"> | ||
| <img | ||
| src={category.image} | ||
| alt={category.name} | ||
| loading="lazy" | ||
| className="aspect-square w-[278px] rounded-md object-contain" | ||
| srcSet={`${category.image}?placeholderIfAbsent=true&width=100 100w, | ||
| ${category.image}?placeholderIfAbsent=true&width=200 200w, | ||
| ${category.image}?placeholderIfAbsent=true&width=400 400w, | ||
| ${category.image}?placeholderIfAbsent=true&width=800 800w, | ||
| ${category.image}?placeholderIfAbsent=true&width=1200 1200w, | ||
| ${category.image}?placeholderIfAbsent=true&width=1600 1600w, | ||
| ${category.image}?placeholderIfAbsent=true&width=2000 2000w, | ||
| ${category.image}?placeholderIfAbsent=true`} | ||
| /> | ||
| <div className="mt-8">{category.name}</div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
|
|
||
| <div className="mt-16"> | ||
| <Link href="/shop"> | ||
| <button className="bg-black px-5 py-2.5 tracking-widest text-white">SHOP ALL</button> | ||
| </Link> | ||
| </div> | ||
| </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
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.
@builderio-bot make this a reusable component
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.
I will get right to work!