Skip to content
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

refactor: replace bootstrap layout components #197

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/src/components/Card/SimpleCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const SimpleCard = ({
children,
ariaLabel,
bgDark,
className,
}) => {
return (
<BaseCard
Expand All @@ -42,7 +43,7 @@ export const SimpleCard = ({
title={title}
centerContent={false}
bgDark={bgDark}
className="tw-max-w-lg"
className={className}
>
{children && (
<Typography.ParagraphSmall>{children}</Typography.ParagraphSmall>
Expand Down
34 changes: 12 additions & 22 deletions client/src/components/Carousel/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react'
import Image from 'next/image'
import { useNextSanityImage } from 'next-sanity-image'
import styled from 'styled-components'
import { Container, Row, Col } from 'react-bootstrap'
import Gravatar from 'react-gravatar'
import Slider from 'react-slick'
import { rgba } from 'polished'
Expand All @@ -11,6 +10,7 @@ import sanityClient from '../../utils/sanity-client'
import { buildInternalUrl } from '../../utils/helpers'
import { Box, Typography } from '../../components/Core'
import { device, breakpoints } from '../../utils'
import { Container } from '../Layout'

const SliderStyled = styled(Slider)`
position: relative;
Expand Down Expand Up @@ -306,27 +306,17 @@ export const Carousel = ({ content, coworker = false }) => {
},
}
return (
<Container
data-aos="fade-zoom-in"
data-aos-easing="ease-in-back"
data-aos-duration="500"
data-aos-offset="0"
data-aos-once="true"
>
<Row className="justify-content-center">
<Col lg="12" xl="11">
<SliderStyled {...slickSettings} activeSlide={activeSlide}>
{content.map((person, i) => {
const active = activeSlide === i
return coworker ? (
<Coworker item={person} key={i} active={active} />
) : (
<Client item={person} key={i} active={active} />
)
})}
</SliderStyled>
</Col>
</Row>
<Container>
<SliderStyled {...slickSettings} activeSlide={activeSlide}>
{content.map((person, i) => {
const active = activeSlide === i
return coworker ? (
<Coworker item={person} key={i} active={active} />
) : (
<Client item={person} key={i} active={active} />
)
})}
</SliderStyled>
</Container>
)
}
10 changes: 3 additions & 7 deletions client/src/components/ContentCard/ContentCard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import clsx from 'clsx'
import React from 'react'
import { Col } from 'react-bootstrap'
import styled from 'styled-components'
import clsx from 'clsx'

import { Box, Typography } from '../Core'

Expand All @@ -16,10 +15,7 @@ const StyledBox = styled(Box)`
`

export const ContentCard = ({ dark = false, className, title, ...rest }) => (
<Col
lg="4"
md="6"
className="mb-4"
<div
data-aos="fade-zoom-in"
data-aos-easing="ease-in-back"
data-aos-delay="50"
Expand All @@ -38,5 +34,5 @@ export const ContentCard = ({ dark = false, className, title, ...rest }) => (
{title}
</Typography.H3>
</StyledBox>
</Col>
</div>
)
Loading