Non-official site for The Life Series Minecraft hardcore survival multiplayer series housing every video www.life-series.online
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

season member page

Ghustvn b22964a6 c3e872ab

+69
+62
src/pages/seasons/[season_id]/[member_name].astro
··· 1 + --- 2 + import { getCollection } from 'astro:content'; 3 + import { YouTube } from '@astro-community/astro-embed-youtube'; 4 + import SeasonsLayout from '@/layouts/SeasonsLayout.astro'; 5 + 6 + export async function getStaticPaths() { 7 + const seasons = await getCollection('seasons'); 8 + const members = await getCollection('members'); 9 + 10 + const result = seasons.map((season) => { 11 + return members.map((member) => { 12 + return { 13 + params: { season_id: season.id, member_name: member.data.name }, 14 + props: { 15 + season, 16 + member, 17 + videos: season.data.videos[member.data.name] ?? [], 18 + }, 19 + }; 20 + }); 21 + }); 22 + 23 + return result.flat(); 24 + } 25 + 26 + const { season, member, videos } = Astro.props; 27 + 28 + const movie = videos.find((video) => video.isMovie); 29 + const sessions = videos.filter((video) => !video.isMovie); 30 + 31 + const title = `${member.data.name} · ${season.data.title} (S${season.data.seasonNumber})`; 32 + --- 33 + 34 + <SeasonsLayout title={title} season={season}> 35 + <div> 36 + {movie && ( 37 + <h2 class="sr-only">The Movie</h2> 38 + <YouTube 39 + id={movie.id} 40 + title={movie.title} 41 + posterQuality="max" 42 + class="movie-video rounded-lg" 43 + /> 44 + )} 45 + {sessions.length > 0 && ( 46 + <h2 id="session-title" class="sr-only">Sessions</h2> 47 + <ul 48 + role="list" 49 + aria-labelledby="session-title" 50 + class="space-y-64" 51 + > 52 + {sessions.map((session) => ( 53 + <li> 54 + <h3 class="pb-16 text-xl">{session.title}</h3> 55 + <YouTube id={session.id} title={session.title} class="rounded" /> 56 + </li> 57 + ))} 58 + </ul> 59 + )} 60 + </div> 61 + </SeasonsLayout> 62 +
+7
src/styles/global.css
··· 47 47 outline-color: var(--color-neutral-950); 48 48 } 49 49 50 + h1, 51 + h2, 52 + h3 { 53 + font-weight: 400; 54 + text-wrap: balance; 55 + } 56 + 50 57 ul, 51 58 ol { 52 59 list-style-type: none;