Skip to content

Commit 8856666

Browse files
committed
feat: Make social links clickable, update layout
1 parent b6d4f04 commit 8856666

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
android:width="24dp"
3-
android:height="24dp"
4-
android:viewportWidth="24"
5-
android:viewportHeight="24">
6-
<path
7-
android:fillColor="#FF000000"
8-
android:pathData="M12.135,0.003a2.577,2.577 0,0 0,-1.42 0.344L2.55,5.06a2.577,2.577 0,0 0,-0.953 0.967l3.957,2.17a1.765,1.765 0,0 1,0.603 -0.588l4.951,-2.86a1.761,1.761 0,0 1,1.76 0l4.951,2.86a1.753,1.753 0,0 1,0.526 0.46l3.921,-2.265a2.577,2.577 0,0 0,-0.816 -0.744L13.291,0.347a2.577,2.577 0,0 0,-1.152 -0.34ZM11.99,4.915a1.36,1.36 0,0 0,-0.68 0.182L6.36,7.953a1.345,1.345 0,0 0,-0.454 0.435l1.92,1.055a1.05,1.05 0,0 1,0.31 -0.275l3.34,-1.928a1.054,1.054 0,0 1,1.051 0l3.336,1.928a1.066,1.066 0,0 1,0.238 0.199l0.018,-0.01 -0.002,-0.002 1.877,-1.08a1.353,1.353 0,0 0,-0.373 -0.322l-4.95,-2.86a1.357,1.357 0,0 0,-0.68 -0.178ZM22.422,6.064 L18.502,8.324a1.757,1.757 0,0 1,0.2 0.812v5.715c0,0.627 -0.332,1.21 -0.88,1.528l-4.95,2.86a1.761,1.761 0,0 1,-0.64 0.214v4.524a2.577,2.577 0,0 0,1.059 -0.313l8.162,-4.713a2.577,2.577 0,0 0,1.289 -2.23L22.742,7.297a2.577,2.577 0,0 0,-0.318 -1.228ZM1.485,6.302a2.577,2.577 0,0 0,-0.227 0.99v9.43c0,0.918 0.491,1.767 1.293,2.229l8.162,4.713a2.57,2.57 0,0 0,1.225 0.336v-4.531a1.761,1.761 0,0 1,-0.833 -0.235L6.156,16.38a1.765,1.765 0,0 1,-0.877 -1.528L5.279,9.136a1.776,1.776 0,0 1,0.131 -0.676ZM18.155,8.525 L16.265,9.617a1.058,1.058 0,0 1,0.124 0.46v3.856c0,0.378 -0.2,0.72 -0.526,0.907l-3.336,1.93a1.04,1.04 0,0 1,-0.295 0.107v2.17c0.152,-0.027 0.304,-0.078 0.44,-0.157l4.949,-2.859a1.36,1.36 0,0 0,0.68 -1.18L18.301,9.136a1.36,1.36 0,0 0,-0.147 -0.607ZM5.768,8.655a1.36,1.36 0,0 0,-0.088 0.481v5.715a1.36,1.36 0,0 0,0.68 1.18l4.95,2.86c0.194,0.112 0.412,0.166 0.627,0.177v-2.174a1.054,1.054 0,0 1,-0.46 -0.123L8.14,14.843a1.054,1.054 0,0 1,-0.532 -0.908v-3.853a0.99,0.99 0,0 1,0.077 -0.38l-0.034,-0.013z"/>
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="286"
2+
android:viewportWidth="256" android:width="21.482517dp">
3+
4+
<path android:fillColor="#4285F4"
5+
android:pathData="M126.94,0a31.94,31.94 0,0 1,15.16 4.13L238.73,58.7a35.72,35.72 0,0 1,10.15 8.58l0.1,-0.06l1.44,2.11l0.17,0.24l1.8,2.65l-0.13,0.08c2.39,4.35 3.7,9.09 3.75,13.92v110.94a31.93,31.93 0,0 1,-15.7 27.8l-95.58,56.4a31.81,31.81 0,0 1,-12.97 4.26l-0,0.14l-6.11,0.05l0,-0.15a31.96,31.96 0,0 1,-12.85 -4L11.27,224.31C4.37,220.43 0.08,213.15 0,205.2L0,87.71c0.06,-4.14 0.78,-8.14 2.15,-11.82l-0.11,-0.06l2.62,-5.47l0.15,0.08a28.44,28.44 0,0 1,9.8 -9.62l95.58,-56.38A31.9,31.9 0,0 1,126.1 0zM7.5,78.88l-0.21,0.68c-0.85,2.82 -1.27,5.86 -1.24,9.03v116.58a16.1,16.1 0,0 0,8.19 13.88l101.53,57.35a25.9,25.9 0,0 0,9.76 3.17l0.21,0.02l0.02,-4.93l0.02,-20.69l-0.03,-23.48l-0.14,-0.01a20.52,20.52 0,0 1,-6.06 -1.78l-0.71,-0.35l-0.63,-0.34l-61.51,-34.74a14.6,14.6 0,0 1,-5.4 -5.3a14.65,14.65 0,0 1,-2.03 -7.32l0,-70.61c-0.02,-2.25 0.26,-4.44 0.84,-6.5l0.2,-0.66zM247.06,75.41l-42.2,25.2l0.09,0.19c1.04,2.25 1.65,4.64 1.77,7.09l0.02,0.67l-0,67.2a20.53,20.53 0,0 1,-10.1 17.88L138.74,227.8a20.36,20.36 0,0 1,-6.44 2.45l-0.5,0.09l0.01,4.78l0.02,27.68l-0.04,16.26l-0.01,0.47l0.9,-0.13a25.74,25.74 0,0 0,8.26 -2.85l0.7,-0.4l95.58,-56.39a25.89,25.89 0,0 0,9.38 -9.56a25.92,25.92 0,0 0,3.34 -13l0,-110.94c-0.03,-3.43 -0.9,-6.85 -2.5,-10.07zM124,86.58c-0.91,0.27 -1.79,0.65 -2.62,1.14l-38.81,22.9a10.31,10.31 0,0 0,-2.92 2.57a10.75,10.75 0,0 0,-1.2 1.95l-0.21,0.52a12.6,12.6 0,0 0,-0.93 3.67c-0.05,0.49 -0.07,0.99 -0.06,1.5v47.36a7.8,7.8 0,0 0,1.08 3.88a7.74,7.74 0,0 0,2.87 2.81l41.23,23.29a11.73,11.73 0,0 0,5.86 1.52l0.44,-0.02l0,12.75l0.03,12.16l-0.03,-24.92a11.68,11.68 0,0 0,5.43 -1.61l38.81,-22.9a11.74,11.74 0,0 0,4.26 -4.34c0.16,-0.29 0.31,-0.58 0.44,-0.89a11.77,11.77 0,0 0,1.07 -5l0,-45.06a10.19,10.19 0,0 0,-0.32 -2.41a10.79,10.79 0,0 0,-0.51 -1.53a11.56,11.56 0,0 0,-0.8 -1.57l-0.18,-0.28l-0.18,-0.28a12.88,12.88 0,0 0,-0.92 -1.19a13.33,13.33 0,0 0,-3.49 -2.85l-39.24,-22.16A11.68,11.68 0,0 0,124 86.58m2.16,-80.54A25.86,25.86 0,0 0,113.25 9.64L17.67,66.02a22.36,22.36 0,0 0,-7.18 6.74l-0.42,0.63l42.9,24.02l0.44,-0.61a18.37,18.37 0,0 1,4.71 -4.32l0.56,-0.35l57.9,-34.16a20.51,20.51 0,0 1,20.53 -0.2l58.54,33.07a22.81,22.81 0,0 1,5.44 4.29l0.39,0.44l42.12,-25.15l-0.46,-0.53a29.76,29.76 0,0 0,-6.72 -5.53l-0.69,-0.4l-96.63,-54.57a25.85,25.85 0,0 0,-12.97 -3.35"/>
6+
97
</vector>

