diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift index f6b87b670..22296c679 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift @@ -39,18 +39,19 @@ struct GridCardNavigationLink: View { @ObservedObject var viewModel: HomeFeedViewModel var body: some View { - NavigationLink( - destination: LinkItemDetailView(viewModel: LinkItemDetailViewModel(item: item)), - tag: item, - selection: $selectedLinkItem - ) { - EmptyView() + ZStack { + NavigationLink( + destination: LinkItemDetailView(viewModel: LinkItemDetailViewModel(item: item)), + tag: item, + selection: $selectedLinkItem + ) { + GridCard(item: item) + } +// .opacity(0) +// .buttonStyle(PlainButtonStyle()) + .onAppear { + viewModel.itemAppeared(item: item, searchQuery: searchQuery, dataService: dataService) + } } - .opacity(0) - .buttonStyle(PlainButtonStyle()) - .onAppear { - viewModel.itemAppeared(item: item, searchQuery: searchQuery, dataService: dataService) - } - GridCard(item: item) } } diff --git a/apple/OmnivoreKit/Sources/Views/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/HomeFeedCardView.swift index e48d3d4ca..d0674fa62 100644 --- a/apple/OmnivoreKit/Sources/Views/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/HomeFeedCardView.swift @@ -57,42 +57,71 @@ public struct GridCard: View { } public var body: some View { - HStack(alignment: .top, spacing: 6) { - VStack(alignment: .leading, spacing: 6) { - Text(item.title) - .font(.appSubheadline) - .foregroundColor(.appGrayTextContrast) - .lineLimit(2) - .frame(maxWidth: .infinity, alignment: .leading) + VStack(alignment: .leading, spacing: 16) { + // Progress Bar + ProgressView(value: Double.random(in: 0 ... 1)) + .foregroundColor(.appYellow48) + .frame(maxWidth: .infinity, alignment: .leading) - if let author = item.author { - Text("By \(author)") - .font(.appCaption) - .foregroundColor(.appGrayText) + // Title, Subtitle, Menu Button + VStack(alignment: .leading, spacing: 6) { + HStack { + Text(item.title) + .font(.appSubheadline) + .foregroundColor(.appGrayTextContrast) .lineLimit(1) + Spacer() + Button( + action: { print("grid button tapped") }, + label: { Image.profile } + ) } - if let publisherURL = item.publisherHostname { - Text(publisherURL) - .font(.appCaption) - .foregroundColor(.appGrayText) - .underline() - .lineLimit(1) + HStack { + if let author = item.author { + Text("by \(author)") + .font(.appCaption) + .foregroundColor(.appGrayText) + .lineLimit(1) + } + + if let publisherURL = item.publisherHostname { + Text(publisherURL) + .font(.appCaption) + .foregroundColor(.appGrayText) + .underline() + .lineLimit(1) + } + + Spacer() } } - .frame(maxWidth: .infinity) - .multilineTextAlignment(.leading) - .padding(0) + .frame(height: 40) + + // Description, Image + HStack { + Text(item.description ?? "No description") + .font(.appSubheadline) + .foregroundColor(.appGrayTextContrast) + .lineLimit(nil) + + Spacer() - Group { if let imageURL = item.imageURL { AsyncImage(url: imageURL, isResizable: true) .aspectRatio(1, contentMode: .fill) - .frame(width: 80, height: 80) + .frame(width: 135, height: 90) .cornerRadius(6) } } + .frame(height: 140) + + // Labels + HStack { + Text("Label 1") + Text("Label 2") + Spacer() + } } - .frame(maxWidth: .infinity, minHeight: 100, idealHeight: 100, maxHeight: 100) } }