attempt to fix
This commit is contained in:
parent
dd9473b5d1
commit
e77d87ca4b
3 changed files with 9 additions and 4 deletions
|
@ -3945,7 +3945,7 @@ const app = new Vue({
|
|||
if (width) {
|
||||
width = parseInt(width * window.devicePixelRatio)
|
||||
}
|
||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900 || width === 380 || width === 600 ) ? "sr" : "bb"))}`;
|
||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900 || width === 380 || width === 600 ) ? "sr" : "cc"))}`;
|
||||
|
||||
if (newurl.includes("900x516")) {
|
||||
newurl = newurl.replace("900x516cc", "900x516sr").replace("900x516bb", "900x516sr");
|
||||
|
|
|
@ -92,6 +92,11 @@
|
|||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
imageformat: {
|
||||
type: String,
|
||||
default: 'cc',
|
||||
required: false
|
||||
},
|
||||
'contextExt': { type: Object, required: false },
|
||||
},
|
||||
|
@ -242,11 +247,11 @@
|
|||
getArtworkUrl(size = -1, includeUrl = false) {
|
||||
let artwork = this.item?.attributes?.artwork ? this.item?.attributes?.artwork?.url : (this.item?.attributes?.editorialArtwork?.subscriptionCover?.url ?? '')
|
||||
if (size != -1) {
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', (size === 900 || size === 380 || size === 600 ) ? "sr" : "bb");
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', (size === 900 || size === 380 || size === 600 ) ? "sr" : this.imageformat);
|
||||
}
|
||||
switch (this.kind) {
|
||||
case "385":
|
||||
artwork = this.item.attributes.editorialArtwork?.subscriptionHero?.url ?? (this.item.attributes.artwork?.url ?? (this.item.relationships?.contents?.data[0]?.attributes?.editorialArtwork?.subscriptionHero?.url ?? ''))
|
||||
artwork = (this.item.attributes.editorialArtwork?.subscriptionHero?.url ?? (this.item.attributes.artwork?.url ?? (this.item.relationships?.contents?.data[0]?.attributes?.editorialArtwork?.subscriptionHero?.url ?? ''))).replace('{c}', (size === 900 || size === 380 || size === 600 ) ? "sr" : this.imageformat);
|
||||
break;
|
||||
}
|
||||
if (!includeUrl) {
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="categories">
|
||||
<mediaitem-square :kind="'385'" size="600"
|
||||
<mediaitem-square :kind="'385'" :imageformat="'bb'" size="600"
|
||||
:item="item ? (item.attributes.kind ? item : ((item.relationships && item.relationships.contents ) ? item.relationships.contents.data[0] : item)) : []"
|
||||
:imagesize="800"
|
||||
v-for="item of getFlattenedCategories()">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue