From 1ab30f580c4013ecc718c6b9fdea6f5b0d255054 Mon Sep 17 00:00:00 2001 From: James Purser Date: Thu, 30 Sep 2021 21:10:11 +1000 Subject: [PATCH] Replaced Current and Archived podcast pages with Podcast page Fixed logo fetch issue for Podcast Page --- components/css/styles.css | 9 +++++++-- pages/index.js | 2 +- pages/podcasts.js | 38 +++++++++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/components/css/styles.css b/components/css/styles.css index bcd0030..3e941c4 100755 --- a/components/css/styles.css +++ b/components/css/styles.css @@ -263,7 +263,12 @@ .page_body { text-align: justify; } - + h1 { - font-size: 4rem + font-size: 3rem; + } + + h2 { + font-size: 2rem; + font-weight: bold; } \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index 9f0129c..adf67af 100755 --- a/pages/index.js +++ b/pages/index.js @@ -59,7 +59,7 @@ function HomePage (props) { ))}

Latest Tech And Disability Post

- {props.tadfirstitem.title} + {props.tadfirstitem.title}

Latest Photo

diff --git a/pages/podcasts.js b/pages/podcasts.js index a8df3ed..b39cda5 100755 --- a/pages/podcasts.js +++ b/pages/podcasts.js @@ -9,20 +9,48 @@ export async function getServerSideProps(context) { const secres = await fetch(serverRuntimeConfig.base_path + `/api/sections`) const secdata = await secres.json() - const podcastres = await fetch(serverRuntimeConfig.base_path + `/api/podcasts/bystatus/1`) - const podcastdata = await podcastres.json() + const currpodcastres = await fetch(serverRuntimeConfig.base_path + `/api/podcasts/bystatus/1`) + const currpodcastdata = await currpodcastres.json() + + const archpodcastres = await fetch(serverRuntimeConfig.base_path + `/api/podcasts/bystatus/0`) + const archpodcastdata = await archpodcastres.json() const episodedata = "hi there" const pagedata = {'title': 'Angry Beanie - Current Podcast Projects'} return { - props: { sections : secdata, podcastdata, episodedata, pagedata }, // will be passed to the page component as props + props: { sections : secdata, currpodcastdata, archpodcastdata, episodedata, pagedata, serverRuntimeConfig }, // will be passed to the page component as props } } -const Podcasts = ({sections, podcastdata, episodedata, pagedata}) => ( - +const Podcasts = ({sections, currpodcastdata, archpodcastdata, episodedata, pagedata, serverRuntimeConfig}) => ( + +

Podcasts

+
Over the years I have made a number of podcasts.
+
+
+

Current Podcasts

+ {currpodcastdata.shows.map((podcast) => ( +
{podcast.title}
+ ))} +
+
+

Archived Podcasts

+ {archpodcastdata.shows.map((podcast) => ( +
{podcast.title}
+ ))} +
+
+
) export default Podcasts \ No newline at end of file