Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 4606e46

Browse files
committed
Centralized animation 🚀
1 parent 81b686b commit 4606e46

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

graphql-types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ export type DirectoryCtimeArgs = {
258258
export type Site = Node & {
259259
buildTime?: Maybe<Scalars['Date']>;
260260
siteMetadata?: Maybe<SiteSiteMetadata>;
261+
port?: Maybe<Scalars['Int']>;
262+
host?: Maybe<Scalars['String']>;
261263
polyfill?: Maybe<Scalars['Boolean']>;
262264
pathPrefix?: Maybe<Scalars['String']>;
263265
id: Scalars['ID'];
@@ -1009,6 +1011,8 @@ export type QueryAllDirectoryArgs = {
10091011
export type QuerySiteArgs = {
10101012
buildTime?: Maybe<DateQueryOperatorInput>;
10111013
siteMetadata?: Maybe<SiteSiteMetadataFilterInput>;
1014+
port?: Maybe<IntQueryOperatorInput>;
1015+
host?: Maybe<StringQueryOperatorInput>;
10121016
polyfill?: Maybe<BooleanQueryOperatorInput>;
10131017
pathPrefix?: Maybe<StringQueryOperatorInput>;
10141018
id?: Maybe<StringQueryOperatorInput>;
@@ -2183,6 +2187,8 @@ export type SiteFieldsEnum =
21832187
| 'siteMetadata___contacts___links___medium'
21842188
| 'siteMetadata___contacts___links___devto'
21852189
| 'siteMetadata___contacts___links___instagram'
2190+
| 'port'
2191+
| 'host'
21862192
| 'polyfill'
21872193
| 'pathPrefix'
21882194
| 'id'
@@ -2284,6 +2290,8 @@ export type SiteGroupConnection = {
22842290
export type SiteFilterInput = {
22852291
buildTime?: Maybe<DateQueryOperatorInput>;
22862292
siteMetadata?: Maybe<SiteSiteMetadataFilterInput>;
2293+
port?: Maybe<IntQueryOperatorInput>;
2294+
host?: Maybe<StringQueryOperatorInput>;
22872295
polyfill?: Maybe<BooleanQueryOperatorInput>;
22882296
pathPrefix?: Maybe<StringQueryOperatorInput>;
22892297
id?: Maybe<StringQueryOperatorInput>;

src/components/design-system/organism/modal-with-image.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
import styled, { keyframes } from "styled-components";
1+
import styled from "styled-components";
22
import { CallToActionExternal } from "../atoms/call-to-action-external";
33
import * as React from "react";
4-
5-
const opacity = keyframes`
6-
from {
7-
opacity: 0;
8-
}
9-
to {
10-
opacity: 1;
11-
}
12-
`;
4+
import { opacity } from "../../opacity-keyframes";
135

146
const ModalOverlay = styled.div`
157
position: fixed;

src/components/design-system/organism/profile-presentation.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import styled from "styled-components";
77
import { Heading2 } from "../atoms/heading2";
88
import { slugs } from "../../../logic/slug";
99
import { CallToActionInternalWithTracking } from "../../call-to-action-internal-with-tracking";
10+
import { opacity } from "../../opacity-keyframes";
1011

1112
const Author = styled(Heading2)`
1213
color: ${(props) => props.theme.light.textAbovePrimaryColor};
@@ -36,17 +37,8 @@ const ProfileContainer = styled.div`
3637
justify-content: center;
3738
text-align: center;
3839
opacity: 0;
39-
animation: show-profile-introduction 1s linear 0.5s;
40+
animation: ${opacity} 1s linear 0.5s;
4041
animation-fill-mode: forwards;
41-
42-
@keyframes show-profile-introduction {
43-
from {
44-
opacity: 0;
45-
}
46-
to {
47-
opacity: 1;
48-
}
49-
}
5042
`;
5143

5244
const ProfileImageContainer = styled.div`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { keyframes } from "styled-components";
2+
3+
export const opacity = keyframes`
4+
from {
5+
opacity: 0;
6+
}
7+
to {
8+
opacity: 1;
9+
}
10+
`;

0 commit comments

Comments
 (0)