Marketing improvements 3 (#3175)

* Improve marketing website

* User guide with icons

* Add TOC

* Linter

* Basic GraphQL playground

* Very basic contributors page

* Failed attempt to integrate REST playground

* Yarn

* Begin contributors DB

* Improve contributors page
This commit is contained in:
Félix Malfait
2023-12-29 11:17:32 +01:00
committed by GitHub
parent fa8a04743c
commit c422045ea6
46 changed files with 7589 additions and 687 deletions

View File

@ -1,176 +1,216 @@
'use client'
'use client';
import styled from '@emotion/styled'
import styled from '@emotion/styled';
import { Logo } from './Logo';
import { IBM_Plex_Mono } from 'next/font/google';
import { GithubIcon } from './Icons';
import { useState } from 'react';
import { ExternalArrow } from '@/app/components/ExternalArrow';
const IBMPlexMono = IBM_Plex_Mono({
weight: '500',
subsets: ['latin'],
display: 'swap',
weight: '500',
subsets: ['latin'],
display: 'swap',
});
const Nav = styled.nav`
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
overflow: visible;
padding: 0 12px;
position: relative;
transform-origin: 50% 50% 0px;
border-bottom: 1px solid rgba(20, 20, 20, 0.08);
height: 64px;
width: 100%;
@media(min-width: 810px) {
display: none;
}
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
overflow: visible;
padding: 0 12px;
position: relative;
transform-origin: 50% 50% 0px;
border-bottom: 1px solid rgba(20, 20, 20, 0.08);
height: 64px;
width: 100%;
@media (min-width: 810px) {
display: none;
}
`;
const LinkList = styled.div`
display:flex;
flex-direction: column;
`;
display: flex;
flex-direction: column;
`;
const ListItem = styled.a`
color: rgb(71, 71, 71);
text-decoration: none;
display: flex;
gap: 4px;
align-items: center;
border-radius: 8px;
height: 40px;
padding-left: 16px;
padding-right: 16px;
&:hover {
background-color: #F1F1F1;
}
color: rgb(71, 71, 71);
text-decoration: none;
display: flex;
gap: 4px;
align-items: center;
border-radius: 8px;
height: 40px;
padding-left: 16px;
padding-right: 16px;
&:hover {
background-color: #f1f1f1;
}
`;
const LogoContainer = styled.div`
display: flex;
align-items: center;
gap: 8px;
width:202px;`;
display: flex;
align-items: center;
gap: 8px;
width: 202px;
`;
const LogoAddon = styled.div`
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: 150%;
`;
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: 150%;
`;
const StyledButton = styled.div`
display: flex;
height: 40px;
padding-left: 16px;
padding-right: 16px;
align-items: center;
background-color: #000;
color: #fff;
border-radius: 8px;
font-weight: 500;
border: none;
outline: inherit;
cursor: pointer;
display: flex;
height: 40px;
padding-left: 16px;
padding-right: 16px;
align-items: center;
background-color: #000;
color: #fff;
border-radius: 8px;
font-weight: 500;
border: none;
outline: inherit;
cursor: pointer;
`;
const CallToActionContainer = styled.div`
display: flex;
align-items: center;
gap: 8px;
a {
text-decoration: none;
}
`;
display: flex;
align-items: center;
gap: 8px;
a {
text-decoration: none;
}
`;
const LinkNextToCTA = styled.a`
display: flex;
align-items: center;
color: rgb(71, 71, 71);
padding: 0px 16px 0px 16px;
span {
text-decoration: underline;
}`;
display: flex;
align-items: center;
color: rgb(71, 71, 71);
padding: 0px 16px 0px 16px;
span {
text-decoration: underline;
}
`;
const CallToAction = () => {
return <CallToActionContainer>
<LinkNextToCTA href="https://github.com/twentyhq/twenty">Sign in</LinkNextToCTA>
<a href="#">
<StyledButton>
Get Started
</StyledButton>
</a>
</CallToActionContainer>;
return (
<CallToActionContainer>
<LinkNextToCTA href="https://github.com/twentyhq/twenty">
Sign in
</LinkNextToCTA>
<a href="#">
<StyledButton>Get Started</StyledButton>
</a>
</CallToActionContainer>
);
};
const ExternalArrow = () => {
return <div style={{width:'14px', height:'14px', fill: 'rgb(179, 179, 179)'}}>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" focusable="false" color="rgb(179, 179, 179)"><g color="rgb(179, 179, 179)" ><path d="M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"></path></g></svg>
</div>
}
const HamburgerContainer = styled.div`
height: 44px;
width: 44px;
cursor: pointer;
position: relative;
input {
height: 44px;
width: 44px;
cursor: pointer;
position: relative;
input {
height: 44px;
width: 44px;
opacity: 0;
}`;
opacity: 0;
}
#line1 {
transition: transform 0.5s;
transition-timing-function: ease-in-out;
}
#line2 {
transition: transform 0.5s;
transition-timing-function: ease-in-out;
}
#menu-input:checked ~ #line1 {
transform: rotate(45deg) translate(7px);
}
#menu-input:checked ~ #line2 {
transform: rotate(-45deg) translate(7px);
}
`;
const HamburgerLine1 = styled.div`
height: 2px;
left: calc(50.00000000000002% - 20px / 2);
position: absolute;
top: calc(37.50000000000002% - 2px / 2);
width: 20px;
border-radius: 10px;
background-color: rgb(179, 179, 179);`;
height: 2px;
left: calc(50.00000000000002% - 20px / 2);
position: absolute;
top: calc(37.50000000000002% - 2px / 2);
width: 20px;
border-radius: 10px;
background-color: rgb(179, 179, 179);
`;
const HamburgerLine2 = styled.div`
height: 2px;
left: calc(50.00000000000002% - 20px / 2);
position: absolute;
top: calc(62.50000000000002% - 2px / 2);
width: 20px;
border-radius: 10px;
background-color: rgb(179, 179, 179);`;
height: 2px;
left: calc(50.00000000000002% - 20px / 2);
position: absolute;
top: calc(62.50000000000002% - 2px / 2);
width: 20px;
border-radius: 10px;
background-color: rgb(179, 179, 179);
`;
const NavOpen = styled.div`
display:none;`;
flex-direction: column;
align-items: center;
`;
const MobileMenu = styled.div`
display: flex;
flex-direction: column;
width: 100%;
`;
export const HeaderMobile = () => {
const isTwentyDev = false;
const isTwentyDev = false;
const [menuOpen, setMenuOpen] = useState(false);
return <Nav>
const toggleMenu = () => {
setMenuOpen(!menuOpen);
};
return (
<MobileMenu>
<Nav>
<LogoContainer>
<Logo />
{isTwentyDev && <LogoAddon className={IBMPlexMono.className}>for Developers</LogoAddon>}
<Logo />
{isTwentyDev && (
<LogoAddon className={IBMPlexMono.className}>
for Developers
</LogoAddon>
)}
</LogoContainer>
<HamburgerContainer>
<input type="checkbox" />
<HamburgerLine1 />
<HamburgerLine2 />
<input type="checkbox" id="menu-input" onChange={toggleMenu} />
<HamburgerLine1 id="line1" />
<HamburgerLine2 id="line2" />
</HamburgerContainer>
<NavOpen>
</Nav>
<NavOpen style={{ display: menuOpen ? 'flex' : 'none' }}>
<LinkList>
<ListItem href="/pricing">Pricing</ListItem>
<ListItem href="/story">Story</ListItem>
<ListItem href="https://docs.twenty.com">Docs <ExternalArrow /></ListItem>
<ListItem href="https://github.com/twentyhq/twenty"><GithubIcon color='rgb(71,71,71)' /> 5.7k <ExternalArrow /></ListItem>
<ListItem href="/pricing">Pricing</ListItem>
<ListItem href="/story">Story</ListItem>
<ListItem href="https://docs.twenty.com">
Docs <ExternalArrow />
</ListItem>
<ListItem href="https://github.com/twentyhq/twenty">
<GithubIcon color="rgb(71,71,71)" /> 5.7k <ExternalArrow />
</ListItem>
</LinkList>
<CallToAction />
</NavOpen>
</Nav>;
</NavOpen>
</MobileMenu>
);
};