diff --git a/mlbTVOS/Views/FeaturedGameCard.swift b/mlbTVOS/Views/FeaturedGameCard.swift index c48f3d3..80e91a3 100644 --- a/mlbTVOS/Views/FeaturedGameCard.swift +++ b/mlbTVOS/Views/FeaturedGameCard.swift @@ -15,8 +15,19 @@ struct FeaturedGameCard: View { return parts.count > 1 ? parts.last : nil } - private var stadiumImageURL: URL? { - TeamAssets.stadiumURL(for: game.homeTeam.code) + private var heroImageURL: URL? { + // Prefer pitcher action hero photo — big, dramatic, like a cast photo + if let pitcherId = game.homePitcherId { + return URL(string: "https://img.mlbstatic.com/mlb-photos/image/upload/w_1200,q_auto:best/v1/people/\(pitcherId)/action/hero/current") + } + if let pitcherId = game.awayPitcherId { + return URL(string: "https://img.mlbstatic.com/mlb-photos/image/upload/w_1200,q_auto:best/v1/people/\(pitcherId)/action/hero/current") + } + // Fall back to large team logo + if let teamId = game.homeTeam.teamId { + return URL(string: "https://midfield.mlbstatic.com/v1/team/\(teamId)/spots/800") + } + return nil } var body: some View { @@ -29,7 +40,7 @@ struct FeaturedGameCard: View { HStack(spacing: 0) { Spacer() ZStack(alignment: .leading) { - stadiumImage + heroImage .frame(width: imageWidth) // White fade from left edge of image @@ -227,8 +238,8 @@ struct FeaturedGameCard: View { // MARK: - Stadium Image @ViewBuilder - private var stadiumImage: some View { - if let url = stadiumImageURL { + private var heroImage: some View { + if let url = heroImageURL { AsyncImage(url: url) { phase in switch phase { case .success(let image): @@ -249,17 +260,25 @@ struct FeaturedGameCard: View { @ViewBuilder private var fallbackImage: some View { ZStack { + // Rich team color gradient LinearGradient( - colors: [awayColor.opacity(0.15), homeColor.opacity(0.15)], - startPoint: .leading, - endPoint: .trailing + colors: [ + awayColor.opacity(0.4), + homeColor.opacity(0.6), + ], + startPoint: .topLeading, + endPoint: .bottomTrailing ) + // Large prominent team logos HStack(spacing: fallbackLogoGap) { TeamLogoView(team: game.awayTeam, size: fallbackLogoSize) - .opacity(0.4) + .shadow(color: .black.opacity(0.2), radius: 12, y: 4) + Text("vs") + .font(.system(size: fallbackLogoSize * 0.3, weight: .light)) + .foregroundStyle(.white.opacity(0.5)) TeamLogoView(team: game.homeTeam, size: fallbackLogoSize) - .opacity(0.4) + .shadow(color: .black.opacity(0.2), radius: 12, y: 4) } } }