forked from DebaucheryLibrarian/traxxx
Removed affiliate table in favor of direct campaign URLs.
This commit is contained in:
@@ -48,24 +48,7 @@
|
||||
/>
|
||||
|
||||
<div class="campaign-container">
|
||||
<a
|
||||
v-if="campaign"
|
||||
:href="campaign.affiliate.url"
|
||||
target="_blank"
|
||||
class="campaign"
|
||||
>
|
||||
<img
|
||||
v-if="campaign.banner.entity.type === 'network'"
|
||||
:src="`/img/banners/${campaign.banner.entity.slug}/${campaign.banner.id}.jpeg`"
|
||||
class="campaign-banner"
|
||||
>
|
||||
|
||||
<img
|
||||
v-if="campaign.banner.entity.type === 'channel' && campaign.banner.entity.parent?.type === 'network'"
|
||||
:src="`/img/banners/${campaign.banner.entity.parent.slug}/${campaign.banner.entity.slug}/${campaign.banner.id}.jpeg`"
|
||||
class="campaign-banner"
|
||||
>
|
||||
</a>
|
||||
<Campaign :tag="tag" />
|
||||
</div>
|
||||
|
||||
<FilterBar
|
||||
@@ -97,6 +80,7 @@ import Album from '../album/album.vue';
|
||||
import Releases from '../releases/releases.vue';
|
||||
import Pagination from '../pagination/pagination.vue';
|
||||
import Scroll from '../scroll/scroll.vue';
|
||||
import Campaign from '../campaigns/campaign.vue';
|
||||
|
||||
const converter = new Converter();
|
||||
|
||||
@@ -115,15 +99,6 @@ async function fetchReleases(scroll = true) {
|
||||
this.hasMedia = this.tag.poster || this.tag.photos.length > 0;
|
||||
this.description = this.tag.description && converter.makeHtml(escapeHtml(this.tag.description));
|
||||
|
||||
if (tag.banners.length > 0) {
|
||||
const banner = tag.banners[Math.floor(Math.random() * tag.banners.length)];
|
||||
|
||||
this.campaign = {
|
||||
...banner.campaigns[Math.floor(Math.random() * banner.campaigns.length)],
|
||||
banner,
|
||||
};
|
||||
}
|
||||
|
||||
if (scroll && this.$refs.filter) {
|
||||
this.$refs.filter.$el.scrollIntoView();
|
||||
}
|
||||
@@ -152,6 +127,7 @@ export default {
|
||||
Photos,
|
||||
Pagination,
|
||||
Scroll,
|
||||
Campaign,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -163,7 +139,6 @@ export default {
|
||||
pageTitle: null,
|
||||
hasMedia: false,
|
||||
expanded: false,
|
||||
campaign: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -240,14 +215,4 @@ export default {
|
||||
background: var(--background-dim);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.campaign {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
|
||||
.campaign-banner {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user