parent
523295648b
commit
602ee790eb
|
@ -24,7 +24,6 @@ struct SeriesListAllView: View {
|
|||
ForEach(0..<viewModel.seriesList.count, id: \.self) { index in
|
||||
let item = viewModel.seriesList[index]
|
||||
SeriesListItemView(itemWidth: (screenSize().width - 40) / 3, item: item)
|
||||
.alignmentGuide(.top) { _ in 0 }
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
AppState.shared
|
||||
|
|
|
@ -15,56 +15,54 @@ struct SeriesListItemView: View {
|
|||
let item: SeriesListItem
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top) {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
ZStack {
|
||||
KFImage(URL(string: item.coverImage))
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: itemWidth, height: itemWidth * 432 / 306)
|
||||
.cornerRadius(5)
|
||||
.clipped()
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
ZStack {
|
||||
KFImage(URL(string: item.coverImage))
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: itemWidth, height: itemWidth * 432 / 306)
|
||||
.cornerRadius(5)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
HStack(spacing: 3.3) {
|
||||
if !item.isComplete && item.isNew {
|
||||
SeriesItemBadgeView(title: "신작", backgroundColor: .button)
|
||||
}
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
HStack(spacing: 3.3) {
|
||||
if !item.isComplete && item.isNew {
|
||||
SeriesItemBadgeView(title: "신작", backgroundColor: .button)
|
||||
}
|
||||
|
||||
if item.isComplete {
|
||||
SeriesItemBadgeView(title: "완결", backgroundColor: Color(hex: "002abd"))
|
||||
}
|
||||
if item.isComplete {
|
||||
SeriesItemBadgeView(title: "완결", backgroundColor: Color(hex: "002abd"))
|
||||
}
|
||||
|
||||
if item.isPopular {
|
||||
SeriesItemBadgeView(title: "인기", backgroundColor: Color(hex: "ec6033"))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
if item.isPopular {
|
||||
SeriesItemBadgeView(title: "인기", backgroundColor: Color(hex: "ec6033"))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
|
||||
SeriesItemBadgeView(title: "총 \(item.numberOfContent)화", backgroundColor: Color.gray33.opacity(0.7))
|
||||
}
|
||||
}
|
||||
.padding(3.3)
|
||||
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
|
||||
SeriesItemBadgeView(title: "총 \(item.numberOfContent)화", backgroundColor: Color.gray33.opacity(0.7))
|
||||
}
|
||||
}
|
||||
|
||||
Text(item.title)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color.grayee)
|
||||
.lineLimit(2)
|
||||
.frame(width: itemWidth, alignment: .leading)
|
||||
|
||||
Text(item.publishedDaysOfWeek)
|
||||
.font(.custom(Font.medium.rawValue, size: 11))
|
||||
.foregroundColor(Color.gray77)
|
||||
.frame(width: itemWidth, alignment: .leading)
|
||||
.padding(3.3)
|
||||
}
|
||||
.frame(width: itemWidth)
|
||||
.frame(width: itemWidth, height: itemWidth * 432 / 306)
|
||||
|
||||
Text(item.title)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color.grayee)
|
||||
.lineLimit(2)
|
||||
.frame(width: itemWidth, alignment: .leading)
|
||||
|
||||
Text(item.publishedDaysOfWeek)
|
||||
.font(.custom(Font.medium.rawValue, size: 11))
|
||||
.foregroundColor(Color.gray77)
|
||||
.frame(width: itemWidth, alignment: .leading)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue