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

Feature/dotorit 25 login screen #3

Merged
merged 3 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package com.mentoapp.dotorit.presentation.login

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.mentoapp.dotorit.R
import com.mentoapp.dotorit.domain.entity.LoginType
import com.mentoapp.dotorit.presentation.login.component.LoginButton
import com.mentoapp.dotorit.presentation.ui.theme.DotoritTheme
import com.mentoapp.dotorit.presentation.ui.theme.Neutral500
import com.mentoapp.dotorit.presentation.ui.theme.Neutral600
import com.mentoapp.dotorit.presentation.ui.theme.Neutral800
import com.mentoapp.dotorit.presentation.ui.theme.Orange60
import com.mentoapp.dotorit.presentation.ui.theme.dotoritTypography

@Composable
fun LoginScreen(modifier: Modifier = Modifier) {
Column(
modifier = modifier
.fillMaxSize()
.background(Orange60)
.padding(horizontal = 24.dp),
verticalArrangement = Arrangement.SpaceAround
) {
LoginScreenTitle(
modifier = Modifier
.weight(1f)
)
Spacer(
modifier = Modifier
.weight(1f)
)
LoginButtons()
Text(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 34.dp),
text = stringResource(R.string.login_service_info),
style = dotoritTypography().bodyMedium1,
color = Neutral500,
textAlign = TextAlign.Center
)
}
}

@Composable
fun LoginScreenTitle(modifier: Modifier = Modifier) {
Column(
modifier = modifier
.fillMaxSize(),
verticalArrangement = Arrangement.Bottom
) {
Image(
modifier = Modifier
.padding(bottom = 24.dp),
painter = painterResource(R.drawable.img_logo),
contentDescription = "logo"
)
Text(
modifier = Modifier
.padding(bottom = 12.dp),
text = stringResource(R.string.login_title),
style = dotoritTypography().headlineBold1,
color = Neutral800
)
Text(
text = stringResource(R.string.login_subtitle),
style = dotoritTypography().bodyMedium1,
color = Neutral600
)
}
}

@Composable
fun LoginButtons() {
Column(
verticalArrangement = Arrangement.spacedBy(10.dp)
) {
LoginButton(LoginType.NAVER)
LoginButton(LoginType.KAKAO)
}
}

