Skip to content

Commit 49199ef

Browse files
committed
feat: Add about text
1 parent 6c282d3 commit 49199ef

File tree

1 file changed

+37
-22
lines changed
  • composeApp/src/wasmJsMain/kotlin/org/nsh07/nsh07/ui

1 file changed

+37
-22
lines changed

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

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.nsh07.nsh07.ui
22

33
import androidx.compose.foundation.layout.*
4+
import androidx.compose.foundation.lazy.LazyColumn
5+
import androidx.compose.foundation.lazy.items
46
import androidx.compose.material3.Icon
57
import androidx.compose.material3.IconButton
68
import androidx.compose.material3.MaterialTheme.colorScheme
@@ -14,13 +16,19 @@ import androidx.compose.ui.unit.dp
1416
import androidx.compose.ui.unit.sp
1517
import nsh07.composeapp.generated.resources.*
1618
import org.jetbrains.compose.resources.painterResource
17-
import org.jetbrains.compose.ui.tooling.preview.Preview
18-
import org.nsh07.nsh07.ui.theme.Nsh07Theme
1919

2020
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
2121
@Composable
2222
fun AppScreen(modifier: Modifier = Modifier) {
2323
var selectedItem by remember { mutableStateOf(0) }
24+
val paragraphs = remember {
25+
listOf(
26+
"Hi, I'm Nishant. I'm currently a hobbyist software developer and a computer science student at the Indian Institute of Information Technology Bhagalpur.",
27+
"I've written a variety of programs in multiple languages over my years as a hobbyist developer since back when I was in middle and high school (~2019) in Python and C++, spanning multiple areas like games, CLI tools, GUI tools and automation scripts. I'm continuing to work towards persuing my passion of software development as my career, now as a CS student."
28+
)
29+
}
30+
31+
2432
Row(
2533
modifier = Modifier
2634
.padding(start = 32.dp, end = 48.dp)
@@ -46,7 +54,7 @@ fun AppScreen(modifier: Modifier = Modifier) {
4654
"I build performant, beautiful apps for mobile phones.",
4755
style = typography.bodyLarge,
4856
color = colorScheme.onSurfaceVariant,
49-
modifier = Modifier.padding(start = 20.dp)
57+
modifier = Modifier.padding(start = 20.dp).widthIn(max = 320.dp)
5058
)
5159

5260
Spacer(Modifier.height(72.dp))
@@ -109,26 +117,33 @@ fun AppScreen(modifier: Modifier = Modifier) {
109117

110118
Spacer(Modifier.width(16.dp))
111119

112-
Column(
113-
horizontalAlignment = Alignment.CenterHorizontally,
114-
verticalArrangement = Arrangement.Center,
115-
modifier = Modifier.fillMaxHeight().padding(vertical = 96.dp).weight(1f)
120+
LazyColumn(
121+
contentPadding = PaddingValues(vertical = 96.dp),
122+
modifier = Modifier.fillMaxHeight().weight(1f)
116123
) {
117-
Icon(
118-
painterResource(Res.drawable.forklift),
119-
null,
120-
modifier = Modifier.size(64.dp)
121-
)
122-
Spacer(Modifier.height(16.dp))
123-
Text("Work in progress", style = typography.headlineSmall)
124+
items(paragraphs) {
125+
Text(
126+
it,
127+
style = typography.bodyLarge,
128+
color = colorScheme.onSurfaceVariant,
129+
modifier = Modifier.padding(bottom = 16.dp)
130+
)
131+
}
132+
item {
133+
Column(
134+
horizontalAlignment = Alignment.CenterHorizontally,
135+
verticalArrangement = Arrangement.Center,
136+
modifier = Modifier.fillMaxWidth().padding(vertical = 56.dp)
137+
) {
138+
Icon(
139+
painterResource(Res.drawable.forklift),
140+
null,
141+
modifier = Modifier.size(64.dp)
142+
)
143+
Spacer(Modifier.height(16.dp))
144+
Text("Work in progress", style = typography.headlineSmall)
145+
}
146+
}
124147
}
125148
}
126149
}
127-
128-
@Preview(widthDp = 1920, heightDp = 1080)
129-
@Composable
130-
fun AppScreenPreview() {
131-
Nsh07Theme {
132-
AppScreen()
133-
}
134-
}

0 commit comments

Comments
 (0)