2024-01-25 02:07:26 +00:00
|
|
|
<template>
|
|
|
|
<a
|
|
|
|
:href="`/${entity.type}/${entity.slug}`"
|
|
|
|
class="entity"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
v-if="entity.hasLogo"
|
2024-06-04 01:27:54 +00:00
|
|
|
:src="entity.type === 'network' || entity.isIndependent ? `/logos/${entity.slug}/network.png` : `/logos/${entity.parent?.slug}/${entity.slug}.png`"
|
2024-01-25 02:07:26 +00:00
|
|
|
:alt="entity.name"
|
|
|
|
class="logo"
|
|
|
|
>
|
|
|
|
|
|
|
|
<span v-else>{{ entity.name }}</span>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
defineProps({
|
|
|
|
entity: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.entity {
|
|
|
|
width: 15rem;
|
|
|
|
height: 6rem;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 1rem;
|
|
|
|
border-radius: .5rem;
|
|
|
|
background: var(--grey-dark-40);
|
|
|
|
color: var(--text-light);
|
|
|
|
font-size: 1.25rem;
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
box-shadow: 0 0 3px var(--shadow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
</style>
|