mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
🛠 Category images
This commit is contained in:
@@ -31,7 +31,7 @@ const parseInfo = e => {
|
||||
// All episodes
|
||||
const episodes = feed.items.map(e => {
|
||||
const info = parseInfo(e)
|
||||
const image = info.category === 'interview' ? e.itunes.image : `/img/cover/${info.category}.png`
|
||||
const image = ['interview', 'verschiedenes'].includes(info.category) ? e.itunes.image : `/img/cover/${info.category}.png`
|
||||
return {
|
||||
title: e.title.trim(),
|
||||
content: e.content.trim(),
|
||||
|
||||
@@ -23,9 +23,9 @@ renderPage('index', 'index', { navCurrent: 'index', currentEpisode: episodes[0]
|
||||
renderPage('podcast', 'podcast', { navCurrent: 'podcast', episodes: [...episodes] })
|
||||
renderPage('team', 'team', { navCurrent: 'team', team })
|
||||
|
||||
renderPage('category', 'podcast/news', { navCurrent: 'podcast', categoryName: 'News', episodes: episodes.filter(e => e.category === 'news') })
|
||||
renderPage('category', 'podcast/interviews', { navCurrent: 'podcast', categoryName: 'Interviews', episodes: episodes.filter(e => e.category === 'interview') })
|
||||
renderPage('category', 'podcast/lesestunde', { navCurrent: 'podcast', categoryName: 'Lesestunde', episodes: episodes.filter(e => e.category === 'lesestunde') })
|
||||
renderPage('category', 'podcast/der-weg', { navCurrent: 'podcast', categoryName: 'Der Weg', episodes: episodes.filter(e => e.category === 'der-weg') })
|
||||
renderPage('category', 'podcast/verschiedenes', { navCurrent: 'podcast', categoryName: 'Verschiedenes', episodes: episodes.filter(e => e.category === 'verschiedenes') })
|
||||
renderPage('category', 'podcast/news', { navCurrent: 'podcast', category: 'news', categoryName: 'News', episodes: episodes.filter(e => e.category === 'news') })
|
||||
renderPage('category', 'podcast/interviews', { navCurrent: 'podcast', category: 'interview', categoryName: 'Interviews', episodes: episodes.filter(e => e.category === 'interview') })
|
||||
renderPage('category', 'podcast/lesestunde', { navCurrent: 'podcast', category: 'lesestunde', categoryName: 'Lesestunde', episodes: episodes.filter(e => e.category === 'lesestunde') })
|
||||
renderPage('category', 'podcast/der-weg', { navCurrent: 'podcast', category: 'der-weg', categoryName: 'Der Weg', episodes: episodes.filter(e => e.category === 'der-weg') })
|
||||
renderPage('category', 'podcast/verschiedenes', { navCurrent: 'podcast', category: 'verschiedenes', categoryName: 'Verschiedenes', episodes: episodes.filter(e => e.category === 'verschiedenes') })
|
||||
episodes.forEach(episode => renderPage('episode', `podcast/${episode.slug}`, { navCurrent: 'podcast', episode }))
|
||||
|
||||
Reference in New Issue
Block a user