Minor channel logo fixes.

This commit is contained in:
DebaucheryLibrarian 2024-07-08 05:01:13 +02:00
parent b254bc22a4
commit d7372a518e
7 changed files with 26 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<a <a
:href="`/${entity.type}/${entity.slug}`" :href="`/${entity.type}/${entity.slug}`"
class="entity" class="entity nolink"
> >
<img <img
v-if="entity.hasLogo" v-if="entity.hasLogo"

View File

@ -348,6 +348,7 @@ function updateFilter(prop, value, reload = true) {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
gap: .5rem; gap: .5rem;
flex-grow: 1;
padding: .5rem 1rem 1rem 1rem; padding: .5rem 1rem 1rem 1rem;
:deep(.campaign) .campaign-banner { :deep(.campaign) .campaign-banner {

View File

@ -32,7 +32,7 @@
> >
<a <a
:href="`/${network.type}/${network.slug}`" :href="`/${network.type}/${network.slug}`"
class="network" class="network nolink"
> >
<img <img
v-if="network.hasLogo" v-if="network.hasLogo"
@ -41,7 +41,10 @@
class="logo" class="logo"
> >
<span v-else>{{ network.name }}</span> <span
v-else
class="ellipsis"
>{{ network.name }}</span>
<Icon <Icon
v-if="pageContext.urlParsed.search.q && network.type === 'network'" v-if="pageContext.urlParsed.search.q && network.type === 'network'"
@ -167,7 +170,7 @@ async function search() {
border-radius: .5rem; border-radius: .5rem;
background: var(--shadow-strong-30); background: var(--shadow-strong-30);
color: var(--text-light); color: var(--text-light);
font-size: 1.25rem; font-size: 1.5rem;
font-weight: bold; font-weight: bold;
overflow: hidden; overflow: hidden;

View File

@ -5,7 +5,7 @@
:href="entityUrl" :href="entityUrl"
target="_blank" target="_blank"
rel="noopener" rel="noopener"
class="link link-child" class="link-child nolink"
:data-umami-event="entity.affiliate ? 'entity-click-aff' : 'entity-click'" :data-umami-event="entity.affiliate ? 'entity-click-aff' : 'entity-click'"
:data-umami-event-aff-id="entity.affiliate?.id" :data-umami-event-aff-id="entity.affiliate?.id"
:data-umami-event-entity="entity.slug" :data-umami-event-entity="entity.slug"
@ -39,7 +39,7 @@
<a <a
v-if="entity.parent" v-if="entity.parent"
:href="`/${entity.parent.type}/${entity.parent.slug}`" :href="`/${entity.parent.type}/${entity.parent.slug}`"
class="link link-parent" class="link-parent nolink"
> >
<img <img
v-if="entity.parent.hasLogo" v-if="entity.parent.hasLogo"
@ -164,6 +164,12 @@ const entityUrl = (() => {
} }
} }
.name {
display: block;
padding: 1rem;
margin: 0;
}
.logo { .logo {
height: 2rem; height: 2rem;
max-width: 15rem; max-width: 15rem;

View File

@ -80,13 +80,18 @@
by by
<Link <Link
:href="`/${scene.network.type}/${scene.network.slug}`" :href="`/${scene.network.type}/${scene.network.slug}`"
class="network-link entity-link" class="network-link entity-link nolink"
> >
<img <img
v-if="scene.network.hasLogo" v-if="scene.network.hasLogo"
:src="`/logos/${scene.network.slug}/thumbs/network.png`" :src="`/logos/${scene.network.slug}/thumbs/network.png`"
class="network-logo entity-logo" class="network-logo entity-logo"
> >
<span
v-else
class="name"
>{{ scene.network.name }}</span>
</Link> </Link>
</span> </span>
</div> </div>
@ -563,6 +568,7 @@ function copySummary() {
box-sizing: border-box; box-sizing: border-box;
padding: .5rem 1rem; padding: .5rem 1rem;
height: 100%; height: 100%;
color: var(--text-light);
} }
.entity-logo { .entity-logo {

View File

@ -76,7 +76,7 @@ function curateScene(rawScene, assets) {
slug: assets.channel.network_slug, slug: assets.channel.network_slug,
name: assets.channel.network_name, name: assets.channel.network_name,
type: assets.channel.network_type, type: assets.channel.network_type,
hasLogo: assets.channel.has_logo, hasLogo: assets.channel.network_has_logo,
} : null, } : null,
affiliate: assets.channel.affiliate ? { affiliate: assets.channel.affiliate ? {
id: assets.channel.affiliate.id, id: assets.channel.affiliate.id,
@ -151,6 +151,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
'networks.slug as network_slug', 'networks.slug as network_slug',
'networks.name as network_name', 'networks.name as network_name',
'networks.type as network_type', 'networks.type as network_type',
'networks.has_logo as network_has_logo',
knex.raw('row_to_json(affiliates) as affiliate'), knex.raw('row_to_json(affiliates) as affiliate'),
) )
.whereIn('releases.id', sceneIds) .whereIn('releases.id', sceneIds)

2
static

@ -1 +1 @@
Subproject commit af96f9b932db799ec8d067d4a5c9379f8363d2b0 Subproject commit 32b1ad8cfa8c6f3a0bcb42472f51b50273cd8866