Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
vladleesi committed Apr 5, 2024
1 parent a2e28cf commit f3c5265
Showing 1 changed file with 36 additions and 39 deletions.
75 changes: 36 additions & 39 deletions src/main/kotlin/pages/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ val HomePage = FC {
+" and exploring other interesting little things. My name is Vladislav Kochetov, or just "
span {
css {
// buildContentTextBackgroundStyle()
color = accent
}
+"@vladleesi"
Expand All @@ -140,18 +139,9 @@ val HomePage = FC {
+"Projects"
}

div {
css {
display = Display.table
marginTop = 24.px
}
div {
css {
display = Display.flex
flex = Flex.content
flexDirection = FlexDirection.row
}
buildProjectRow(
projectTable {
projectRow {
buildProjectCell(
Project(
tags = listOf("Kotlin", "Android", "Jetpack Compose", "KMM", "iOS", "SwiftUI"),
title = "Braindance",
Expand All @@ -161,7 +151,7 @@ val HomePage = FC {
),
isMarginLeftNeeded = false
)
buildProjectRow(
buildProjectCell(
project = Project(
tags = listOf("Kotlin", "Android"),
title = "Kutilicious",
Expand All @@ -172,14 +162,9 @@ val HomePage = FC {
isMarginLeftNeeded = true
)
}
div {
css {
display = Display.flex
flex = Flex.content
flexDirection = FlexDirection.row
marginTop = 8.px
}
buildProjectRow(

projectRow(marginTop = 8.px) {
buildProjectCell(
Project(
tags = listOf("Kotlin/JS", "React", "HTML", "CSS"),
title = "Personal website",
Expand All @@ -189,15 +174,10 @@ val HomePage = FC {
),
isMarginLeftNeeded = false
)
buildProjectRow(
buildProjectCell(
Project(
tags = listOf(
"Kotlin",
"Android",
"iOS",
"Desktop",
"Compose Multiplatform",
"Kotlin Multiplatform"
"Kotlin", "Android", "iOS", "Desktop", "Compose Multiplatform", "Kotlin Multiplatform"
),
title = "Factastic",
description = "Useless facts every day! Here's an example of a multiplatform app with shared UI and network logic built with Kotlin Multiplatform and Compose Multiplatform for Android, iOS and Desktop.",
Expand All @@ -207,14 +187,9 @@ val HomePage = FC {
isMarginLeftNeeded = true
)
}
div {
css {
display = Display.flex
flex = Flex.content
flexDirection = FlexDirection.row
marginTop = 8.px
}
buildProjectRow(

projectRow(marginTop = 8.px) {
buildProjectCell(
project = Project(
tags = listOf("Kotlin", "Compose Multiplatform", "Android", "iOS"),
title = "Yet Another Calculator (YAC)",
Expand All @@ -224,7 +199,7 @@ val HomePage = FC {
),
isMarginLeftNeeded = false
)
buildProjectRow(
buildProjectCell(
Project(
tags = listOf("Kotlin", "Android"),
title = "Scanmate",
Expand Down Expand Up @@ -272,7 +247,29 @@ val HomePage = FC {
Outlet()
}

private fun ChildrenBuilder.buildProjectRow(project: Project, isMarginLeftNeeded: Boolean) {
private fun ChildrenBuilder.projectTable(builder: ChildrenBuilder.() -> Unit) {
div {
css {
display = Display.table
marginTop = 24.px
}
builder.invoke(this)
}
}

private fun ChildrenBuilder.projectRow(marginTop: Margin = 0.px, builder: ChildrenBuilder.() -> Unit) {
div {
css {
this.display = Display.flex
this.flex = Flex.content
this.flexDirection = FlexDirection.row
this.marginTop = marginTop
}
builder.invoke(this)
}
}

private fun ChildrenBuilder.buildProjectCell(project: Project, isMarginLeftNeeded: Boolean) {
div {
css {
backgroundColor = white
Expand Down

0 comments on commit f3c5265

Please sign in to comment.