@Preview(
showBackground = true
)
@Composable
private fun LoginScreenPreview() {
DotoritTheme {
LoginScreen()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mentoapp.dotorit.presentation.ui.component
package com.mentoapp.dotorit.presentation.login.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
Expand Down
40 changes: 40 additions & 0 deletions app/src/main/res/drawable/ic_dotorit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="92dp"
android:height="24dp"
android:viewportWidth="92"
android:viewportHeight="24">
<path
android:pathData="M86.177,14.307V1.331H90.939V14.307H86.177ZM71.296,9.069V6.45H78.82C78.963,6.093 79.01,5.736 79.01,5.379H71.296V1.807H83.843V4.045C83.843,5.14 83.677,5.974 83.415,6.45H83.891V9.069H76.296C76.201,9.236 76.153,9.426 76.153,9.617C76.153,10.212 77.177,10.426 79.558,10.426C81.153,10.426 82.772,10.283 84.391,9.998L84.939,13.402C83.772,13.712 81.772,13.998 78.939,13.998C73.51,13.998 71.391,12.688 71.391,10.736C71.391,9.974 71.582,9.402 71.82,9.069H71.296ZM71.986,22.331V17.95C77.343,17.926 78.939,17.021 78.939,15.45V14.521H83.939V15.141C83.939,15.593 83.891,16.045 83.82,16.474C84.939,17.164 88.558,17.736 91.796,17.902L91.177,22.236C86.391,21.902 83.677,21.212 81.463,20.021C79.582,21.378 76.534,22.212 71.986,22.331Z"
android:fillColor="#FF6A00"/>
<path
android:pathData="M48.569,22.331V18.283H56.546V15.402C51.307,14.831 49.284,12.712 49.284,9.164C49.284,8.093 49.593,6.664 49.879,5.855H49.284V1.807H68.331V5.855H54.403C54.307,6.164 54.212,6.593 54.141,7.045H68.093V10.259H54.45C55.117,11.426 56.712,11.855 60.093,11.855C62.879,11.855 65.736,11.617 68.331,11.188V14.855C66.331,15.236 63.831,15.45 61.307,15.521V18.283H69.284V22.331H48.569Z"
android:fillColor="#FF6A00"/>
<path
android:pathData="M26.2,22.331V18.283H34.176V14.545H38.938V18.283H46.915V22.331H26.2ZM26.914,8.688C26.914,7.783 27.2,6.569 27.51,5.855H26.914V1.807H45.962V5.855H32.01C31.843,6.307 31.676,7.093 31.676,7.712C31.676,9.379 32.795,9.95 37.724,9.95C40.51,9.95 43.367,9.712 45.962,9.26V13.188C43.51,13.641 40.295,13.879 37.248,13.879C29.7,13.879 26.914,12.069 26.914,8.688Z"
android:fillColor="#FF6A00"/>
<path
android:pathData="M7.892,1L15.276,1A6.892,6.892 0,0 1,22.168 7.892L22.168,15.276A6.892,6.892 0,0 1,15.276 22.168L7.892,22.168A6.892,6.892 0,0 1,1 15.276L1,7.892A6.892,6.892 0,0 1,7.892 1z"
android:fillColor="#FF6A00"/>
<path
android:pathData="M5.939,9.541C5.939,9.142 5.939,8.943 5.958,8.775C6.116,7.381 7.217,6.281 8.613,6.124C8.781,6.105 8.981,6.105 9.38,6.105H13.788C14.188,6.105 14.387,6.105 14.555,6.124C15.951,6.281 17.053,7.381 17.21,8.775C17.229,8.943 17.229,9.142 17.229,9.541C17.229,9.701 17.229,9.78 17.221,9.848C17.158,10.405 16.718,10.845 16.16,10.908C16.092,10.915 16.012,10.915 15.853,10.915H7.316C7.156,10.915 7.076,10.915 7.009,10.908C6.451,10.845 6.01,10.405 5.947,9.848C5.939,9.78 5.939,9.701 5.939,9.541Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M13.788,7.007H9.38C8.956,7.007 8.819,7.009 8.714,7.021C7.737,7.13 6.966,7.9 6.856,8.876C6.844,8.981 6.843,9.118 6.843,9.541C6.843,9.624 6.843,9.674 6.843,9.711C6.844,9.735 6.844,9.746 6.845,9.748C6.861,9.886 6.97,9.995 7.109,10.012C7.111,10.012 7.121,10.012 7.145,10.013C7.183,10.014 7.232,10.014 7.316,10.014H15.853C15.936,10.014 15.986,10.014 16.023,10.013C16.047,10.012 16.057,10.012 16.06,10.012C16.198,9.995 16.307,9.886 16.324,9.748C16.324,9.745 16.324,9.735 16.325,9.711C16.326,9.674 16.326,9.624 16.326,9.541C16.326,9.118 16.324,8.981 16.313,8.876C16.202,7.9 15.431,7.13 14.454,7.021C14.349,7.009 14.212,7.007 13.788,7.007ZM5.958,8.775C5.939,8.943 5.939,9.142 5.939,9.541C5.939,9.701 5.939,9.78 5.947,9.848C6.01,10.405 6.451,10.845 7.009,10.908C7.076,10.915 7.156,10.915 7.316,10.915H15.853C16.012,10.915 16.092,10.915 16.16,10.908C16.718,10.845 17.158,10.405 17.221,9.848C17.229,9.78 17.229,9.701 17.229,9.541C17.229,9.142 17.229,8.943 17.21,8.775C17.053,7.381 15.951,6.281 14.555,6.124C14.387,6.105 14.188,6.105 13.788,6.105H9.38C8.981,6.105 8.781,6.105 8.613,6.124C7.217,6.281 6.116,7.381 5.958,8.775Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M6.843,12.494C6.843,15.109 8.965,17.229 11.584,17.229LnannanL11.584,17.229C14.203,17.229 16.326,15.109 16.326,12.494V11.009C16.326,10.459 15.88,10.014 15.329,10.014H7.839C7.289,10.014 6.843,10.459 6.843,11.009V12.494Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M15.423,11.009V12.494C15.423,14.611 13.704,16.327 11.584,16.327C9.464,16.327 7.746,14.611 7.746,12.494V11.009C7.746,10.957 7.788,10.915 7.839,10.915H15.329C15.381,10.915 15.423,10.957 15.423,11.009ZM11.584,17.229C8.965,17.229 6.843,15.109 6.843,12.494V11.009C6.843,10.459 7.289,10.014 7.839,10.014H15.329C15.88,10.014 16.326,10.459 16.326,11.009V12.494C16.326,15.109 14.203,17.229 11.584,17.229Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M11.436,6.556L11.135,5.943C10.974,5.616 11.212,5.234 11.577,5.234H11.742C12.107,5.234 12.345,5.616 12.184,5.943L11.883,6.556H11.436Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M20.163,10.609C14.438,12.736 8.139,12.736 2.414,10.609L2.933,9.211C8.323,11.213 14.253,11.213 19.644,9.211L20.163,10.609Z"
android:fillColor="#FF6A00"
android:fillType="evenOdd"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<string name="app_name">도토릿</string>

<!-- Login Screen -->
<string name="login_title">커리어 고민과 이야기들,\n도토릿에서 함께 나누고 성장해요!</string>
<string name="login_title">커리어 고민과 이야기들,\n도토릿에서 함께 나누고\n성장해요!</string>
<string name="login_subtitle">IT 멘토링·커뮤니티</string>
<string name="login_naver">네이버로 시작하기</string>
<string name="login_kakao">카카오로 시작하기</string>
Expand Down