Update oss friends (#5108)

Modified OSS friends to fit figma (fonts, colors, margins etc. ) and
made it responsive.

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
Ady Beraud
2024-04-24 09:03:15 +03:00
committed by GitHub
parent fafa56411c
commit dc82ff56b8
5 changed files with 53 additions and 20 deletions

View File

@ -25,6 +25,10 @@ const BackgroundImage = styled.div`
top: 100px; top: 100px;
height: 100%; height: 100%;
} }
@media (max-width: 800px) {
display: none;
}
`; `;
const Container = styled.div` const Container = styled.div`

View File

@ -3,6 +3,8 @@
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { Gabarito } from 'next/font/google'; import { Gabarito } from 'next/font/google';
import { Theme } from '@/app/_components/ui/theme/theme';
export interface OssData { export interface OssData {
name: string; name: string;
description: string; description: string;
@ -22,7 +24,7 @@ const Container = styled.div`
border-radius: 8px; border-radius: 8px;
cursor: pointer; cursor: pointer;
transition: 200ms; transition: 200ms;
max-width: 400px;
&:hover { &:hover {
-webkit-box-shadow: -3px 3px 2px 0px rgba(0, 0, 0, 1); -webkit-box-shadow: -3px 3px 2px 0px rgba(0, 0, 0, 1);
-moz-box-shadow: -3px 3px 2px 0px rgba(0, 0, 0, 1); -moz-box-shadow: -3px 3px 2px 0px rgba(0, 0, 0, 1);
@ -31,24 +33,36 @@ const Container = styled.div`
@media (max-width: 1200px) { @media (max-width: 1200px) {
width: 45%; width: 45%;
min-width: 350px;
} }
@media (max-width: 810px) { @media (max-width: 810px) {
width: 95%; width: 100%;
} }
`; `;
const StyledContent = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
align-content: flex-start;
`;
const Title = styled.p` const Title = styled.p`
font-size: 32px; font-size: 32px;
font-weight: 500; font-weight: 700;
color: black; color: ${Theme.text.color.secondary};
margin: 16px 0px;
@media (max-width: 1200px) {
font-size: 24px;
}
`; `;
const Description = styled.p` const Description = styled.p`
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: #b3b3b3; color: #b3b3b3;
line-height: ${Theme.text.lineHeight.lg};
margin: 0;
`; `;
const Button = styled.a` const Button = styled.a`
@ -65,6 +79,10 @@ const Button = styled.a`
position: relative; position: relative;
height: 60px; height: 60px;
@media (max-width: 800px) {
font-size: 18px;
}
&:after { &:after {
content: 'Visit Website'; content: 'Visit Website';
border: 2px solid black; border: 2px solid black;
@ -94,9 +112,9 @@ const gabarito = Gabarito({
}); });
const Icon = styled.img` const Icon = styled.img`
position: absolute;
height: 24px; height: 24px;
width: 24px; width: 24px;
border-radius: 4px;
`; `;
// remove the protocol from the url // remove the protocol from the url
@ -105,11 +123,11 @@ const removeProtocol = (url: string) => url.replace(/(^\w+:|^)\/\//, '');
export const Card = ({ data }: { data: OssData }) => { export const Card = ({ data }: { data: OssData }) => {
return ( return (
<Container> <Container>
<div> <StyledContent>
<Icon src={`https://favicon.twenty.com/${removeProtocol(data.href)}`} /> <Icon src={`https://favicon.twenty.com/${removeProtocol(data.href)}`} />
<Title>{data.name}</Title> <Title>{data.name}</Title>
<Description>{data.description}</Description> <Description>{data.description}</Description>
</div> </StyledContent>
<Button href={data.href} className={gabarito.className}></Button> <Button href={data.href} className={gabarito.className}></Button>
</Container> </Container>

View File

@ -9,6 +9,13 @@ const Container = styled.div`
justify-content: center; justify-content: center;
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
width: 95%;
margin-bottom: 24px;
@media (max-width: 800px) {
width: 100%;
margin: 0;
justify-content: center;
}
`; `;
export const CardContainer = ({ children }: { children?: React.ReactNode }) => { export const CardContainer = ({ children }: { children?: React.ReactNode }) => {

View File

@ -7,11 +7,10 @@ const Container = styled.div`
text-align: center; text-align: center;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
gap: 64px;
gap: 26px;
@media (max-width: 809px) { @media (max-width: 809px) {
width: 100%; width: 100%;
padding: 0px 12px 40px 12px; padding: 0px 20px 40px 20px;
} }
`; `;

View File

@ -2,15 +2,17 @@
import styled from '@emotion/styled'; import styled from '@emotion/styled';
const Title = styled.h2` import { Theme } from '@/app/_components/ui/theme/theme';
const Title = styled.h1`
font-size: 56px; font-size: 56px;
font-weight: 600; font-weight: 700;
color: #b3b3b3; color: #b3b3b3;
margin-bottom: 0px; margin-bottom: 24px;
margin-top: 64px; margin-top: 64px;
@media (max-width: 810px) { @media (max-width: 1200px) {
font-size: 28px; font-size: 32px;
} }
`; `;
@ -20,6 +22,9 @@ const Description = styled.h2`
margin-top: 0px; margin-top: 0px;
margin-bottom: 36px; margin-bottom: 36px;
font-weight: 400; font-weight: 400;
line-height: ${Theme.text.lineHeight.lg};
margin: 0 auto;
max-width: 600px;
@media (max-width: 810px) { @media (max-width: 810px) {
font-size: 18px; font-size: 18px;
} }
@ -27,15 +32,15 @@ const Description = styled.h2`
export const Header = () => { export const Header = () => {
return ( return (
<> <div>
<Title> <Title>
Open-source <br /> <span style={{ color: 'black' }}>friends</span> Open-source <br /> <span style={{ color: 'black' }}>friends</span>
</Title> </Title>
<Description> <Description>
We are proud to collaborate with a diverse group of partners to <br /> We are proud to collaborate with a diverse group of partners to promote
promote open-source software. open-source software.
</Description> </Description>
</> </div>
); );
}; };