-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import SwiftUI | ||
import Kingfisher | ||
|
||
struct AlbumView: View { | ||
var album: ArtistAlbum | ||
|
||
var body: some View { | ||
GeometryReader { _ in | ||
ScrollView { | ||
GeometryReader { geometry in | ||
ZStack { | ||
if geometry.frame(in: .global).minY <= 0 { | ||
KFImage.url(URL(string: !self.album.image.isEmpty ? self.album.image[0].url : "https://www.nme.com/wp-content/uploads/2021/04/twice-betterconceptphoto-2020.jpg")!) | ||
.resizable() | ||
.loadImmediately() | ||
.aspectRatio(contentMode: .fill) | ||
.overlay(TintOverlayView().opacity(0.2)) | ||
.frame(width: geometry.size.width, height: geometry.size.height) | ||
.offset(y: geometry.frame(in: .global).minY/9) | ||
.clipped() | ||
} else { | ||
KFImage.url(URL(string: !self.album.image.isEmpty ? self.album.image[0].url : "https://www.nme.com/wp-content/uploads/2021/04/twice-betterconceptphoto-2020.jpg")!) | ||
.resizable() | ||
.loadImmediately() | ||
.aspectRatio(contentMode: .fill) | ||
.overlay(TintOverlayView().opacity(0.2)) | ||
.frame(width: geometry.size.width, height: geometry.size.height + geometry.frame(in: .global).minY) | ||
.clipped() | ||
.offset(y: -geometry.frame(in: .global).minY) | ||
} | ||
} | ||
}.frame(height: 300) | ||
|
||
HStack { | ||
VStack { | ||
Text("Scrobbles") | ||
Text("50k") | ||
} | ||
VStack { | ||
Text("Listeners") | ||
Text("52k") | ||
} | ||
}.offset(y: -50) | ||
HStack { | ||
Text("tag") | ||
Text("tag") | ||
Text("tag") | ||
Text("tag") | ||
} | ||
Text("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.") | ||
Divider() | ||
Text("[img] Artist ->") | ||
Divider() | ||
Text("Tracklist") | ||
Text("1 Rolling") | ||
Text("2 Memory") | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters