Skip to content

Commit

Permalink
feat: improve page design
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Jun 23, 2024
1 parent 2720064 commit caa3620
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 28 deletions.
5 changes: 3 additions & 2 deletions client/components/btn/Btn.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
font-weight: bold;
color: #fff;
letter-spacing: 0.1em;
background: blue;
background: #7af;
border: none;
border-radius: 6px;
transition: transform 0.2s;
transition: 0.2s;
}

.small {
Expand All @@ -26,6 +26,7 @@
}

.enabled:hover {
background: #44f;
transform: scale(1.05);
}

Expand Down
12 changes: 10 additions & 2 deletions client/layouts/basicHeader/BasicHeader.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
.appName {
font-size: 24px;
font-weight: bold;
letter-spacing: 0.2em;
color: var(--font-color-default);
letter-spacing: 0.18em;
}

@media screen and (width <= 800px) {
.appName {
font-size: 16px;
}
}

.userBtn {
Expand All @@ -27,12 +34,13 @@
align-items: center;
padding: 6px 12px;
margin-left: auto;
text-transform: uppercase;
cursor: pointer;
border: 1px solid var(--border-color-default);
border-radius: 6px;
transition: 0.2s;
}

.userBtn:hover {
background: #eee;
background: #f0f0f0;
}
4 changes: 2 additions & 2 deletions client/layouts/basicHeader/BasicHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const BasicHeader = (props: { user: UserEntity }) => {
const { setConfirm } = useConfirm();
const onClick = async () => {
const confirmed = await setConfirm(
`ユーザー名: ${props.user.signInName}\nメールアドレス: ${props.user.email}\n\nサインアウトしてよろしいですか?`,
`ユーザー名: ${props.user.signInName}\nメールアドレス: ${props.user.email}\n\nサインアウトしますか?`,
);

if (confirmed) await signOut();
Expand All @@ -20,7 +20,7 @@ export const BasicHeader = (props: { user: UserEntity }) => {
<div className={styles.main}>
<span className={styles.appName}>{APP_NAME}</span>
<div className={styles.userBtn} onClick={onClick}>
<HumanIcon size={18} fill="#555" />
<HumanIcon size={18} fill="#336" />
{props.user.signInName}
</div>
</div>
Expand Down
39 changes: 21 additions & 18 deletions client/pages/login/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,40 @@
left: 0;
width: 100%;
height: 100%;
overflow: auto;
}

.main {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
backdrop-filter: blur(4px);
min-height: 100%;
}

.title {
font-size: 80px;
font-weight: bold;
text-shadow: 1px 1px white;
font-size: 64px;
color: #fff;
letter-spacing: 0.18em;
}

.btn {
display: flex;
gap: 8px;
align-items: center;
padding: 8px 12px;
@media screen and (width <= 800px) {
.title {
font-size: 32px;
text-align: center;
}
}

.credit {
position: fixed;
bottom: 10px;
left: 0;
width: 100%;
font-size: 14px;
font-weight: bold;
color: white;
cursor: pointer;
background: #222;
border-radius: 4px;
transition: 0.2s background;
color: #fff;
text-align: center;
}

.btn:hover {
background: #444;
.link:hover {
text-decoration: underline;
}
16 changes: 13 additions & 3 deletions client/pages/login/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const Login = () => {
return (
<div
className={styles.container}
style={{ background: `center/cover url('${staticPath.images.odaiba_jpg}')` }}
style={{ background: `center/cover url('${staticPath.images.bg_jpg}')` }}
>
{user.inited && user.data === null ? (
<div className={styles.main}>
<div className={styles.title}>{APP_NAME}</div>
<Spacer axis="y" size={24} />
<Spacer axis="y" size={36} />
<Authenticator
signUpAttributes={['email']}
services={{
Expand All @@ -40,11 +40,21 @@ const Login = () => {
}),
}}
/>
<Spacer axis="y" size={40} />
<Spacer axis="y" size={60} />
</div>
) : (
<Loading visible />
)}
<div className={styles.credit}>
<a
className={styles.link}
href="https://www.freepik.com/free-vector/gradient-blue-background_23985231.htm"
target="_brank"
title="Freepik | Create great designs, faster"
>
Image by freepik
</a>
</div>
</div>
);
};
Expand Down
Binary file added client/public/images/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed client/public/images/odaiba.jpg
Binary file not shown.
5 changes: 5 additions & 0 deletions client/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ a {
margin: 0;
}

:root {
--border-color-default: #eee;
--font-color-default: #336;
}

::-webkit-scrollbar {
width: 8px;
}
Expand Down
2 changes: 1 addition & 1 deletion server/api/@constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const APP_NAME = 'Next frourio starter';
export const APP_NAME = 'NEXT FROURIO STARTER';

export const BRANDED_ID_NAMES = ['user', 'task'] as const;

0 comments on commit caa3620

Please sign in to comment.