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

feat: landing - adds gitlab to users section #164

Merged
merged 5 commits into from
Nov 22, 2021
Merged
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
45 changes: 36 additions & 9 deletions website/landing/components/Users/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,24 @@ const UserLink = styled("a", {
maxWidth: "75%",
margin: "0 auto",
position: "relative",
opacity: 0,
transitionProperty: "opacity",
transitionTimingFunction: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",

"@bp1": {
maxWidth: "100%",
},

variants: {
visible: {
true: {
opacity: 1,
},
false: {
opacity: 0,
},
},
},
});

export const Users: React.FC = () => {
Expand All @@ -31,8 +45,7 @@ export const Users: React.FC = () => {
// callback, a workaround is to wait until the list is in view
// and then do an opacity transition.
const { ref: listRef, inView } = useInView({
threshold: 1,
triggerOnce: true,
threshold: [0, 1],
});

return (
Expand All @@ -59,8 +72,6 @@ export const Users: React.FC = () => {
flexDirection: "column",
gap: "48px",
justifyContent: "center",
opacity: inView ? 1 : 0,
transition: "opacity .5s cubic-bezier(0.770, 0.000, 0.175, 1.000)",

"@bp1": {
gap: "100px",
Expand All @@ -69,20 +80,36 @@ export const Users: React.FC = () => {
"@bp2": {
flexDirection: "row",
flexFlow: "row wrap",
margin: "0 auto",
width: "75%",
},
}}
>
{content.list.map((u) => {
const { url, height, width } = u.logo;
{content.list.map((user, userIndex) => {
const { url, height, width } = user.logo;

return (
<ListItem key={u.name}>
<ListItem key={user.name}>
<UserLink
href={u.socialUrl}
css={{
transitionDelay: inView
? "0s"
: `calc(0.1s * ${userIndex})`,
transitionDuration: `calc(0.2s * ${
inView ? userIndex : 1
})`,
}}
href={user.socialUrl}
rel="noopener noreferrer"
target="_blank"
visible={inView}
>
<Image alt={u.name} height={height} src={url} width={width} />
<Image
alt={user.name}
height={height}
src={url}
width={width}
/>
</UserLink>
</ListItem>
);
Expand Down
10 changes: 0 additions & 10 deletions website/landing/public/assets/logos/CodeSandbox-minimal.svg

This file was deleted.

6 changes: 6 additions & 0 deletions website/landing/public/assets/logos/GitLab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 27 additions & 18 deletions website/landing/website.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,12 @@
}
},
{
"name": "CodeSandbox",
"socialUrl": "https://codesandbox.io",
"logo": {
"url": "/assets/logos/CodeSandbox-minimal.svg",
"height": 37,
"width": 261
}
},
{
"name": "Amplify",
"socialUrl": "https://ui.docs.amplify.aws/",
"name": "CodeAmigo",
"socialUrl": "https://codeamigo.dev/",
"logo": {
"url": "/assets/logos/Amplify.svg",
"height": 40,
"width": 210
"url": "/assets/logos/CodeAmigo.svg",
"height": 47,
"width": 219
}
},
{
Expand All @@ -174,12 +165,30 @@
}
},
{
"name": "CodeAmigo",
"socialUrl": "https://codeamigo.dev/",
"name": "CodeSandbox",
"socialUrl": "https://codesandbox.io",
"logo": {
"url": "/assets/logos/CodeAmigo.svg",
"url": "/assets/logos/CodeSandbox.svg",
"height": 40,
"width": 245
}
},
{
"name": "GitLab",
"socialUrl": "https://gitlab.com",
"logo": {
"url": "/assets/logos/GitLab.svg",
"height": 47,
"width": 219
"width": 150
}
},
{
"name": "Amplify",
"socialUrl": "https://ui.docs.amplify.aws/",
"logo": {
"url": "/assets/logos/Amplify.svg",
"height": 40,
"width": 210
}
}
]
Expand Down