mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 08:32:00 +00:00
idk 😭
This commit is contained in:
parent
1d5f09be0a
commit
abbbdc00ee
1 changed files with 38 additions and 35 deletions
|
|
@ -28,47 +28,50 @@ struct SearchResultsGrid: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 12), count: columnsCount), spacing: 12) {
|
ScrollView {
|
||||||
ForEach(items) { item in
|
LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 12), count: columnsCount), spacing: 12) {
|
||||||
NavigationLink(destination: MediaInfoView(title: item.title, imageUrl: item.imageUrl, href: item.href, module: selectedModule)) {
|
ForEach(items) { item in
|
||||||
ZStack {
|
NavigationLink(destination: MediaInfoView(title: item.title, imageUrl: item.imageUrl, href: item.href, module: selectedModule)) {
|
||||||
KFImage(URL(string: item.imageUrl))
|
ZStack {
|
||||||
.resizable()
|
KFImage(URL(string: item.imageUrl))
|
||||||
.aspectRatio(0.72, contentMode: .fill)
|
.resizable()
|
||||||
.frame(width: cellWidth, height: cellWidth * 1.5)
|
.aspectRatio(0.72, contentMode: .fill)
|
||||||
.cornerRadius(12)
|
.frame(width: cellWidth, height: cellWidth * 1.5)
|
||||||
.clipped()
|
.cornerRadius(12)
|
||||||
|
.clipped()
|
||||||
VStack {
|
|
||||||
Spacer()
|
VStack {
|
||||||
HStack {
|
|
||||||
Text(item.title)
|
|
||||||
.lineLimit(2)
|
|
||||||
.foregroundColor(.white)
|
|
||||||
.multilineTextAlignment(.leading)
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
HStack {
|
||||||
.padding(12)
|
Text(item.title)
|
||||||
.background(
|
.lineLimit(2)
|
||||||
LinearGradient(
|
.foregroundColor(.white)
|
||||||
colors: [
|
.multilineTextAlignment(.leading)
|
||||||
.black.opacity(0.7),
|
Spacer()
|
||||||
.black.opacity(0.0)
|
}
|
||||||
],
|
.padding(12)
|
||||||
startPoint: .bottom,
|
.background(
|
||||||
endPoint: .top
|
LinearGradient(
|
||||||
|
colors: [
|
||||||
|
.black.opacity(0.7),
|
||||||
|
.black.opacity(0.0)
|
||||||
|
],
|
||||||
|
startPoint: .bottom,
|
||||||
|
endPoint: .top
|
||||||
|
)
|
||||||
|
.shadow(color: .black, radius: 4, x: 0, y: 2)
|
||||||
)
|
)
|
||||||
.shadow(color: .black, radius: 4, x: 0, y: 2)
|
}
|
||||||
)
|
.frame(width: cellWidth)
|
||||||
}
|
}
|
||||||
.frame(width: cellWidth)
|
.clipShape(RoundedRectangle(cornerRadius: 12))
|
||||||
|
.padding(4)
|
||||||
}
|
}
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
|
||||||
.padding(4)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.top)
|
||||||
|
.padding()
|
||||||
}
|
}
|
||||||
.padding(.top)
|
.navigationViewStyle(StackNavigationViewStyle())
|
||||||
.padding()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue