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 4a97e9e commit 8026d0f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main/kotlin/pages/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ val HomePage = FC {
)
}

projectRow(marginTop = 0.5.em) {
projectRow {
buildProjectCell(
project = Project(
tags = listOf("Kotlin/JS", "HTML", "CSS", "React"),
Expand All @@ -184,7 +184,7 @@ val HomePage = FC {
)
}

projectRow(marginTop = 0.5.em) {
projectRow {
buildProjectCell(
project = Project(
tags = listOf("Kotlin", "Compose Multiplatform"),
Expand Down Expand Up @@ -248,18 +248,16 @@ private fun ChildrenBuilder.projectTable(builder: ChildrenBuilder.() -> Unit) {
width = 100.pct
borderCollapse = BorderCollapse.separate
borderSpacing = 0.5.em
marginTop = 1.5.em
margin = (-0.5).em
marginTop = 1.em
tableLayout = TableLayout.fixed
}
builder.invoke(this)
}
}

private fun ChildrenBuilder.projectRow(marginTop: Margin = 0.px, builder: ChildrenBuilder.() -> Unit) {
private fun ChildrenBuilder.projectRow(builder: ChildrenBuilder.() -> Unit) {
ReactHTML.tr {
css {
this.marginTop = marginTop
}
builder.invoke(this)
}
}
Expand All @@ -268,7 +266,7 @@ private fun ChildrenBuilder.buildProjectCell(project: Project, isMarginLeftNeede
ReactHTML.td {
css {
backgroundColor = white
padding = 1.em
padding = 0.75.em
display = Display.tableCell
verticalAlign = VerticalAlign.top

Expand Down

0 comments on commit 8026d0f

Please sign in to comment.