-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
starting ProfileInfoSidebar, profile picture done
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
Binary file added
BIN
+58.4 KB
composeApp/src/commonMain/composeResources/drawable/photo_profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions
44
composeApp/src/wasmJsMain/kotlin/ui/uiComponent/ProfileInfoSideBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package ui.uiComponent | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.layout.* | ||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.material.Card | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.unit.dp | ||
import myresume.composeapp.generated.resources.Res | ||
import myresume.composeapp.generated.resources.photo_profile | ||
import org.jetbrains.compose.resources.painterResource | ||
|
||
@Composable | ||
fun ProfileInfoSideBar(modifier: Modifier = Modifier) { | ||
Card( | ||
modifier = modifier | ||
.fillMaxHeight() | ||
.width(300.dp) | ||
.offset(y = 4.dp), | ||
shape = MaterialTheme.shapes.small, | ||
elevation = 3.dp | ||
) { | ||
Column( | ||
modifier = Modifier.padding(top = 16.dp), | ||
verticalArrangement = Arrangement.spacedBy(16.dp), | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
ProfilePicture() | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
fun ProfilePicture(modifier: Modifier = Modifier) { | ||
Image( | ||
modifier = modifier.size(190.dp).clip(CircleShape), | ||
painter = painterResource(Res.drawable.photo_profile), | ||
contentDescription = "" | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
package ui.uiScreen | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import ui.uiComponent.ProfileInfoSideBar | ||
import ui.uiComponent.SocialNetworkBar | ||
|
||
@Composable | ||
fun ContentScreen(modifier: Modifier = Modifier) { | ||
Row(modifier = modifier) { | ||
Row( | ||
modifier = modifier.fillMaxWidth(), | ||
horizontalArrangement = Arrangement.SpaceBetween | ||
) { | ||
SocialNetworkBar() | ||
ProfileInfoSideBar() | ||
} | ||
} |