2020-06-27 02:50:13 +00:00
|
|
|
<template>
|
|
|
|
<router-link
|
2020-06-27 22:15:13 +00:00
|
|
|
:to="`/${entity.type}/${entity.slug}`"
|
2020-06-27 02:50:13 +00:00
|
|
|
:title="entity.name"
|
|
|
|
class="tile"
|
|
|
|
>
|
2020-06-27 22:44:53 +00:00
|
|
|
<template v-if="entity.hasLogo">
|
|
|
|
<img
|
2020-07-02 23:28:22 +00:00
|
|
|
v-if="entity.type === 'network' || entity.independent"
|
2020-06-27 22:44:53 +00:00
|
|
|
:src="`/img/logos/${entity.slug}/thumbs/network.png`"
|
|
|
|
:alt="entity.name"
|
|
|
|
class="logo"
|
|
|
|
>
|
2020-06-27 22:15:13 +00:00
|
|
|
|
2020-06-27 22:44:53 +00:00
|
|
|
<img
|
|
|
|
v-else-if="entity.parent"
|
|
|
|
:src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`"
|
|
|
|
:alt="entity.name"
|
|
|
|
class="logo"
|
|
|
|
>
|
2020-06-27 02:50:13 +00:00
|
|
|
|
2020-06-27 22:44:53 +00:00
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
:src="`/img/logos/${entity.slug}/thumbs/${entity.slug}.png`"
|
|
|
|
:alt="entity.name"
|
|
|
|
class="logo"
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<span
|
2020-06-27 02:50:13 +00:00
|
|
|
v-else
|
2020-06-27 22:44:53 +00:00
|
|
|
class="name"
|
|
|
|
>{{ entity.name }}</span>
|
2020-06-27 02:50:13 +00:00
|
|
|
</router-link>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
entity: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.tile {
|
|
|
|
height: 6rem;
|
2020-07-05 02:27:46 +00:00
|
|
|
background: var(--tile);
|
2020-06-27 02:50:13 +00:00
|
|
|
display: flex;
|
|
|
|
flex-shrink: 0;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
border-radius: .25rem;
|
|
|
|
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
|
|
|
|
text-align: center;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
2020-06-27 22:44:53 +00:00
|
|
|
.name {
|
|
|
|
color: var(--text-light);
|
|
|
|
font-size: 1.25rem;
|
|
|
|
font-weight: bold;
|
2020-06-27 02:50:13 +00:00
|
|
|
}
|
|
|
|
</style>
|