mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-18 04:13:43 -06:00
basic Season route, list group episodes, placeholder image
This commit is contained in:
42
client/src/components/Season.vue
Normal file
42
client/src/components/Season.vue
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<b-breadcrumb :items="breadcrumbs"></b-breadcrumb>
|
||||||
|
<b-card>
|
||||||
|
<b-list-group>
|
||||||
|
<b-list-group-item v-for="episode in season.episodes" :key="episode.episode_id">
|
||||||
|
<b-row align-v="start">
|
||||||
|
<b-col cols="3">
|
||||||
|
<b-img src="https://via.placeholder.com/150"></b-img>
|
||||||
|
</b-col>
|
||||||
|
<b-col>
|
||||||
|
<h4>{{ episode.title }}</h4>
|
||||||
|
<p class="pl-3">{{ episode.description }}</p>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
</b-list-group-item>
|
||||||
|
</b-list-group>
|
||||||
|
</b-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
breadcrumbs() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
text: 'Home',
|
||||||
|
to: {name: 'Home'}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `Season ${this.$route.params.season}`,
|
||||||
|
active: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
season() {
|
||||||
|
return this.$store.state.preloaded ? this.$store.state.quoteData[this.$route.params.season - 1] : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -4,6 +4,7 @@ import Home from "./components/Home.vue";
|
|||||||
import Episode from "./components/Episode.vue";
|
import Episode from "./components/Episode.vue";
|
||||||
import SearchResults from "./components/SearchResults.vue";
|
import SearchResults from "./components/SearchResults.vue";
|
||||||
import Character from "./components/Character.vue";
|
import Character from "./components/Character.vue";
|
||||||
|
import Season from "./components/Season.vue";
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
|
|
||||||
@@ -20,6 +21,11 @@ export default new Router({
|
|||||||
name: "Character",
|
name: "Character",
|
||||||
component: Character,
|
component: Character,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/:season/",
|
||||||
|
name: "Season",
|
||||||
|
component: Season,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/:season/:episode",
|
path: "/:season/:episode",
|
||||||
name: "Episode",
|
name: "Episode",
|
||||||
|
|||||||
Reference in New Issue
Block a user