forked from applejag/musicforprogramming.ipfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEpisodeListSection.svelte
More file actions
41 lines (36 loc) · 888 Bytes
/
Copy pathEpisodeListSection.svelte
File metadata and controls
41 lines (36 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<script lang="ts">
import Section from "./base/Section.svelte";
import { getAllEpisodeData } from "../libs/episodes-repo";
import Link from "../Link.svelte";
export let currentEpisodeId: string = null;
</script>
<Section title="Episodes">
<ol>
{#each getAllEpisodeData() as epi (epi.id)}
<li>
{#if epi.id === currentEpisodeId}
<span class="selected">{epi.name}</span>
{:else}
<Link href="?episode={epi.number}">{epi.name}</Link>
{/if}
</li>
{/each}
<li>
<a href="?randomEpisode">Random episode</a>
</li>
</ol>
</Section>
<style lang="scss">
@import "../styles/variables.scss";
ol {
list-style: none;
padding: 0;
column-count: 1;
@media (min-width: $size_medium) {
column-count: 2;
}
@media (min-width: $size_large) {
column-count: 3;
}
}
</style>