composeApp/src/wasmJsMain/kotlin/org/nsh07/nsh07/ui/AppScreen.kt

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fun AppScreen(modifier: Modifier = Modifier) {
3434

3535
Row(
3636
modifier = Modifier
37-
.padding(start = 32.dp, end = 48.dp)
37+
.padding(horizontal = 48.dp)
3838
.widthIn(max = 1200.dp)
3939
.then(modifier)
4040
) {
@@ -43,21 +43,21 @@ fun AppScreen(modifier: Modifier = Modifier) {
4343
"Nishant Mishra",
4444
style = typography.displayLarge.copy(fontSize = 48.sp),
4545
color = colorScheme.onSurface,
46-
modifier = Modifier.padding(start = 20.dp)
46+
// modifier = Modifier.padding(start = 20.dp)
4747
)
4848
Spacer(Modifier.height(4.dp))
4949
Text(
5050
"Mobile app developer",
5151
style = typography.titleLarge,
5252
color = colorScheme.onSurface,
53-
modifier = Modifier.padding(start = 20.dp)
53+
// modifier = Modifier.padding(start = 20.dp)
5454
)
5555
Spacer(Modifier.height(20.dp))
5656
Text(
5757
"I build performant, beautiful apps for mobile phones.",
5858
style = typography.bodyLarge,
5959
color = colorScheme.onSurfaceVariant,
60-
modifier = Modifier.padding(start = 20.dp).widthIn(max = 320.dp)
60+
modifier = Modifier.widthIn(max = 320.dp)
6161
)
6262

6363
Spacer(Modifier.height(72.dp))
@@ -66,16 +66,19 @@ fun AppScreen(modifier: Modifier = Modifier) {
6666
selected = selectedItem == 0,
6767
onClick = { selectedItem = 0 },
6868
label = { Text("About", style = typography.bodyMedium) },
69+
modifier = Modifier.offset(x = (-20).dp)
6970
)
7071
NavigationItem(
7172
selected = selectedItem == 1,
7273
onClick = { selectedItem = 1 },
7374
label = { Text("Experience", style = typography.bodyMedium) },
75+
modifier = Modifier.offset(x = (-20).dp)
7476
)
7577
NavigationItem(
7678
selected = selectedItem == 2,
7779
onClick = { selectedItem = 2 },
7880
label = { Text("Projects", style = typography.bodyMedium) },
81+
modifier = Modifier.offset(x = (-20).dp)
7982
)
8083

8184
Spacer(Modifier.weight(1f))
@@ -85,30 +88,30 @@ fun AppScreen(modifier: Modifier = Modifier) {
8588
Row(
8689
horizontalArrangement = Arrangement.spacedBy(4.dp),
8790
verticalAlignment = Alignment.CenterVertically,
88-
modifier = Modifier.padding(start = 20.dp)
91+
// modifier = Modifier.padding(start = 20.dp)
8992
) {
90-
IconButton(onClick = {}) {
93+
IconButton(onClick = { uriHandler.openUri("https://github.com/nsh07") }) {
9194
Icon(
9295
painterResource(Res.drawable.github),
9396
contentDescription = null,
9497
modifier = Modifier.size(24.dp)
9598
)
9699
}
97-
IconButton(onClick = {}) {
100+
IconButton(onClick = { uriHandler.openUri("https://gitlab.com/nsh07") }) {
98101
Icon(
99102
painterResource(Res.drawable.gitlab),
100103
contentDescription = null,
101104
modifier = Modifier.size(24.dp)
102105
)
103106
}
104-
IconButton(onClick = {}) {
107+
IconButton(onClick = { uriHandler.openUri("https://www.linkedin.com/in/nsh07/") }) {
105108
Icon(
106109
painterResource(Res.drawable.linkedin),
107110
contentDescription = null,
108111
modifier = Modifier.size(24.dp)
109112
)
110113
}
111-
IconButton(onClick = {}) {
114+
IconButton(onClick = { uriHandler.openUri("mailto:nishant.28@outlook.com") }) {
112115
Icon(
113116
painterResource(Res.drawable.email),
114117
contentDescription = null,
@@ -118,8 +121,6 @@ fun AppScreen(modifier: Modifier = Modifier) {
118121
}
119122
}
120123

121-
Spacer(Modifier.width(16.dp))
122-
123124
LazyColumn(
124125
contentPadding = PaddingValues(vertical = 96.dp),
125126
modifier = Modifier.fillMaxHeight().weight(1f)
@@ -150,7 +151,7 @@ fun AppScreen(modifier: Modifier = Modifier) {
150151
item {
151152
Text(
152153
buildAnnotatedString {
153-
append("Design inspired by ")
154+
append("Layout inspired by ")
154155
withLink(
155156
LinkAnnotation.Url(
156157
url = "https://brittanychiang.com/",
@@ -165,7 +166,21 @@ fun AppScreen(modifier: Modifier = Modifier) {
165166
style = typography.bodyMedium
166167
)
167168
Row(verticalAlignment = Alignment.CenterVertically) {
168-
Text("Built with ", style = typography.bodyMedium, color = colorScheme.outline)
169+
Text(
170+
buildAnnotatedString {
171+
append("Built with ")
172+
withLink(
173+
LinkAnnotation.Url(
174+
url = "https://www.jetbrains.com/compose-multiplatform/",
175+
styles = TextLinkStyles(SpanStyle(color = colorScheme.onSurface))
176+
)
177+
) {
178+
append("Compose Multiplatform ")
179+
}
180+
},
181+
style = typography.bodyMedium,
182+
color = colorScheme.outline
183+
)
169184
Icon(
170185
painterResource(Res.drawable.compose),
171186
null,

0 commit comments

Comments
 (0)