2021-03-07 03:05:25 +00:00
|
|
|
<template>
|
|
|
|
<router-link
|
|
|
|
v-if="photo.entity"
|
2021-03-07 04:11:27 +00:00
|
|
|
v-tooltip="photo.entity.name"
|
2021-03-07 03:05:25 +00:00
|
|
|
:to="`/${photo.entity.type}/${photo.entity.slug}`"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
v-if="favicon && photo.entity.type !== 'network' && !photo.entity.independent && photo.entity.parent"
|
|
|
|
:src="`/img/logos/${photo.entity.parent.slug}/favicon.png`"
|
2021-03-11 15:44:59 +00:00
|
|
|
class="album-logo favicon"
|
2021-03-07 03:05:25 +00:00
|
|
|
>
|
|
|
|
|
|
|
|
<img
|
|
|
|
v-else-if="favicon"
|
|
|
|
:src="`/img/logos/${photo.entity.slug}/favicon.png`"
|
2021-03-11 15:44:59 +00:00
|
|
|
class="album-logo favicon"
|
2021-03-07 03:05:25 +00:00
|
|
|
>
|
|
|
|
|
|
|
|
<img
|
|
|
|
v-else-if="photo.entity.type !== 'network' && !photo.entity.independent && photo.entity.parent"
|
|
|
|
:src="`/img/logos/${photo.entity.parent.slug}/${photo.entity.slug}.png`"
|
|
|
|
class="album-logo"
|
|
|
|
>
|
|
|
|
|
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
:src="`/img/logos/${photo.entity.slug}/network.png`"
|
|
|
|
class="album-logo"
|
|
|
|
>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
module.exports = {
|
|
|
|
props: {
|
|
|
|
photo: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
favicon: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.album-logo {
|
|
|
|
max-height: .75rem;
|
|
|
|
max-width: 5rem;
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
padding: .5rem;
|
|
|
|
transition: transform .25s ease, opacity .25s ease;
|
|
|
|
filter: drop-shadow(0 0 2px var(--shadow-weak));
|
|
|
|
}
|
2021-03-07 15:39:54 +00:00
|
|
|
|
|
|
|
@media(max-width: $breakpoint-small) {
|
2021-03-11 15:44:59 +00:00
|
|
|
.album-logo:not(.favicon) {
|
2021-03-07 15:39:54 +00:00
|
|
|
max-height: .5rem;
|
|
|
|
max-width: 3.5rem;
|
|
|
|
}
|
|
|
|
}
|
2021-03-07 03:05:25 +00:00
|
|
|
</style>
|