mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-09 10:08:58 -06:00
add Skeleton loading to breadcrumbs on Episode.vue, use computed on v-if's
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-breadcrumb :items="breadcrumbs"></b-breadcrumb>
|
||||
<b-breadcrumb v-if="ready" :items="breadcrumbs"></b-breadcrumb>
|
||||
<b-card v-else class="breadcrumb-skeleton mb-3">
|
||||
<Skeleton style="width: 40%;"></Skeleton>
|
||||
</b-card>
|
||||
<b-card class="mb-4">
|
||||
<template v-if="episode !== null">
|
||||
<template v-if="ready">
|
||||
<h3>"{{ episode.title }}"</h3>
|
||||
<span v-if="episode">
|
||||
<span>
|
||||
{{ episode.description }}
|
||||
</span>
|
||||
<CharacterList
|
||||
@@ -44,6 +47,18 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.breadcrumb-skeleton {
|
||||
background-color: $grey-3;
|
||||
height: 48px;
|
||||
& > .card-body {
|
||||
padding: 0 0 0 1em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.card-title {
|
||||
font-family: "Montserrat", sans-serif;
|
||||
@@ -108,6 +123,9 @@ ${this.$route.params.season}/${this.$route.params.episode}/`;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
ready() {
|
||||
return this.episode !== null
|
||||
},
|
||||
breadcrumbs() {
|
||||
return [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user