From 754b086ee5bd54b35cbccca91ef7ebcd58e922ac Mon Sep 17 00:00:00 2001 From: Dilson's Pickles Date: Tue, 5 Sep 2023 15:59:21 +1000 Subject: [PATCH] Tidy up blog posts and blog cards --- src/components/card/BlogListingCard.astro | 5 ++- src/components/card/BlogPostCard.astro | 21 +++++++------ src/components/card/DownloadCard.astro | 35 --------------------- src/components/card/DownloadCard.jsx | 30 ++++++++++++++++++ src/layouts/DownloadPageLayout.astro | 3 +- src/pages/posts/audacity-3.3.md | 2 +- src/pages/posts/audacity-3.4-timestretch.md | 2 +- src/pages/posts/our-new-site.md | 2 +- 8 files changed, 51 insertions(+), 49 deletions(-) delete mode 100644 src/components/card/DownloadCard.astro create mode 100644 src/components/card/DownloadCard.jsx diff --git a/src/components/card/BlogListingCard.astro b/src/components/card/BlogListingCard.astro index bf1ccc4..19c5f16 100644 --- a/src/components/card/BlogListingCard.astro +++ b/src/components/card/BlogListingCard.astro @@ -25,8 +25,11 @@ const { title, description, href, thumbnail, author, date } = {date}

- {title.slice(0, 100)}... + {title.length > 100 ? title.slice(0, 100) + `...` : title}

+

+ {description.length > 100 ? description.slice(0, 100) + `...` : description} +

diff --git a/src/components/card/BlogPostCard.astro b/src/components/card/BlogPostCard.astro index 4b53c8d..1f700dd 100644 --- a/src/components/card/BlogPostCard.astro +++ b/src/components/card/BlogPostCard.astro @@ -12,25 +12,28 @@ const { title, description, href, thumbnail, author, date } = --- -
-
+
+
-

+ {date} + +

+ {title.length > 100 ? title.slice(0, 100) + `...` : title} +

+

+ {description}

-

- {title} -

-

Read more

+
diff --git a/src/components/card/DownloadCard.astro b/src/components/card/DownloadCard.astro deleted file mode 100644 index 145f413..0000000 --- a/src/components/card/DownloadCard.astro +++ /dev/null @@ -1,35 +0,0 @@ ---- -interface Props { - title: string; - checkum: string; - buttonText: string; - downloadURL: string; - downloadType: string; -} -const { title, checksum, buttonText, downloadURL, downloadType } = - Astro.props as Props; ---- - -
- - - { - checksum && ( -
- -
- {checksum} -
-
- ) - } -
- \ No newline at end of file diff --git a/src/components/card/DownloadCard.jsx b/src/components/card/DownloadCard.jsx new file mode 100644 index 0000000..3137aa2 --- /dev/null +++ b/src/components/card/DownloadCard.jsx @@ -0,0 +1,30 @@ +import React from "react"; + +function DownloadCard(props) { + +const {title, downloadURL, buttonText, downloadType, checksum} = props; + return ( +
+ + + {checksum && ( +
+ +
+ {checksum} +
+
+ )} +
+ ); +} + +export default DownloadCard; diff --git a/src/layouts/DownloadPageLayout.astro b/src/layouts/DownloadPageLayout.astro index d198b42..5531599 100644 --- a/src/layouts/DownloadPageLayout.astro +++ b/src/layouts/DownloadPageLayout.astro @@ -1,6 +1,6 @@ --- import BaseLayout from "./BaseLayout.astro"; -import DownloadCard from '../components/card/DownloadCard.astro' +import DownloadCard from '../components/card/DownloadCard' import IconLinkCard from "../components/card/IconLinkCard"; import { Icon } from "astro-icon"; import "../styles/icons.css"; @@ -86,3 +86,4 @@ const { title, OS, version, releaseData, iconName, iconColor } = Astro.props; +../components/card/DownloadCard.jsx \ No newline at end of file diff --git a/src/pages/posts/audacity-3.3.md b/src/pages/posts/audacity-3.3.md index 0952ded..50166db 100644 --- a/src/pages/posts/audacity-3.3.md +++ b/src/pages/posts/audacity-3.3.md @@ -1,5 +1,5 @@ --- -title: A lot of our work has been focused on getting Audacity ready for a version 4. As such, a lot of under-the-hood work has been happening - in technical terms - reducing dependency on wxWidgets, library extractions and general refactoring. This work will continue for the next few releases in parallel with feature development. +title: Audacity 3.3 slug: audacity-3.3 thumbnail: /blog1.png author: Leo Wattenberg diff --git a/src/pages/posts/audacity-3.4-timestretch.md b/src/pages/posts/audacity-3.4-timestretch.md index f39614d..2a5d418 100644 --- a/src/pages/posts/audacity-3.4-timestretch.md +++ b/src/pages/posts/audacity-3.4-timestretch.md @@ -1,5 +1,5 @@ --- -title: A technical look into time stretching in Audacity 3.4 +title: Time stretching in Audacity 3.4 slug: audacity-3.4 thumbnail: /blog1.png author: Leo Wattenberg diff --git a/src/pages/posts/our-new-site.md b/src/pages/posts/our-new-site.md index 30da80e..d45eeb6 100644 --- a/src/pages/posts/our-new-site.md +++ b/src/pages/posts/our-new-site.md @@ -1,5 +1,5 @@ --- -title: audacityteam.org now has a new look! +title: Our new website slug: our-new-site thumbnail: /our-new-site.jpg author: Dawson Custons-Cole