diff --git a/PodcastsClone.xcodeproj/project.pbxproj b/PodcastsClone.xcodeproj/project.pbxproj index 785790c..37537e3 100644 --- a/PodcastsClone.xcodeproj/project.pbxproj +++ b/PodcastsClone.xcodeproj/project.pbxproj @@ -10,6 +10,8 @@ EC37FB2A2A1A3231005C78D6 /* Episode.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC37FB292A1A3231005C78D6 /* Episode.swift */; }; EC37FB2C2A1A3E03005C78D6 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC37FB2B2A1A3E03005C78D6 /* Color.swift */; }; EC37FB322A1A49EB005C78D6 /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC37FB312A1A49EB005C78D6 /* Strings.swift */; }; + EC48FBBA2A1A826800CD7B83 /* PodcastViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC48FBB92A1A826800CD7B83 /* PodcastViewCell.swift */; }; + EC48FBBC2A1A890D00CD7B83 /* Stub.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC48FBBB2A1A890D00CD7B83 /* Stub.swift */; }; EC8CF6202A13A4F200BE6FD5 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC8CF61F2A13A4F200BE6FD5 /* Colors.xcassets */; }; EC8CF6232A13A59400BE6FD5 /* LibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */; }; EC8CF6252A13A7F000BE6FD5 /* Podcast.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8CF6242A13A7F000BE6FD5 /* Podcast.swift */; }; @@ -25,6 +27,8 @@ EC37FB292A1A3231005C78D6 /* Episode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Episode.swift; sourceTree = ""; }; EC37FB2B2A1A3E03005C78D6 /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; EC37FB312A1A49EB005C78D6 /* Strings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = ""; }; + EC48FBB92A1A826800CD7B83 /* PodcastViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodcastViewCell.swift; sourceTree = ""; }; + EC48FBBB2A1A890D00CD7B83 /* Stub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stub.swift; sourceTree = ""; }; EC8CF61F2A13A4F200BE6FD5 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryView.swift; sourceTree = ""; }; EC8CF6242A13A7F000BE6FD5 /* Podcast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Podcast.swift; sourceTree = ""; }; @@ -64,6 +68,39 @@ path = Strings; sourceTree = ""; }; + EC48FBBD2A1A93C300CD7B83 /* Podcast */ = { + isa = PBXGroup; + children = ( + ECB23BA22A0E455300A1C62B /* PodcastDetailView.swift */, + EC48FBB92A1A826800CD7B83 /* PodcastViewCell.swift */, + ); + path = Podcast; + sourceTree = ""; + }; + EC48FBBE2A1A93EB00CD7B83 /* Episode */ = { + isa = PBXGroup; + children = ( + ECB23BA52A0E4C0B00A1C62B /* EpisodeViewCell.swift */, + ); + path = Episode; + sourceTree = ""; + }; + EC48FBBF2A1A93F600CD7B83 /* Library */ = { + isa = PBXGroup; + children = ( + EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */, + ); + path = Library; + sourceTree = ""; + }; + EC48FBC02A1A93FF00CD7B83 /* Stubs */ = { + isa = PBXGroup; + children = ( + EC48FBBB2A1A890D00CD7B83 /* Stub.swift */, + ); + path = Stubs; + sourceTree = ""; + }; EC8CF6212A13A57400BE6FD5 /* Model */ = { isa = PBXGroup; children = ( @@ -113,12 +150,13 @@ ECB23BA42A0E45CC00A1C62B /* View */ = { isa = PBXGroup; children = ( - EC37FB2D2A1A3FA4005C78D6 /* Extensions */, EC37FB2E2A1A4941005C78D6 /* Strings */, + EC37FB2D2A1A3FA4005C78D6 /* Extensions */, + EC48FBC02A1A93FF00CD7B83 /* Stubs */, + EC48FBBF2A1A93F600CD7B83 /* Library */, + EC48FBBE2A1A93EB00CD7B83 /* Episode */, + EC48FBBD2A1A93C300CD7B83 /* Podcast */, ECB23BA02A0E3FDF00A1C62B /* MainView.swift */, - ECB23BA22A0E455300A1C62B /* PodcastDetailView.swift */, - ECB23BA52A0E4C0B00A1C62B /* EpisodeViewCell.swift */, - EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */, ); path = View; sourceTree = ""; @@ -195,6 +233,8 @@ buildActionMask = 2147483647; files = ( ECB23BA12A0E3FDF00A1C62B /* MainView.swift in Sources */, + EC48FBBC2A1A890D00CD7B83 /* Stub.swift in Sources */, + EC48FBBA2A1A826800CD7B83 /* PodcastViewCell.swift in Sources */, EC37FB322A1A49EB005C78D6 /* Strings.swift in Sources */, EC37FB2A2A1A3231005C78D6 /* Episode.swift in Sources */, ECB23BA62A0E4C0B00A1C62B /* EpisodeViewCell.swift in Sources */, diff --git a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/Contents.json b/PodcastsClone/Assets.xcassets/bdnp_logo.imageset/Contents.json similarity index 69% rename from PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/Contents.json rename to PodcastsClone/Assets.xcassets/bdnp_logo.imageset/Contents.json index ab3c669..b428999 100644 --- a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/Contents.json +++ b/PodcastsClone/Assets.xcassets/bdnp_logo.imageset/Contents.json @@ -1,17 +1,15 @@ { "images" : [ { - "filename" : "maxfun_logo.png", + "filename" : "beefdairysquare_36.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "maxfun_logo 1.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "maxfun_logo 2.png", "idiom" : "universal", "scale" : "3x" } diff --git a/PodcastsClone/Assets.xcassets/bdnp_logo.imageset/beefdairysquare_36.png b/PodcastsClone/Assets.xcassets/bdnp_logo.imageset/beefdairysquare_36.png new file mode 100644 index 0000000..da2749b Binary files /dev/null and b/PodcastsClone/Assets.xcassets/bdnp_logo.imageset/beefdairysquare_36.png differ diff --git a/PodcastsClone/Assets.xcassets/bewjt_logo.imageset/Contents.json b/PodcastsClone/Assets.xcassets/bewjt_logo.imageset/Contents.json new file mode 100644 index 0000000..5b0a5b9 --- /dev/null +++ b/PodcastsClone/Assets.xcassets/bewjt_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "bullseye-cover2-1024x1024.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PodcastsClone/Assets.xcassets/bewjt_logo.imageset/bullseye-cover2-1024x1024.jpg b/PodcastsClone/Assets.xcassets/bewjt_logo.imageset/bullseye-cover2-1024x1024.jpg new file mode 100644 index 0000000..2b53de3 Binary files /dev/null and b/PodcastsClone/Assets.xcassets/bewjt_logo.imageset/bullseye-cover2-1024x1024.jpg differ diff --git a/PodcastsClone/Assets.xcassets/dgs_logo.imageset/Contents.json b/PodcastsClone/Assets.xcassets/dgs_logo.imageset/Contents.json new file mode 100644 index 0000000..9bf8707 --- /dev/null +++ b/PodcastsClone/Assets.xcassets/dgs_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DGS-podcastArt.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PodcastsClone/Assets.xcassets/dgs_logo.imageset/DGS-podcastArt.png b/PodcastsClone/Assets.xcassets/dgs_logo.imageset/DGS-podcastArt.png new file mode 100644 index 0000000..120eb9b Binary files /dev/null and b/PodcastsClone/Assets.xcassets/dgs_logo.imageset/DGS-podcastArt.png differ diff --git a/PodcastsClone/Assets.xcassets/jjgo_logo.imageset/Contents.json b/PodcastsClone/Assets.xcassets/jjgo_logo.imageset/Contents.json new file mode 100644 index 0000000..cc17d95 --- /dev/null +++ b/PodcastsClone/Assets.xcassets/jjgo_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "jjgo_logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PodcastsClone/Assets.xcassets/jjgo_logo.imageset/jjgo_logo.png b/PodcastsClone/Assets.xcassets/jjgo_logo.imageset/jjgo_logo.png new file mode 100644 index 0000000..ed55f65 Binary files /dev/null and b/PodcastsClone/Assets.xcassets/jjgo_logo.imageset/jjgo_logo.png differ diff --git a/PodcastsClone/Assets.xcassets/jjho_logo.imageset/Contents.json b/PodcastsClone/Assets.xcassets/jjho_logo.imageset/Contents.json new file mode 100644 index 0000000..324835e --- /dev/null +++ b/PodcastsClone/Assets.xcassets/jjho_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Screenshot 2023-05-21 at 18.58.17.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PodcastsClone/Assets.xcassets/jjho_logo.imageset/Screenshot 2023-05-21 at 18.58.17.png b/PodcastsClone/Assets.xcassets/jjho_logo.imageset/Screenshot 2023-05-21 at 18.58.17.png new file mode 100644 index 0000000..1855be3 Binary files /dev/null and b/PodcastsClone/Assets.xcassets/jjho_logo.imageset/Screenshot 2023-05-21 at 18.58.17.png differ diff --git a/PodcastsClone/Assets.xcassets/onrac_logo.imageset/Contents.json b/PodcastsClone/Assets.xcassets/onrac_logo.imageset/Contents.json new file mode 100644 index 0000000..efa58c7 --- /dev/null +++ b/PodcastsClone/Assets.xcassets/onrac_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "oh-no-ross-and-carrie-cover-1024x1024.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PodcastsClone/Assets.xcassets/onrac_logo.imageset/oh-no-ross-and-carrie-cover-1024x1024.jpg b/PodcastsClone/Assets.xcassets/onrac_logo.imageset/oh-no-ross-and-carrie-cover-1024x1024.jpg new file mode 100644 index 0000000..f505b09 Binary files /dev/null and b/PodcastsClone/Assets.xcassets/onrac_logo.imageset/oh-no-ross-and-carrie-cover-1024x1024.jpg differ diff --git a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo 1.png b/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo 1.png deleted file mode 100644 index 2467dff..0000000 Binary files a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo 1.png and /dev/null differ diff --git a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo 2.png b/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo 2.png deleted file mode 100644 index 2467dff..0000000 Binary files a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo 2.png and /dev/null differ diff --git a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo.png b/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo.png deleted file mode 100644 index 2467dff..0000000 Binary files a/PodcastsClone/Assets.xcassets/podcast_logo_1.imageset/maxfun_logo.png and /dev/null differ diff --git a/PodcastsClone/Assets.xcassets/spy_logo.imageset/Contents.json b/PodcastsClone/Assets.xcassets/spy_logo.imageset/Contents.json new file mode 100644 index 0000000..d39a2a6 --- /dev/null +++ b/PodcastsClone/Assets.xcassets/spy_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "spy_logo.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PodcastsClone/Assets.xcassets/spy_logo.imageset/spy_logo.jpg b/PodcastsClone/Assets.xcassets/spy_logo.imageset/spy_logo.jpg new file mode 100644 index 0000000..7371de6 Binary files /dev/null and b/PodcastsClone/Assets.xcassets/spy_logo.imageset/spy_logo.jpg differ diff --git a/PodcastsClone/Colors.xcassets/backgroundSecondary.colorset/Contents.json b/PodcastsClone/Colors.xcassets/backgroundSecondary.colorset/Contents.json index b09c324..8f5067f 100644 --- a/PodcastsClone/Colors.xcassets/backgroundSecondary.colorset/Contents.json +++ b/PodcastsClone/Colors.xcassets/backgroundSecondary.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.650", - "green" : "0.650", - "red" : "0.650" + "blue" : "0.250", + "green" : "0.250", + "red" : "0.250" } }, "idiom" : "universal" diff --git a/PodcastsClone/View/EpisodeViewCell.swift b/PodcastsClone/View/Episode/EpisodeViewCell.swift similarity index 84% rename from PodcastsClone/View/EpisodeViewCell.swift rename to PodcastsClone/View/Episode/EpisodeViewCell.swift index 009ef32..89e05a1 100644 --- a/PodcastsClone/View/EpisodeViewCell.swift +++ b/PodcastsClone/View/Episode/EpisodeViewCell.swift @@ -78,12 +78,6 @@ struct EpisodeViewCell: View { struct EpisodeViewCell_Previews: PreviewProvider { static var previews: some View { - EpisodeViewCell(episode: Episode( - id: UUID(), - publicationDate: Date.now, - title: "Episode title and stuff -- what it's about, who's in it, all sorts of things can end up in this title. To us, it's a string", - description: "This is a great episode. The description kinda goes on and on and on and on and on and on and on and on.", - duration: 4000 - )) + EpisodeViewCell(episode: Stub.episodes[1]) } } diff --git a/PodcastsClone/View/Library/LibraryView.swift b/PodcastsClone/View/Library/LibraryView.swift new file mode 100644 index 0000000..98c350e --- /dev/null +++ b/PodcastsClone/View/Library/LibraryView.swift @@ -0,0 +1,49 @@ +// +// LibraryView.swift +// PodcastsClone +// +// Created by etudiant on 2023-05-16. +// + +import SwiftUI + +struct LibraryView: View { + + var podcasts: [Podcast] + + var body: some View { + NavigationView { + ScrollView { + VStack(alignment: .leading) { + Text("Podcasts") + .font(.largeTitle) + .fontWeight(.bold) + .foregroundColor(Color.theme.primary) + .padding() + + let columns = [ + GridItem(.flexible(), spacing: 16), + GridItem(.flexible(), spacing: 16) + ] + + LazyVGrid(columns: columns, spacing: 16) { + ForEach(podcasts, id: \.id) { podcast in + NavigationLink( + destination: PodcastDetailView(podcast: podcast)) { + PodcastViewCell(podcast: podcast) + } + } + } + .padding(.horizontal) + } + } + } + .navigationViewStyle(StackNavigationViewStyle()) + } +} + +struct LibraryView_Previews: PreviewProvider { + static var previews: some View { + LibraryView(podcasts: Stub.podcasts) + } +} diff --git a/PodcastsClone/View/LibraryView.swift b/PodcastsClone/View/LibraryView.swift deleted file mode 100644 index f4dce47..0000000 --- a/PodcastsClone/View/LibraryView.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// LibraryView.swift -// PodcastsClone -// -// Created by etudiant on 2023-05-16. -// -/* -import SwiftUI - - - - -struct LibraryView: View { - // some random stuff - var podcasts = - [ - Podcast(id: 0), - Podcast(id: 1), - Podcast(id: 2) - ]; - - var body: some View { - NavigationStack{ - List(podcasts, id: \.id) { currentPodcast in - //PodcastDetailView(podcast: currentPodcast) - PodcastDetailView() - } - } - } -} - -struct LibraryView_Previews: PreviewProvider { - static var previews: some View { - LibraryView() - } -} -*/ diff --git a/PodcastsClone/View/MainView.swift b/PodcastsClone/View/MainView.swift index f8ca36e..3e2fd1a 100644 --- a/PodcastsClone/View/MainView.swift +++ b/PodcastsClone/View/MainView.swift @@ -18,7 +18,7 @@ struct MainView: View { .tabItem { Label("Browse", systemImage: "square.grid.2x2") } - Text("Library") + LibraryView(podcasts: Stub.podcasts) .tabItem { Label("Library", systemImage: "book") } diff --git a/PodcastsClone/View/PodcastDetailView.swift b/PodcastsClone/View/Podcast/PodcastDetailView.swift similarity index 62% rename from PodcastsClone/View/PodcastDetailView.swift rename to PodcastsClone/View/Podcast/PodcastDetailView.swift index 657e8df..0c0166c 100644 --- a/PodcastsClone/View/PodcastDetailView.swift +++ b/PodcastsClone/View/Podcast/PodcastDetailView.swift @@ -23,7 +23,7 @@ struct PodcastDetailView: View { Image(uiImage: podcast.image) .resizable() .scaledToFit() - .cornerRadius(10) + .cornerRadius(12) .shadow(color: Color.theme.shadow, radius: 10, x: 0, y: 10) .padding(.horizontal, 48) .padding(.vertical, 16) @@ -46,7 +46,8 @@ struct PodcastDetailView: View { .foregroundColor(Color.theme.primary) .padding(.vertical) .padding(.horizontal, 64) - .background(Color.theme.background) + .background(Color.theme.backgroundSecondary) + .foregroundColor(Color.theme.primary) .clipShape(RoundedRectangle(cornerSize: CGSize(width: 12.0, height: 12.0))) // TODO replace '...' with Strings.readFurtherPrompt @@ -90,37 +91,6 @@ struct PodcastDetailView: View { struct PodcastDetailView_Previews: PreviewProvider { static var previews: some View { - PodcastDetailView(podcast: Podcast( - id: UUID(), - image: UIImage(named: "podcast_logo_1")!, - title: "Podcast Title 1", - by: "Author 1", - episodes: [ - Episode( - id: UUID(), - publicationDate: Date.now.addingTimeInterval(-1000000), - title: "A New Ipsum", - description: "Stand in doorway, unwilling to chose whether to stay in or go out more napping, more napping all the napping is exhausting sleep i'm bored inside, let me out i'm lonely outside, let me in i can't make up my mind whether to go in or out, guess i'll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense!", - duration: 3463 - ), - Episode( - id: UUID(), - publicationDate: Date.now, - title: "Return of the Hooman", - description: "Catch mouse and gave it as a present mewl for food at 4am drink water out of the faucet and have secret plans. Stretch chase dog then run away. Kitty. Mouse if it fits, i sits. Bite off human's toes. If human is on laptop sit on the keyboard.", - duration: 4480 - ), - Episode( - id: UUID(), - publicationDate: Date.now.addingTimeInterval(-100000), - title: "Cat Ipsum Strikes Back", - description: "Chase after silly colored fish toys around the house i want to go outside let me go outside nevermind inside is better or get video posted to internet for chasing red dot eat owner's food wack the mini furry mouse so cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog but stuff and things. Cats making all the muffins.", - duration: 4028 - ), - ], - rating: 4.2, - reviews: 2139, - genre: "Genre 1" - )) + PodcastDetailView(podcast: Stub.podcasts[0]) } } diff --git a/PodcastsClone/View/Podcast/PodcastViewCell.swift b/PodcastsClone/View/Podcast/PodcastViewCell.swift new file mode 100644 index 0000000..139f2ff --- /dev/null +++ b/PodcastsClone/View/Podcast/PodcastViewCell.swift @@ -0,0 +1,38 @@ +// +// PodcastViewCell.swift +// PodcastsClone +// +// Created by etudiant on 2023-05-21. +// + +import SwiftUI + +struct PodcastViewCell: View { + let podcast: Podcast + + var body: some View { + VStack(alignment: .leading) { + Image(uiImage: podcast.image) + .resizable() + .scaledToFit() + .cornerRadius(12) + + Text(podcast.title) + .foregroundColor(Color.theme.primary) + + // TODO display relative date more smartly + // TODAY + // 1-6D AGO + // 14 MAY (no year if same year as now) + Text("Updated \(podcast.episodes.first?.publicationDate ?? Date(), style: .relative) ago") + .foregroundColor(Color.theme.secondary) + .font(.footnote) + } + } +} + +struct PodcastViewCell_Previews: PreviewProvider { + static var previews: some View { + PodcastViewCell(podcast: Stub.podcasts[0]) + } +} diff --git a/PodcastsClone/View/Stubs/Stub.swift b/PodcastsClone/View/Stubs/Stub.swift new file mode 100644 index 0000000..8761b72 --- /dev/null +++ b/PodcastsClone/View/Stubs/Stub.swift @@ -0,0 +1,108 @@ +// +// Stub.swift +// PodcastsClone +// +// Created by etudiant on 2023-05-21. +// + +import Foundation +import SwiftUI + +struct Stub { + static let episodes: [Episode] = [ + Episode( + id: UUID(), + publicationDate: Date.now.addingTimeInterval(-10000000), + title: "A New Ipsum", + description: "Stand in doorway, unwilling to chose whether to stay in or go out more napping, more napping all the napping is exhausting sleep i'm bored inside, let me out i'm lonely outside, let me in i can't make up my mind whether to go in or out, guess i'll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense!", + duration: 3463 + ), + Episode( + id: UUID(), + publicationDate: Date.now.addingTimeInterval(-100000), + title: "Return of the Hooman", + description: "Catch mouse and gave it as a present mewl for food at 4am drink water out of the faucet and have secret plans. Stretch chase dog then run away. Kitty. Mouse if it fits, i sits. Bite off human's toes. If human is on laptop sit on the keyboard.", + duration: 4480 + ), + Episode( + id: UUID(), + publicationDate: Date.now.addingTimeInterval(-1000000), + title: "Cat Ipsum Strikes Back", + description: "Chase after silly colored fish toys around the house i want to go outside let me go outside nevermind inside is better or get video posted to internet for chasing red dot eat owner's food wack the mini furry mouse so cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog but stuff and things. Cats making all the muffins.", + duration: 4028 + ), + ] + + static let podcasts: [Podcast] = [ + Podcast( + id: UUID(), + image: UIImage(named: "jjho_logo")!, + title: "Podcast Title 1", + by: "Author 1", + episodes: episodes, + rating: 4.2, + reviews: 2139, + genre: "Genre 1" + ), + Podcast( + id: UUID(), + image: UIImage(named: "jjgo_logo")!, + title: "Podcast Title 2", + by: "Author 2", + episodes: episodes, + rating: 4.2, + reviews: 211, + genre: "Genre 2" + ), + Podcast( + id: UUID(), + image: UIImage(named: "spy_logo")!, + title: "Podcast Title 3", + by: "Author 3", + episodes: episodes, + rating: 4.812039, + reviews: 3981, + genre: "Genre 3" + ), + Podcast( + id: UUID(), + image: UIImage(named: "bdnp_logo")!, + title: "Podcast Title 4", + by: "Author 4", + episodes: episodes, + rating: 4.2, + reviews: 211, + genre: "Genre 4" + ), + Podcast( + id: UUID(), + image: UIImage(named: "bewjt_logo")!, + title: "Podcast Title 5", + by: "Author 5", + episodes: episodes, + rating: 4.2, + reviews: 211, + genre: "Genre 5" + ), + Podcast( + id: UUID(), + image: UIImage(named: "onrac_logo")!, + title: "Podcast Title 6", + by: "Author 6", + episodes: episodes, + rating: 4.2, + reviews: 211, + genre: "Genre 6" + ), + Podcast( + id: UUID(), + image: UIImage(named: "dgs_logo")!, + title: "Podcast Title 7", + by: "Author 7", + episodes: episodes, + rating: 4.2, + reviews: 211, + genre: "Genre 7" + ), + ] +}