summaryrefslogtreecommitdiff
path: root/Jel/Views/Library/Item/ItemHeaderView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Jel/Views/Library/Item/ItemHeaderView.swift')
-rw-r--r--Jel/Views/Library/Item/ItemHeaderView.swift42
1 files changed, 25 insertions, 17 deletions
diff --git a/Jel/Views/Library/Item/ItemHeaderView.swift b/Jel/Views/Library/Item/ItemHeaderView.swift
index d694c13..2c11719 100644
--- a/Jel/Views/Library/Item/ItemHeaderView.swift
+++ b/Jel/Views/Library/Item/ItemHeaderView.swift
@@ -13,35 +13,43 @@ struct ItemHeaderView: View {
let overlayGradient = LinearGradient(gradient: Gradient(stops: [
.init(color: .clear, location: 0),
- .init(color: .black, location: 0.3),
- .init(color: .black, location: 0.7),
-
- .init(color: .clear, location: 1)
+ .init(color: .black, location: 0.5),
+ // .init(color: .black, location: 0.7),
+ // .init(color: .clear, location: 1)
]), startPoint: .bottom, endPoint: .top)
var body: some View {
ZStack(alignment: .bottom) {
- LibraryIconView(library: item, imageType: "Backdrop", contentMode: .fill)
- .hideCaption()
- .setCornerRadius(0)
- .mask(overlayGradient)
-// .padding(.top, 50)
- .background {
- LibraryIconView(library: item, imageType: "Backdrop", contentMode: .fill)
- .hideCaption()
- .setCornerRadius(0)
- .blur(radius: 50)
- }
+ StickyHeaderView(minHeight: 300) {
+ LibraryIconView(library: item, imageType: "Backdrop", contentMode: .fill)
+ .hideCaption()
+ .setCornerRadius(0)
+ .mask(overlayGradient)
+ .background {
+ LibraryIconView(library: item, imageType: "Backdrop", contentMode: .fill)
+ .hideCaption()
+ .setCornerRadius(0)
+ .blur(radius: 50)
+ }
+ }
HStack {
LibraryIconView(library: item, imageType: "Logo", width: 200, height: 100, placeHolder: AnyView(Text(item.name ?? "Unknown").font(.title).bold().truncationMode(.middle)))
.hideCaption()
.setCornerRadius(0)
.shadow(radius: 10)
+ .frame(alignment: .leading)
Spacer()
+ ItemInfoView(item: item)
+ .foregroundStyle(.white)
}
- .frame(alignment: .leading)
- .padding(.leading)
+ .padding([.leading, .trailing])
+ }
+ .scrollTransition {content, phase in
+ content
+ .scaleEffect(phase.isIdentity ? 1 : 2)
+ .opacity(phase.isIdentity ? 1 : 0.1)
+ .blur(radius: phase.isIdentity ? 0 : 50)
}
}
}