Entity refactor. Facilitating channels without parent.

This commit is contained in:
2020-06-28 00:15:13 +02:00
parent 0e8b4caac3
commit 3462d7af2a
50 changed files with 934 additions and 1964 deletions

View File

@@ -11,17 +11,23 @@
>
<img
v-else
v-else-if="entity.parent"
class="logo"
:src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`"
>
<img
v-else
class="logo"
:src="`/img/logos/${entity.slug}/thumbs/${entity.slug}.png`"
>
<router-link
v-if="entity.parent"
:to="{ name: `${entity.parent.type}Base`, params: { entitySlug: entity.parent.slug } }"
:to="`/${entity.parent.type}/${entity.parent.slug}`"
>
<img
class="logo"
class="logo logo-parent"
:src="`/img/logos/${entity.parent.slug}/thumbs/network.png`"
>
</router-link>
@@ -134,8 +140,14 @@ export default {
.logo {
height: 100%;
width: 100%;
max-width: 20rem;
object-fit: contain;
object-position: 0 50%;
}
.logo-parent {
object-position: 100% 50%;
}
.children {

View File

@@ -1,11 +1,18 @@
<template>
<router-link
:to="{ name: entity.type, params: { entitySlug: entity.slug } }"
:to="`/${entity.type}/${entity.slug}`"
:title="entity.name"
class="tile"
>
<img
v-if="entity.type === 'channel'"
v-if="entity.type === 'network'"
:src="`/img/logos/${entity.slug}/thumbs/network.png`"
:alt="entity.name"
class="logo"
>
<img
v-else-if="entity.parent"
:src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`"
:alt="entity.name"
class="logo"
@@ -13,7 +20,7 @@
<img
v-else
:src="`/img/logos/${entity.slug}/thumbs/network.png`"
:src="`/img/logos/${entity.slug}/thumbs/${entity.slug}.png`"
:alt="entity.name"
class="logo"
>