Skip to content

Commit

Permalink
Add spotify subscription button to podcast
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlovin committed Dec 7, 2019
1 parent 0760820 commit b571c0e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
Binary file added public/static/img/subscription_icons/spotify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/components/SubscriptionButtons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ export default function SubscriptionButtons(props: Props) {
</a>
)}

{podcast.spotifyUrl && (
<a href={podcast.spotifyUrl} target="_blank" rel="noopener noreferrer">
<SubscriptionAvatar
src="/static/img/subscription_icons/spotify.png"
alt="Spotify"
/>
</a>
)}

{podcast.rssFeedUrl && (
<a href={podcast.rssFeedUrl} target="_blank" rel="noopener noreferrer">
<SubscriptionAvatar
Expand All @@ -81,6 +90,7 @@ export default function SubscriptionButtons(props: Props) {
/>
</a>
)}

</React.Fragment>
);
}
2 changes: 1 addition & 1 deletion src/components/SubscriptionButtons/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const SubscriptionsContainer = styled.div`
border-radius: 0 0 8px 8px;
display: grid;
grid-gap: 16px;
grid-template-columns: repeat(7, 1fr);
grid-template-columns: repeat(8, 1fr);
justify-content: center;
transition: max-height 0.15s ease-out;
position: relative;
Expand Down
1 change: 1 addition & 0 deletions src/data/podcasts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default [
overcastUrl: 'https://overcast.fm/itunes947191070',
pocketCastsUrl: 'http://pca.st/itunes/947191070',
rssFeedUrl: 'http://simplecast.fm/podcasts/1034/rss',
spotifyUrl: 'https://open.spotify.com/show/7kAx8RJce757LXVoX2FIpf?si=u_EJ07bBQKC-86Ypqhyn0A',
googlePodcastsUrl:
'https://play.google.com/music/m/Iyvjpq3k44ux2azsmvlxe3cc5by?t=Design_Details',
castroUrl: 'https://castro.fm/itunes/947191070',
Expand Down
37 changes: 19 additions & 18 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,26 @@ export interface SimplecastEpisode {
};

export interface ConfigPodcast {
id: number,
name: string,
slug: string,
description: string,
simplecastId: number,
artworkUrl: string,
iTunesUrl: string,
overcastUrl: string,
pocketCastsUrl: string,
rssFeedUrl: string,
googlePodcastsUrl: string,
castroUrl: string,
breakerUrl: string,
applePodcastId: string,
twitterUsername: string,
id: number;
name: string;
slug: string;
description: string;
simplecastId: number;
artworkUrl: string;
iTunesUrl: string;
overcastUrl: string;
pocketCastsUrl: string;
rssFeedUrl: string;
googlePodcastsUrl: string;
castroUrl: string;
breakerUrl: string;
spotifyUrl: string;
applePodcastId: string;
twitterUsername: string;
colors: {
text: string,
button: string,
},
text: string;
button: string;
};
};

export interface DesignDetail {
Expand Down

0 comments on commit b571c0e

Please sign in to comment.