From 0335fb2b43373069248bb53f0d8042a568cd2147 Mon Sep 17 00:00:00 2001 From: Justin Walrath Date: Mon, 12 May 2025 10:12:16 -0400 Subject: [PATCH] Fixed some card styling so episode description can grow/shrink and show all the content. Added a footer --- src/app/[stream]/podcasts/podcastCard.tsx | 18 ++++++++++++++++-- src/app/layout/main.tsx | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app/[stream]/podcasts/podcastCard.tsx b/src/app/[stream]/podcasts/podcastCard.tsx index 9deb4f9..922579f 100644 --- a/src/app/[stream]/podcasts/podcastCard.tsx +++ b/src/app/[stream]/podcasts/podcastCard.tsx @@ -1,5 +1,6 @@ import Image from 'next/image'; import { PodcastDto } from '../../../common/dtos/podcastDto'; +import { useState } from 'react'; export default function PodcastCard({ imageUrl = "https://placehold.co/400", @@ -9,15 +10,28 @@ export default function PodcastCard({ url, author, }: PodcastDto) { + const [descriptionExpanded, setDescriptionExpanded] = useState(false), + toggleExpand = () => { + setDescriptionExpanded(!descriptionExpanded); + }; + return ( -
+
{title

{title}

-

{description}

+
+ {description} +
+

By: {author}

Uploaded: {uploadDate}

diff --git a/src/app/layout/main.tsx b/src/app/layout/main.tsx index e8204f9..d29de85 100644 --- a/src/app/layout/main.tsx +++ b/src/app/layout/main.tsx @@ -21,6 +21,9 @@ export default function Main({ children }: MainProps) {
{children}
+
) } \ No newline at end of file