-
Notifications
You must be signed in to change notification settings - Fork 3
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: partners carousel #6
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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,12 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
:root { | ||
/* These variables are used for the infinite scrolling effect in _components/partners-carousel.tsx */ | ||
--no-of-slides: 6; | ||
--slides-in-view: 4; | ||
--slide-width: 200px; | ||
--slide-height: 56px; | ||
--iteration-time: 15s; | ||
} |
This file contains 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,14 +1,18 @@ | ||
import { Metadata } from "next"; | ||
|
||
import { Hero } from "@/app/_components/hero"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Home | Across Protocol", | ||
description: "Interoperability powered by Intents.", | ||
}; | ||
|
||
export default function Home() { | ||
return ( | ||
<main className="flex min-h-screen flex-col items-center justify-between p-24"> | ||
Home | ||
<main className="z-0 min-h-screen overflow-hidden"> | ||
<Hero> | ||
<div className="py-10 text-center">Home</div> | ||
</Hero> | ||
</main> | ||
); | ||
} |
This file contains 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 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,15 @@ | ||
import { ComponentProps } from "react"; | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
import { PartnersCarousel } from "./partners-carousel"; | ||
|
||
type HeroProps = ComponentProps<"section">; | ||
|
||
export function Hero({ className, children, ...props }: HeroProps) { | ||
return ( | ||
<section className={twMerge("min-h-screen", className)} {...props}> | ||
{children} | ||
<PartnersCarousel /> | ||
</section> | ||
); | ||
} |
This file contains 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 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 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,41 @@ | ||
import { SVGProps } from "react"; | ||
|
||
export function Partner1Icon(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
width="200" | ||
height="56" | ||
viewBox="0 0 200 56" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M79.6133 37.0475H83.7719V29.9185H85.58L89.9969 37.0475H94.4396L89.5578 29.1953C91.7276 28.5495 93.3548 27.0772 93.3548 24.2876V24.1842C93.3548 20.3615 90.591 18.5792 86.2257 18.5792H79.6133V37.0475ZM83.7719 27.0772V21.7821H86.1224C88.1372 21.7821 89.2737 22.4279 89.2737 24.3134V24.4167C89.2737 26.199 88.2147 27.0772 86.1224 27.0772H83.7719Z" | ||
fill="#9DAAB3" | ||
/> | ||
<path | ||
d="M101.579 37.3316C105.273 37.3316 107.597 35.7044 108.036 32.7855H104.498C104.265 33.9221 103.413 34.6712 101.682 34.6712C99.6417 34.6712 98.4277 33.3797 98.3244 31.1325H108.062V30.0993C108.062 25.269 104.963 23.2285 101.476 23.2285C97.5495 23.2285 94.5273 25.9923 94.5273 30.2542V30.4608C94.5273 34.7745 97.4978 37.3316 101.579 37.3316ZM98.376 28.8336C98.6601 26.9222 99.7967 25.8115 101.476 25.8115C103.258 25.8115 104.291 26.793 104.42 28.8336H98.376Z" | ||
fill="#9DAAB3" | ||
/> | ||
<path d="M109.844 37.0475H113.563V17.4168H109.844V37.0475Z" fill="#9DAAB3" /> | ||
<path | ||
d="M120.699 37.3316C122.921 37.3316 124.289 36.2984 124.987 34.9295V37.0475H128.706V23.5385H124.987V31.4682C124.987 33.4572 123.747 34.4387 122.172 34.4387C120.571 34.4387 119.821 33.5604 119.821 31.7265V23.5385H116.102V32.2431C116.102 35.7818 118.065 37.3316 120.699 37.3316Z" | ||
fill="#9DAAB3" | ||
/> | ||
<path | ||
d="M131.246 37.0475H134.992V29.0661C134.992 27.2322 136.154 26.3022 137.6 26.3022C138.918 26.3022 139.719 27.0771 139.719 28.8078V37.0475H143.438V29.0661C143.438 27.2322 144.6 26.3022 146.047 26.3022C147.39 26.3022 148.165 27.0771 148.165 28.8078V37.0475H151.885V28.3945C151.885 24.8041 149.947 23.2285 147.441 23.2285C145.737 23.2285 143.981 23.9517 142.896 25.579C142.25 23.9776 140.907 23.2285 139.125 23.2285C137.109 23.2285 135.663 24.3392 134.992 25.6048V23.5384H131.246V37.0475Z" | ||
fill="#9DAAB3" | ||
/> | ||
<path | ||
d="M160.532 37.3316C164.226 37.3316 166.551 35.7044 166.99 32.7855H163.451C163.218 33.9221 162.366 34.6712 160.635 34.6712C158.595 34.6712 157.381 33.3797 157.278 31.1325H167.016V30.0993C167.016 25.269 163.916 23.2285 160.429 23.2285C156.503 23.2285 153.48 25.9923 153.48 30.2542V30.4608C153.48 34.7745 156.451 37.3316 160.532 37.3316ZM157.33 28.8336C157.614 26.9222 158.751 25.8115 160.429 25.8115C162.211 25.8115 163.245 26.793 163.374 28.8336H157.33Z" | ||
fill="#9DAAB3" | ||
/> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M65.303 19.684L65.0519 19.2356C64.728 18.6932 64.2712 18.2425 63.7246 17.9261L51.6885 10.9843C51.1435 10.6682 50.5249 10.5011 49.8948 10.5H49.3746C48.7445 10.5011 48.1259 10.6682 47.5808 10.9843L35.5449 17.9441C35.0013 18.2584 34.5498 18.7099 34.2354 19.2535L33.9843 19.7019C33.6682 20.2469 33.5011 20.8656 33.5 21.4956V35.3972C33.5011 36.0273 33.6682 36.6459 33.9843 37.1909L34.2354 37.6393C34.5579 38.1766 35.0076 38.6263 35.5449 38.9488L47.5988 45.8905C48.1411 46.2132 48.7616 46.3808 49.3925 46.3748H49.8948C50.5249 46.3737 51.1435 46.2066 51.6885 45.8905L63.7246 38.9309C64.2735 38.6236 64.7267 38.1704 65.0339 37.6214L65.303 37.173C65.6154 36.6264 65.7822 36.0087 65.7873 35.3792V21.4777C65.7863 20.8477 65.6192 20.229 65.303 19.684ZM49.3746 14.0874H49.8948L60.4062 20.1503L49.6437 26.3566L38.8812 20.1503L49.3746 14.0874ZM51.4374 41.8906L61.9308 35.8277L62.1998 35.3793V23.2536L51.4374 29.4779V41.8906Z" | ||
fill="#9DAAB3" | ||
/> | ||
</svg> | ||
); | ||
} |
This file contains 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
james-a-morris marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains 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,62 @@ | ||
import { Partner1Icon } from "./icons"; | ||
|
||
// TODO: Replace with actual partner logos | ||
const partners = [ | ||
{ | ||
name: "Partner 1", | ||
Logo: Partner1Icon, | ||
}, | ||
{ | ||
name: "Partner 2", | ||
Logo: Partner1Icon, | ||
}, | ||
{ | ||
name: "Partner 3", | ||
Logo: Partner1Icon, | ||
}, | ||
{ | ||
name: "Partner 4", | ||
Logo: Partner1Icon, | ||
}, | ||
{ | ||
name: "Partner 5", | ||
Logo: Partner1Icon, | ||
}, | ||
{ | ||
name: "Partner 6", | ||
Logo: Partner1Icon, | ||
}, | ||
]; | ||
|
||
// Duplicate partners to simulate infinite scrolling | ||
james-a-morris marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const partnersToRender = [...partners, ...partners]; | ||
|
||
export function PartnersCarousel() { | ||
return ( | ||
<> | ||
<div className="mb-8 text-center text-xs uppercase lining-nums tabular-nums tracking-wide-4 text-grey-400"> | ||
Integrated Partners | ||
</div> | ||
<div className="w-[calc(2 * var(--no-of-slides))] relative overflow-hidden"> | ||
<div className="container mx-auto"> | ||
<div className="grid"> | ||
<div className="w-[calc(var(--slides-in-view) * var(--slide-width))] flex flex-row overflow-hidden"> | ||
{partnersToRender.map((partner, index) => ( | ||
<div | ||
key={index} | ||
className="flex h-[var(--slide-height)] w-[var(--slide-width)] flex-auto flex-shrink-0 flex-grow-0 animate-scroll flex-col items-center" | ||
> | ||
{/* Note: partner.name only for testing purposes */} | ||
<div>{partner.name}</div> | ||
<partner.Logo className="h-8 w-8" /> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
{/* Fade in/out overlay */} | ||
<div className="absolute bottom-0 left-0 right-0 top-0 h-full w-full overflow-hidden bg-gradient-to-r from-grey-dark via-transparent via-50% to-grey-dark bg-fixed sm:from-10% sm:to-90% xl:from-25% xl:to-75%" /> | ||
</div> | ||
</> | ||
); | ||
} |
This file contains 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
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.
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.
We may want to refer to this as a
Ticker
since aCarousel
is usually reserved for a slide-like componentThere 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.
Hmm, so these are basically slides that move automatically 🤔 But yea I can rename to
Ticker
if you think that fits betterThere 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.
A ticker is a continuously moving group of elements that can repeat after the list is exhausted. The carousel is a moving slideshow of content.
Since we'll have both on this website, it may be helpful to differentiate it before we add the carousel
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.
Ok got it. But where do we have a carousel? Can't seem to find it in figma
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.
On the
Across+
page:The blue bar underneath "Add Liquidity" is a countdown timer before the next slide is shown