Fix for Episode title placement and Podcasts main page
This commit is contained in:
parent
ebf9bfb8ea
commit
d5a8feacdc
2 changed files with 8 additions and 7 deletions
|
|
@ -11,8 +11,6 @@ export async function getServerSideProps(context) {
|
|||
const secdata = await secres.json()
|
||||
|
||||
const currpodcastlist = await getPodcastList(true)
|
||||
|
||||
console.log(currpodcastlist.data[0].attributes.Logo.data.attributes.formats)
|
||||
|
||||
const archpodcastlist = await getPodcastList(false)
|
||||
|
||||
|
|
@ -25,7 +23,9 @@ export async function getServerSideProps(context) {
|
|||
}
|
||||
}
|
||||
|
||||
const Podcasts = ({sections, currpodcastlist, archpodcastlist, episodedata, pagedata, serverRuntimeConfig}) => (
|
||||
const Podcasts = ({sections, currpodcastlist, archpodcastlist, episodedata, pagedata, serverRuntimeConfig}) => {
|
||||
|
||||
return (
|
||||
<Layout sections={sections} episodedata={episodedata} pagedata={pagedata} serverRuntimeConfig>
|
||||
<h1 className="page_title col-sm-12">Podcasts</h1>
|
||||
<div className="page_body col-sm-12"><p>Over the years I have made a number of podcasts.</p></div>
|
||||
|
|
@ -45,7 +45,8 @@ const Podcasts = ({sections, currpodcastlist, archpodcastlist, episodedata, page
|
|||
</div>
|
||||
<div className="col-sm-6">
|
||||
<h2>Archived Podcasts</h2>
|
||||
{archpodcastlist.map((podcast) => (
|
||||
{archpodcastlist.length > 0 &&
|
||||
archpodcastlist.map((podcast) => (
|
||||
<div>
|
||||
<Image
|
||||
src={serverRuntimeConfig.media_path + "/" + podcast.attributes.Logo.data.attributes.formats.thumbnail.url}
|
||||
|
|
@ -57,7 +58,7 @@ const Podcasts = ({sections, currpodcastlist, archpodcastlist, episodedata, page
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
</Layout>)
|
||||
}
|
||||
|
||||
export default Podcasts
|
||||
|
|
@ -50,8 +50,8 @@ const Episode = ( props ) => {
|
|||
<meta name="og:title" content={ props.episode.data[0].attributes.Title } key="title"></meta>
|
||||
<meta name="og:description" content={ props.episode.data[0].attributes.Body } key="description"></meta>
|
||||
</Head>
|
||||
<h1>{props.episode.data[0].attributes.Title}</h1>
|
||||
<div className="main_content col-md-9 col-sm-12">
|
||||
<h1>{props.episode.data[0].attributes.Title}</h1>
|
||||
<AudioPlayer
|
||||
src={props.audiodata.audio_mp3.url}
|
||||
onPlay={e => gtag.event({action: "play", category:"audio", label: "audio started", value: props.audiodata.audio_mp3})}
|
||||
|
|
|
|||
Loading…
Reference in a new issue