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

ログインページ見た目実装 #74

Merged
merged 6 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0" />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:[email protected]&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
Expand Down
5 changes: 5 additions & 0 deletions src/assets/service_icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/service_icons/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/service_icons/traq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 56 additions & 4 deletions src/views/LoginView.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,61 @@
<script setup lang="ts"></script>
<script setup lang="ts">
import BorderedButton from '@/components/Controls/BorderedButton.vue'
import PrimaryButton from '@/components/Controls/PrimaryButton.vue'
</script>

<template>
<div>
<h1>Login</h1>
<div
style="height: calc(100vh - 56px)"
class="flex items-center justify-center bg-background-secondary"
>
<div class="w-200 rounded-2xl bg-background-primary px-14 py-10">
<h1 class="mb-5 h-9 font-primary text-28px font-medium text-[#1E1E1E]">ログイン</h1>
<div class="flex h-44 items-start">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

詳しくは36行目への指摘を見てほしいのですが、family・size・weightに関しては.fontstyle-ui-titleを使用していただけると簡潔だと思います。

Suggested change
<h1 class="mb-5 h-9 font-primary text-28px font-medium text-[#1E1E1E]">ログイン</h1>
<h1 class="mb-5 fontstyle-ui-title text-[#1E1E1E]">ログイン</h1>

(なお、このような文字のスタイル名(fontstyle-hoge-fuga)は、Figma上でテキストをクリックすると楽に確認できます!)

<div class="flex w-82 flex-col p-2.5">
<button class="service_button">
<img src="@/assets/service_icons/github.svg" class="mr-2.5 h-5" />
<p class="service_text">GitHub でログイン</p>
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p class="service_text">GitHub でログイン</p>
<span class="service_text">GitHub でログイン</span>

ここは<button>タグ内なので、<p>ではなく<span>などの記述コンテンツとなるタグにしたほうが良い気がします。(Google, traQログインの部分も同様です)

<button class="service_button">
<img src="@/assets/service_icons/google.svg" class="mr-2.5 h-5" />
<p class="service_text">Google でログイン</p>
</button>
<button class="service_button">
<img src="@/assets/service_icons/traq.svg" class="mr-2.5 h-5" />
<p class="service_text">traQ でログイン</p>
</button>
</div>
<div class="mx-4 h-full border-r border-border-secondary"></div>
<div class="flex w-82 flex-col p-2.5">
<input placeholder="メールアドレス" class="input" />
<input placeholder="パスワード" class="input" />
<div class="mb-3 flex h-10">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここに関して、<EmailTextbox><PasswordTextbox>コンポーネントを使ったほうがよいと思うのですが、これらのコンポーネントはFigmaに提示されているデザインとスタイルが異なりますね... (border-radiusなどがわかりやすい)
@YuHima03 現在FigmaにあるLoginページのデザインを使うか、Textboxコンポーネントのスタイルにするか、どちらが良いでしょうか?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZOI-dayo @kitsne241

コンポーネントの方使ってください 🙏

コンポーネント使うとあとから弄れて非常に楽になりますし、今置いてる画面デザインは暫定のものなので……

<PrimaryButton class="mr-3 h-full w-37 rounded-lg" text="ログイン" />
<BorderedButton class="h-full w-37 rounded-lg" text="新規登録" />
</div>
<router-link to="" class="h-4 text-12px font-normal text-[#3A3A3A] underline">
パスワードを忘れた場合</router-link
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここの文字のスタイルは、

  • family・size・weightについてはclass="fontstyle-ui-caption" (FigmaのDocumentページを参照してほしいです)
  • 色の指定としてclass="text-[#3A3A3A]"
  • 下線としてclass="underline"

を使用すると簡潔だと思います。

また、.fontstyle-ui-captionはsrc/assets/main.css内で定義しているのですが、2つ定義されてしまっています... 変更のついでに下にある方を.fontstyle-ui-caption-strongに改名していただけるとありがたいです。すみません。

@YuHima03 text-primary (#2A2A2A) やtext-secondary (#6A6A6A) に揃えてしまっても良いかと思いますが、どうでしょうか? デザインがまだ確定しきっていないなら一旦このままにしても良いとは思います

>
</div>
</div>
</div>
</div>
</template>

<style scoped></style>
<style scoped>
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
.service_button {
@apply mb-3 flex h-10 w-full items-center justify-center rounded-lg border border-border-secondary;
}
.service_text {
@apply font-primary text-14px font-medium text-[#3A3A3A];
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

36行目への指摘と同様に、family・size・weightに関しては.fontstyle-ui-control-strongを使用していただけると簡潔だと思います。

Suggested change
@apply font-primary text-14px font-medium text-[#3A3A3A];
@apply fontstyle-ui-control-strong text-[#3A3A3A];

.input {
@apply mb-3 flex h-8 w-full items-center justify-center rounded-sm border border-border-secondary pl-3;
}
}
</style>
33 changes: 22 additions & 11 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,33 @@ export default {
'text-tertiary': '#9a9a9a',
'text-inv-primary': '#f0f0f0',
'status-error': '#e02a2a',
'red': '#ff0000',
'white': '#ffffff',
red: '#ff0000',
white: '#ffffff'
},
fontFamily: {
primary: ['Open Sans', 'Noto Sans JP', 'sans-serif']
primary: ['Noto Sans JP', 'Open Sans', 'sans-serif']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loginページのデザインでは英語・日本語をすべてNoto Sans JPで描画するようになっているのですが、英字はOpen Sans、日本語はNoto Sans、と分けたいので、(LoginページのFigmaとはズレてしまうのですが)ここの変更は戻してほしいです...!

},
extend: {
spacing: {
'1.625': '0.40625rem',
'1.75': '0.4375rem',
'4.5': '1.125rem',
'7.5': '1.875rem',
'11.5': '2.875rem',
'27': '6.75rem',
'50': '12.5rem',
'62.5': '15.625rem'
1.625: '0.40625rem',
1.75: '0.4375rem',
4.5: '1.125rem',
7.5: '1.875rem',
11.5: '2.875rem',
27: '6.75rem',
37: '9.25rem',
50: '12.5rem',
58: '14.5rem',
62.5: '15.625rem',
82: '20.5rem',
78: '19.5rem',
172: '43rem',
200: '50rem'
},
fontSize: {
'12px': '12px',
'14px': '14px',
'28px': '28px'
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他のコメントの変更でpx単位は不要になっていると思うので、ここは消してもらって大丈夫なはずです!

}
},
Expand Down
Loading