Skip to content

Commit

Permalink
[FEAT/#12] stickyHeader ๊ตฌํ˜„
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyobeen-Park committed Jul 10, 2024
1 parent 6aa7d30 commit 1d02110
Showing 1 changed file with 69 additions and 44 deletions.
113 changes: 69 additions & 44 deletions feature/src/main/java/com/terning/feature/home/HomeRoute.kt
Original file line number Diff line number Diff line change
@@ -1,78 +1,103 @@
package com.terning.feature.home

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
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.lazy.LazyColumn
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.theme.Black
import com.terning.core.designsystem.theme.Grey150
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.feature.R
import com.terning.feature.home.component.HomeFilteringScreen
import com.terning.feature.home.component.HomeRecommendEmptyIntern
import com.terning.feature.home.component.HomeTodayIntern

@Composable
fun HomeRoute() {
HomeScreen()
}

@OptIn(ExperimentalFoundationApi::class)
@Composable
fun HomeScreen() {
Column(
LazyColumn(
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 24.dp)
) {
Text(
text = stringResource(
id = R.string.home_today_title_start
)
+ "๋‚จ์ง€์šฐ"
+ stringResource(
id = R.string.home_today_title_end
),
modifier = Modifier
.padding(top = 11.dp),
style = TerningTheme.typography.title1,
color = Black,
)

HomeTodayIntern()
// HomeNoClosedTodayItem(isButtonExist = false)

Text(
text = stringResource(id = R.string.home_recommend_sub_title),
style = TerningTheme.typography.detail2,
color = Black,
modifier = Modifier
.padding(top = 25.dp)
)
item {
Column(
modifier = Modifier
.padding(bottom = 16.dp)
) {
Text(
text = stringResource(
id = R.string.home_today_title_start
)
+ "๋‚จ์ง€์šฐ"
+ stringResource(
id = R.string.home_today_title_end
),
modifier = Modifier
.padding(top = 11.dp)
.padding(horizontal = 24.dp),
style = TerningTheme.typography.title1,
color = Black,
)
// HomeTodayEmptyIntern(isButtonExist = false)
HomeTodayIntern()
}
}
stickyHeader {
Column(
modifier = Modifier
.background(White)
) {
Text(
text = stringResource(id = R.string.home_recommend_sub_title),
style = TerningTheme.typography.detail2,
color = Black,
modifier = Modifier
.padding(top = 25.dp)
.padding(horizontal = 24.dp),
)

Text(
text = stringResource(id = R.string.home_recommend_main_title),
style = TerningTheme.typography.title1,
color = Black,
modifier = Modifier
.padding(top = 5.dp)
)
Text(
text = stringResource(id = R.string.home_recommend_main_title),
style = TerningTheme.typography.title1,
color = Black,
modifier = Modifier
.padding(top = 5.dp)
.padding(horizontal = 24.dp),
)

HomeFilteringScreen(3, 1, 7)
HomeFilteringScreen(3, 1, 7)

HorizontalDivider(
Modifier
.fillMaxWidth()
.height(4.dp)
)
HorizontalDivider(
thickness = 4.dp,
color = Grey150,
modifier = Modifier
.fillMaxWidth(),
)
}
}

// HomeRecommendIntern()
HomeRecommendEmptyIntern()
items(10) {
TerningPostItem(
imageUrl = "https://reqres.in/img/faces/7-image.jpg",
title = "[Someone] ์ฝ˜ํ…์ธ  ๋งˆ์ผ€ํ„ฐ ๋Œ€ํ•™์ƒ ์ธํ„ด ์ฑ„์šฉ",
dateDeadline = "2",
workingPeriod = "2๊ฐœ์›”",
isScraped = false,
)
}
}
}

0 comments on commit 1d02110

Please sign in to comment.