Skip to content

Commit

Permalink
#215 add podcast title, subtitle and summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Fischaela committed May 19, 2022
1 parent 5d63277 commit ba9c1d8
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 3 deletions.
Binary file modified design/podcasterinnen.sketch
Binary file not shown.
145 changes: 145 additions & 0 deletions src/assets/images/podcast-header.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion src/containers/Podcast/Podcast.css
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/* .imprint {} */
.podcast__header {
margin-top: 5rem;
position: relative;
}

.podcast__illustration {
position: absolute;
left: 50%;
transform: translate(-50%, -100%);
width: 400px;
}
19 changes: 17 additions & 2 deletions src/containers/Podcast/Podcast.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { useEffect, useState } from 'react'

import './Podcast.css'
import HeaderIllustration from '../../assets/images/podcast-header.svg'

const Podcast = () => {
const [error, setError] = useState(null)
const [isLoaded, setIsLoaded] = useState(false)
const [items, setItems] = useState([])
const [podcast, setPodcast] = useState([])

useEffect(() => {
document.title = 'Podcast – podcasterinnen.org'
Expand All @@ -14,7 +15,8 @@ const Podcast = () => {
.then(
(result) => {
setIsLoaded(true)
setItems(result)
console.log(result)
setPodcast(result)
},
// Note: it's important to handle errors here
// instead of a catch() block so that we don't swallow
Expand All @@ -28,6 +30,19 @@ const Podcast = () => {

return (
<section className="podcast main__section">
{ podcast ?
<div className="podcast__header">
<h1 className="title">
<img
className="podcast__illustration"
src={HeaderIllustration}
/>
{podcast.title}
</h1>
<h2 className="title--small">{podcast.subtitle}</h2>
<h2 className="subtitle">{podcast.summary}</h2>
</div> : null
}
</section>
)
}
Expand Down
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,8 @@ img {

.main__section--wide {
max-width: 1100px;
}

.main__section--max {
max-width: 100vw;
}

0 comments on commit ba9c1d8

Please sign in to comment.