-
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.
feat: Added project & testimonial sections
- Loading branch information
1 parent
831ff48
commit 72b8e5c
Showing
13 changed files
with
332 additions
and
38 deletions.
There are no files selected for viewing
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
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
48 changes: 48 additions & 0 deletions
48
web/src/jsMain/kotlin/com/jamshedalamqaderi/portfolio/domain/utils/ProjectListValues.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,48 @@ | ||
package com.jamshedalamqaderi.portfolio.domain.utils | ||
|
||
import com.jamshedalamqaderi.portfolio.presentation.landing.entities.ProjectListItemModel | ||
|
||
val ProjectListValues = listOf( | ||
ProjectListItemModel( | ||
"Socialdroid", | ||
"Great job! I appreciate theming, grouping things into sections. The only missing thing (for me of course) are the placeholders in the text fields.", | ||
"images/my_picture.png", | ||
tags = listOf("KOTLIN", "KMP", "ANDROID"), | ||
link = "" | ||
), | ||
ProjectListItemModel( | ||
"Socialdroid", | ||
"Great job! I appreciate theming, grouping things into sections. The only missing thing (for me of course) are the placeholders in the text fields.", | ||
"images/my_picture.png", | ||
tags = listOf("KOTLIN", "KMP", "ANDROID"), | ||
link = "" | ||
), | ||
ProjectListItemModel( | ||
"Socialdroid", | ||
"Great job! I appreciate theming, grouping things into sections. The only missing thing (for me of course) are the placeholders in the text fields.", | ||
"images/my_picture.png", | ||
tags = listOf("KOTLIN", "KMP", "ANDROID"), | ||
link = "" | ||
), | ||
ProjectListItemModel( | ||
"Socialdroid", | ||
"Great job! I appreciate theming, grouping things into sections. The only missing thing (for me of course) are the placeholders in the text fields.", | ||
"images/my_picture.png", | ||
tags = listOf("KOTLIN", "KMP", "ANDROID"), | ||
link = "" | ||
), | ||
ProjectListItemModel( | ||
"Socialdroid", | ||
"Great job! I appreciate theming, grouping things into sections. The only missing thing (for me of course) are the placeholders in the text fields.", | ||
"images/my_picture.png", | ||
tags = listOf("KOTLIN", "KMP", "ANDROID"), | ||
link = "" | ||
), | ||
ProjectListItemModel( | ||
"Socialdroid", | ||
"Great job! I appreciate theming, grouping things into sections. The only missing thing (for me of course) are the placeholders in the text fields.", | ||
"images/my_picture.png", | ||
tags = listOf("KOTLIN", "KMP", "ANDROID"), | ||
link = "" | ||
) | ||
) |
12 changes: 12 additions & 0 deletions
12
...rc/jsMain/kotlin/com/jamshedalamqaderi/portfolio/presentation/common/components/Margin.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,12 @@ | ||
package com.jamshedalamqaderi.portfolio.presentation.common.components | ||
|
||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
|
||
@Composable | ||
fun Margin(modifier: Modifier, content: @Composable () -> Unit) { | ||
Box(modifier) { | ||
content() | ||
} | ||
} |
25 changes: 16 additions & 9 deletions
25
web/src/jsMain/kotlin/com/jamshedalamqaderi/portfolio/presentation/landing/LandingScreen.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 |
---|---|---|
@@ -1,21 +1,28 @@ | ||
package com.jamshedalamqaderi.portfolio.presentation.landing | ||
|
||
import androidx.compose.foundation.ExperimentalFoundationApi | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.pager.VerticalPager | ||
import androidx.compose.foundation.pager.rememberPagerState | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import com.jamshedalamqaderi.portfolio.presentation.landing.components.Expertise | ||
import com.jamshedalamqaderi.portfolio.presentation.landing.components.Contacts | ||
import com.jamshedalamqaderi.portfolio.presentation.landing.components.LandingIntro | ||
import com.jamshedalamqaderi.portfolio.presentation.landing.components.Projects | ||
import com.jamshedalamqaderi.portfolio.presentation.landing.components.Testimonials | ||
|
||
@OptIn(ExperimentalFoundationApi::class) | ||
@Composable | ||
fun LandingScreen() { | ||
VerticalPager(state = rememberPagerState { 2 }, modifier = Modifier.fillMaxSize()) { index -> | ||
when (index) { | ||
0 -> LandingIntro() | ||
1 -> Expertise() | ||
LazyColumn { | ||
item { | ||
LandingIntro() | ||
} | ||
item { | ||
Projects() | ||
} | ||
item { | ||
Testimonials() | ||
} | ||
item { | ||
Contacts() | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...jsMain/kotlin/com/jamshedalamqaderi/portfolio/presentation/landing/components/Contacts.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,12 @@ | ||
package com.jamshedalamqaderi.portfolio.presentation.landing.components | ||
|
||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import com.jamshedalamqaderi.portfolio.presentation.common.components.Center | ||
|
||
@Composable | ||
fun Contacts() { | ||
Center { | ||
Text("Contacts") | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
...sMain/kotlin/com/jamshedalamqaderi/portfolio/presentation/landing/components/Expertise.kt
This file was deleted.
Oops, something went wrong.
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
24 changes: 24 additions & 0 deletions
24
...sMain/kotlin/com/jamshedalamqaderi/portfolio/presentation/landing/components/PageTitle.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,24 @@ | ||
package com.jamshedalamqaderi.portfolio.presentation.landing.components | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.material3.Divider | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.dp | ||
|
||
@Composable | ||
fun PageTitle(title: String) { | ||
Column(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) { | ||
Text(title, style = MaterialTheme.typography.headlineLarge, color = Color.Black) | ||
Spacer(Modifier.height(5.dp)) | ||
Divider(modifier = Modifier.width(100.dp), thickness = 3.dp, color = MaterialTheme.colorScheme.secondary) | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...ain/kotlin/com/jamshedalamqaderi/portfolio/presentation/landing/components/ProjectCard.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,80 @@ | ||
package com.jamshedalamqaderi.portfolio.presentation.landing.components | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.Chip | ||
import androidx.compose.material.ExperimentalMaterialApi | ||
import androidx.compose.material3.Card | ||
import androidx.compose.material3.CardDefaults | ||
import androidx.compose.material3.ElevatedButton | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.dp | ||
import com.jamshedalamqaderi.portfolio.domain.utils.AppStrings | ||
import com.jamshedalamqaderi.portfolio.presentation.common.components.Margin | ||
import com.jamshedalamqaderi.portfolio.presentation.landing.entities.ProjectListItemModel | ||
import org.jetbrains.compose.resources.ExperimentalResourceApi | ||
import org.jetbrains.compose.resources.orEmpty | ||
import org.jetbrains.compose.resources.rememberImageBitmap | ||
import org.jetbrains.compose.resources.resource | ||
|
||
@OptIn(ExperimentalResourceApi::class, ExperimentalMaterialApi::class) | ||
@Composable | ||
fun ProjectCard(model: ProjectListItemModel) { | ||
val profilePicState = resource(model.banner).rememberImageBitmap() | ||
Margin(Modifier.padding(25.dp)) { | ||
Card( | ||
modifier = Modifier.width(300.dp).height(400.dp), | ||
elevation = CardDefaults.cardElevation(5.dp), | ||
shape = RoundedCornerShape(10.dp) | ||
) { | ||
Image( | ||
profilePicState.orEmpty(), | ||
contentDescription = "Landing Intro Profile Image", | ||
modifier = Modifier.fillMaxWidth().height(150.dp) | ||
) | ||
Column( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.padding(10.dp), | ||
verticalArrangement = Arrangement.SpaceBetween | ||
) { | ||
Column { | ||
Text(model.title, style = MaterialTheme.typography.headlineLarge, color = Color.Black) | ||
Row(modifier = Modifier.fillMaxWidth()) { | ||
model.tags.forEach { tag -> | ||
Spacer(Modifier.width(2.dp)) | ||
Chip(onClick = {}) { | ||
Text(tag, style = MaterialTheme.typography.labelSmall) | ||
} | ||
} | ||
} | ||
Spacer(Modifier.height(5.dp)) | ||
Text( | ||
model.description, | ||
style = MaterialTheme.typography.bodySmall, | ||
color = Color.DarkGray | ||
) | ||
Spacer(Modifier.height(5.dp)) | ||
} | ||
Row { | ||
ElevatedButton(onClick = {}) { | ||
Text(AppStrings.VIEW_DETAILS) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...jsMain/kotlin/com/jamshedalamqaderi/portfolio/presentation/landing/components/Projects.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,50 @@ | ||
package com.jamshedalamqaderi.portfolio.presentation.landing.components | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.ExperimentalLayoutApi | ||
import androidx.compose.foundation.layout.FlowRow | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Brush | ||
import androidx.compose.ui.unit.dp | ||
import com.jamshedalamqaderi.portfolio.domain.utils.AppStrings | ||
import com.jamshedalamqaderi.portfolio.domain.utils.ProjectListValues | ||
|
||
@OptIn(ExperimentalLayoutApi::class) | ||
@Composable | ||
fun Projects() { | ||
Column( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.background( | ||
Brush.horizontalGradient( | ||
colors = listOf( | ||
MaterialTheme.colorScheme.primaryContainer, | ||
MaterialTheme.colorScheme.errorContainer, | ||
) | ||
) | ||
) | ||
.padding(bottom = 30.dp) | ||
) { | ||
Spacer(Modifier.height(50.dp)) | ||
PageTitle(AppStrings.PROJECTS) | ||
Spacer(Modifier.height(30.dp)) | ||
FlowRow( | ||
modifier = Modifier.fillMaxWidth(), | ||
horizontalArrangement = Arrangement.Center, | ||
verticalArrangement = Arrangement.SpaceBetween, | ||
maxItemsInEachRow = 4 | ||
) { | ||
ProjectListValues.forEach { model -> | ||
ProjectCard(model) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.