feat: 메인 홈

- 요일별 시리즈, 오디션 추가
This commit is contained in:
Yu Sung
2025-07-12 01:20:02 +09:00
parent 5a9b95c2bf
commit 6a9854bdd7
6 changed files with 459 additions and 50 deletions

View File

@@ -17,24 +17,18 @@ struct SectionEventBannerView: View {
let items: [EventItem]
var body: some View {
VStack(spacing: 13.3) {
VStack(spacing: 16) {
TabView(selection: $currentIndex) {
ForEach(0..<items.count, id: \.self) { index in
let item = items[index]
if let url = item.thumbnailImageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
KFImage(URL(string: url))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width,
height: screenSize().width * 300 / 1000
)
)
.resizable()
.scaledToFill()
.frame(
width: screenSize().width,
height: screenSize().width * 300 / 1000,
width: screenSize().width - 48,
height: (screenSize().width - 48) * 300 / 1000,
alignment: .center
)
.tag(index)
@@ -52,17 +46,11 @@ struct SectionEventBannerView: View {
} else {
KFImage(URL(string: item.thumbnailImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width,
height: screenSize().width * 300 / 1000
)
)
.resizable()
.scaledToFill()
.frame(
width: screenSize().width,
height: screenSize().width * 300 / 1000,
width: screenSize().width - 48,
height: (screenSize().width - 48) * 300 / 1000,
alignment: .center
)
.tag(index)
@@ -87,14 +75,11 @@ struct SectionEventBannerView: View {
alignment: .center
)
HStack(spacing: 4) {
HStack(spacing: 8) {
ForEach(0..<items.count, id: \.self) { index in
Capsule()
.foregroundColor(index == currentIndex ? .button : .gray90)
.frame(
width: index == currentIndex ? 18 : 6,
height: 6
)
.foregroundColor(index == currentIndex ? .button : .gray77)
.frame(width: 10, height: 10)
.tag(index)
}
}