diff options
author | Shav Kinderlehrer <[email protected]> | 2023-12-24 20:01:52 -0500 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-12-24 20:01:52 -0500 |
commit | 69bed7745833add72cfe1b1516a61f62460b1765 (patch) | |
tree | 373d6a63cfa3d79b5fce59091822bfe7748bcab9 /Jel/Views/Library/Item/ItemHeaderView.swift | |
parent | 9da269a6ab44869e41a8b005836c3479424ae538 (diff) | |
download | jel-69bed7745833add72cfe1b1516a61f62460b1765.tar.gz jel-69bed7745833add72cfe1b1516a61f62460b1765.zip |
Implement movieDetailView
Diffstat (limited to 'Jel/Views/Library/Item/ItemHeaderView.swift')
-rw-r--r-- | Jel/Views/Library/Item/ItemHeaderView.swift | 42 |
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) } } } |