Skip to content

Commit fdbda16

Browse files
committed
feat: ukraine badge
1 parent 741a8fa commit fdbda16

File tree

9 files changed

+5583
-7781
lines changed

9 files changed

+5583
-7781
lines changed

.github/workflows/gh-pages.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@master
1717
- uses: actions/setup-node@v2
18-
with:
19-
node-version: '14'
20-
- run: yarn install --frozen-lockfile --non-interactive
18+
- run: yarn install
2119
- run: yarn build
2220

2321
- uses: peaceiris/actions-gh-pages@v3

.vscode/settings.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"typescript.tsdk": "node_modules/typescript/lib",
33
"cSpell.words": [
4-
"Okawari",
4+
"amap",
55
"jinke",
6+
"Okawari",
67
"xstate"
78
]
8-
}
9+
}

gatsby-config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const resolve = (...args) => path.resolve(__dirname, ...args)
99

1010
module.exports = {
1111
flags: {
12-
PRESERVE_WEBPACK_CACHE: true,
12+
FAST_DEV: true,
13+
PARALLEL_SOURCING: true,
14+
PRESERVE_FILE_DOWNLOAD_CACHE: true,
1315
},
1416

1517
siteMetadata: {

package.json

+30-30
Original file line numberDiff line numberDiff line change
@@ -48,44 +48,44 @@
4848
"root": true
4949
},
5050
"dependencies": {
51-
"@loadable/component": "^5.15.0",
52-
"gatsby": "^3.9.1",
53-
"gatsby-image": "^3.9.0",
54-
"gatsby-plugin-google-analytics": "^3.9.0",
55-
"gatsby-plugin-graphql-codegen": "^3.0.0",
56-
"gatsby-plugin-manifest": "^3.9.0",
57-
"gatsby-plugin-offline": "^4.9.0",
58-
"gatsby-plugin-react-helmet": "^4.9.0",
59-
"gatsby-plugin-sharp": "^3.9.0",
60-
"gatsby-plugin-styled-components": "^4.9.0",
61-
"gatsby-plugin-typescript": "^3.9.0",
62-
"gatsby-source-filesystem": "^3.9.0",
63-
"gatsby-transformer-json": "^3.9.0",
64-
"gatsby-transformer-sharp": "^3.9.0",
65-
"prop-types": "^15.7.2",
51+
"@loadable/component": "^5.15.2",
52+
"gatsby": "^4.8.1",
53+
"gatsby-image": "^3.11.0",
54+
"gatsby-plugin-google-analytics": "^4.8.0",
55+
"gatsby-plugin-graphql-codegen": "^3.1.1",
56+
"gatsby-plugin-manifest": "^4.8.1",
57+
"gatsby-plugin-offline": "^5.8.1",
58+
"gatsby-plugin-react-helmet": "^5.8.0",
59+
"gatsby-plugin-sharp": "^4.8.1",
60+
"gatsby-plugin-styled-components": "^5.8.0",
61+
"gatsby-plugin-typescript": "^4.8.1",
62+
"gatsby-source-filesystem": "^4.8.1",
63+
"gatsby-transformer-json": "^4.8.0",
64+
"gatsby-transformer-sharp": "^4.8.0",
65+
"prop-types": "^15.8.1",
6666
"react": "^17.0.2",
6767
"react-dom": "^17.0.2",
6868
"react-helmet": "^6.1.0",
69-
"react-jinke-music-player": "^4.24.1",
70-
"styled-components": "^5.3.0",
69+
"react-jinke-music-player": "^4.24.2",
70+
"styled-components": "^5.3.3",
7171
"styled-reset": "^4.3.4"
7272
},
7373
"devDependencies": {
74-
"@ntnyq/eslint-config-prettier-typescript-react": "^0.1.14",
75-
"@ntnyq/prettier-config": "^0.3.0",
74+
"@ntnyq/eslint-config-prettier-typescript-react": "^0.1.16",
75+
"@ntnyq/prettier-config": "^0.3.1",
7676
"@types/loadable__component": "^5.13.4",
77-
"@types/react": "^17.0.14",
78-
"@types/react-dom": "^17.0.9",
79-
"@types/react-helmet": "^6.1.2",
77+
"@types/react": "^17.0.39",
78+
"@types/react-dom": "^17.0.11",
79+
"@types/react-helmet": "^6.1.5",
8080
"@types/scrollreveal": "^0.0.7",
81-
"@types/styled-components": "^5.1.11",
82-
"dotenv": "^10.0.0",
83-
"eslint": "^7.31.0",
84-
"husky": "^7.0.1",
85-
"lint-staged": "^11.0.1",
86-
"prettier": "^2.3.2",
87-
"sort-package-json": "^1.50.0",
88-
"typescript": "^4.3.5"
81+
"@types/styled-components": "^5.1.23",
82+
"dotenv": "^16.0.0",
83+
"eslint": "^8.10.0",
84+
"husky": "^7.0.4",
85+
"lint-staged": "^12.3.4",
86+
"prettier": "^2.5.1",
87+
"sort-package-json": "^1.54.0",
88+
"typescript": "^4.5.5"
8989
},
9090
"resolution": {
9191
"xstate": "4.9.1"

src/components/AudioPlayer/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ interface Props {
99
options: ReactJkMusicPlayerProps
1010
}
1111

12-
const VideoPlayer: React.FC<Props> = ({ children, options }) => (
12+
const AudioPlayer: React.FC<Props> = ({ children, options }) => (
1313
<ReactJkMusicPlayer {...options}>{children}</ReactJkMusicPlayer>
1414
)
1515

16-
export default VideoPlayer
16+
export default AudioPlayer

src/components/Badge/Ukraine.tsx

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* @see https://github.com/virae/we-stand-with-ukraine
3+
*/
4+
5+
import React from 'react'
6+
import styled from 'styled-components'
7+
8+
interface Props {
9+
title?: string
10+
}
11+
12+
const Badge = styled.div`
13+
position: fixed;
14+
top: 20px;
15+
right: -80px;
16+
z-index: 9999;
17+
width: 300px;
18+
height: 84px;
19+
background: linear-gradient(-180deg, #005bbb 50%, #ffd500 50%);
20+
transform: rotate(45deg);
21+
`
22+
23+
const Ukraine: React.FC<Props> = ({ title = `We stand with Ukraine` }) => (
24+
<Badge title={title} />
25+
)
26+
27+
export default Ukraine

src/components/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ export { default as App } from './App'
22
export { default as Head } from './Head'
33

44
export { default as Hero } from './Hero'
5+
6+
export { default as Ukraine } from './Badge/UKRaine'

src/pages/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import { useStaticQuery, graphql } from 'gatsby'
3-
import { App, Head, Hero } from '../components'
3+
import { App, Head, Hero, Ukraine } from '../components'
44

55
const query = graphql`
66
query {
@@ -26,6 +26,7 @@ const Index: React.FC = () => {
2626
<App>
2727
<Hero />
2828
</App>
29+
<Ukraine />
2930
</React.Fragment>
3031
)
3132
}

0 commit comments

Comments
 (0)