@ -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"
|
||||
}
|
After Width: | Height: | Size: 12 KiB |
@ -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
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 26 KiB |
@ -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
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 31 KiB |
@ -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
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 179 KiB |
@ -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
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 271 KiB |
@ -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
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 74 KiB |
@ -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
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 40 KiB |
@ -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)
|
||||
}
|
||||
}
|
@ -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()
|
||||
}
|
||||
}
|
||||
*/
|
@ -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])
|
||||
}
|
||||
}
|
@ -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"
|
||||
),
|
||||
]
|
||||
}
|