Skip to content

Commit

Permalink
feat: continue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao committed Jun 21, 2024
1 parent 4bf1f7f commit 635547d
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 24 deletions.
338 changes: 338 additions & 0 deletions apps/next/public/cubs-group.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/next/public/ecosystem-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { Card, Flex } from '@gobob/ui';
import Slider from 'react-slick';
import styled, { css } from 'styled-components';
import Image from 'next/image';

import { Banner } from './Banner';
import { OnrampGraphic } from './OnrampGraphic';

function getImageUrl(name: string) {
return new URL(`../../../../assets/${name}`, import.meta.url).href;
}

const StyledCarouselWrapper = styled(Card)`
position: relative;
text-decoration: none;
Expand All @@ -19,19 +16,18 @@ const StyledBannerContent = styled(Flex)`
z-index: 1;
`;

const StyledBannerImg = styled.img`
const StyledBannerImg = styled(Image)`
position: absolute;
right: 0;
top: 0;
height: 100%;
opacity: 0.5;
${({ theme }) => {
return css`
transform: scale(4);
transform: scale(0.9) translate(50%, -50%);
@media ${theme.breakpoints.up('s')} {
transform: scale(6) translateX(-15%);
transform: translate(30%, -50%);
}
`;
}}
Expand Down Expand Up @@ -87,7 +83,8 @@ const StyledSlider = styled(Slider)`
`;

const StyledOnrampBanner = styled(Banner)`
/* background-repeat: no-repeat;
background-image: url('/cubs-group.svg');
background-repeat: no-repeat;
background-size: cover;
${({ theme }) => {
Expand All @@ -98,7 +95,7 @@ const StyledOnrampBanner = styled(Banner)`
background-position: 0% 50%;
}
`;
}} */
}}
`;

const StyledOnrampGraphic = styled(OnrampGraphic)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { OnrampBanner } from './OnrampBanner';
const settings: Settings = {
dots: true,
infinite: true,
autoplay: true,
// autoplay: true,
speed: 500,
autoplaySpeed: 10000,
// autoplaySpeed: 10000,
cssEase: 'linear',
slidesToShow: 1,
slidesToScroll: 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Flex, H1, P } from '@gobob/ui';

import bannerSrc from '../../../../assets/ecosystem-banner.png';

import { StyledBannerImg } from './BannerCarousel.style';
import { Banner } from './Banner';

Expand All @@ -17,7 +15,13 @@ const EcosystemBanner = ({ onPress }: EcosystemBannerProps) => (
</H1>
</Flex>
<P color='grey-200'>Discover the most exciting projects on BOB.</P>
<StyledBannerImg alt='BOB ecosystem banner' src={bannerSrc} />
<StyledBannerImg
height={800}
src='/ecosystem-banner.png'
alt='BOB ecosystem banner'

Check warning on line 21 in apps/next/src/app/bridge/components/BannerCarousel/EcosystemBanner.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Props should be sorted alphabetically
// sizes='(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw'
width={800}
/>
</Banner>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { Flex, H1, P } from '@gobob/ui';
import Image from 'next/image';

// import img from '../../../../assets/cubs-group.png';

import { StyledBannerContent, StyledOnrampBanner, StyledOnrampGraphic } from './BannerCarousel.style';

Expand All @@ -20,12 +17,6 @@ const OnrampBanner = ({ onPress }: OnrampBannerProps) => (
<P color='grey-200'>The fastest and easiest way to bridge BTC to BOB</P>
</StyledBannerContent>
<StyledOnrampGraphic />
<Image
fill
alt='Picture of the author'
sizes='(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw'
src='/assets/cubs-group.png'
/>
</StyledOnrampBanner>
);

Expand Down

0 comments on commit 635547d

Please sign in to comment.