Skip to content

Commit a5c999f

Browse files
committed
siginページの背景変更
1 parent f45e7ea commit a5c999f

File tree

3 files changed

+48
-47
lines changed

3 files changed

+48
-47
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
1010
"preview": "vite preview",
11-
"test": "jest"
11+
"test": "jest --detectOpenHandles"
1212
},
1313
"dependencies": {
1414
"@chakra-ui/react": "^2.8.2",

Diff for: src/components/Contributors.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ export const Contributors = () => {
357357
mb="5px"
358358
fontStyle="italic"
359359
>
360-
ここでは試験や課題の過去問を登録し閲覧できます
360+
ここでは試験や課題の過去問を登録したり閲覧できます
361361
</Text>
362362

363363
<Button

Diff for: src/components/SignIn.tsx

+46-45
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import {
2-
Box,
32
Button,
43
Card,
54
CardBody,
65
CardHeader,
7-
Center,
86
Divider,
97
Heading,
108
Stack,
119
Text,
10+
Box,
1211
} from "@chakra-ui/react";
1312
import {
1413
GoogleAuthProvider,
@@ -22,7 +21,6 @@ import { FaGithub } from "react-icons/fa";
2221
import { FaDoorOpen } from "react-icons/fa6";
2322
import { useNavigate } from "react-router-dom";
2423

25-
2624
export const SignIn = () => {
2725
const { auth } = firebaseServices;
2826
const navigate = useNavigate();
@@ -35,6 +33,7 @@ export const SignIn = () => {
3533
return result;
3634
});
3735
};
36+
3837
const signInWithGithub = (): Promise<UserCredential> => {
3938
const provider = new GithubAuthProvider();
4039
return signInWithPopup(auth, provider).then((result) => {
@@ -44,48 +43,50 @@ export const SignIn = () => {
4443
});
4544
};
4645

47-
4846
return (
49-
<>
50-
<Center h="100vh" position="relative" overflow="hidden">
51-
<Box
52-
position="absolute"
53-
top="0"
54-
left="0"
55-
right="0"
56-
bottom="0"
57-
bgImage={`url(https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3279945/533e08f0-f2da-d547-bfcc-276c3123c0ec.jpeg)`}
58-
bgSize="cover"
59-
bgPosition="center"
60-
filter="brightness(70%)"
61-
zIndex="-1"
62-
/>
63-
<Card p="10" mb="20px" maxW="lg" boxShadow="lg">
64-
<CardHeader>
65-
<Stack align="center">
66-
<FaDoorOpen size="30px" />
67-
68-
<Heading size="lg" data-testid="auth-page-title">Sign in</Heading>
69-
<Text mt="4" textAlign="center" fontSize="sm">
70-
Please sign in with your Google or GitHub account!
71-
</Text>
72-
</Stack>
73-
</CardHeader>
74-
<Divider borderColor="gray.400"/>
75-
<CardBody>
76-
<Stack>
77-
<Button onClick={signInWithGoogle} fontSize="20px" p="25px">
78-
<FcGoogle size="30px" style={{ marginRight: "8px" }} />
79-
Googleでログイン
80-
</Button>
81-
<Button onClick={signInWithGithub} fontSize="20px" p="25px">
82-
<FaGithub size="30px" style={{ marginRight: "8px" }} />
83-
Githubでログイン
84-
</Button>
85-
</Stack>
86-
</CardBody>
87-
</Card>
88-
</Center>
89-
</>
47+
<Box
48+
h="100vh"
49+
bgGradient="linear(to-r, blackAlpha.500, blue.500,cyan.400)"
50+
display="flex"
51+
alignItems="center"
52+
justifyContent="center"
53+
>
54+
<Card p="10" mb="20px" maxW="lg" boxShadow="xl" bgColor="gray.50" borderRadius="30px">
55+
<CardHeader>
56+
<Stack align="center">
57+
<FaDoorOpen size="30px" />
58+
<Heading size="lg" data-testid="auth-page-title">
59+
Sign in
60+
</Heading>
61+
<Text mt="4" textAlign="center" fontSize="sm">
62+
Please sign in with your Google or GitHub account!
63+
</Text>
64+
</Stack>
65+
</CardHeader>
66+
<Divider borderColor="gray.400" />
67+
<CardBody>
68+
<Stack>
69+
<Button
70+
onClick={signInWithGoogle}
71+
fontSize="20px"
72+
p="25px"
73+
border="1px"
74+
>
75+
<FcGoogle size="30px" style={{ marginRight: "8px" }} />
76+
Googleでログイン
77+
</Button>
78+
<Button
79+
onClick={signInWithGithub}
80+
fontSize="20px"
81+
p="25px"
82+
border="1px"
83+
>
84+
<FaGithub size="30px" style={{ marginRight: "8px" }} />
85+
Githubでログイン
86+
</Button>
87+
</Stack>
88+
</CardBody>
89+
</Card>
90+
</Box>
9091
);
9192
};

0 commit comments

Comments
 (0)