Skip to content

Commit

Permalink
Show all designers in item card
Browse files Browse the repository at this point in the history
  • Loading branch information
Arasteh authored Feb 2, 2025
1 parent 0eb2d0b commit 748ec00
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1205,19 +1205,20 @@
</span>
</div>

<div v-if="item.designer && item.designerLabel" class="item-designer">
<div v-if="item.designers && item.designers.length > 0" class="item-designer">
<span class="mobile-only">
<span class="material-symbols-rounded"
style="margin-left: 5px; top: 8px; position: relative;">person_edit</span>
<span class="material-symbols-rounded" style="margin-left: 5px; top: 8px; position: relative;">person_edit</span>
</span>
<span class="desktop-only">طراح: </span><a href="#"
@click.prevent="selectDesigner(item.designerLabel)">{{ item.designerLabel
}}</a>
<span class="item-links">
<a :href="'https://www.wikidata.org/wiki/' + item.designer" target="_blank">Q</a><template
v-if="item.designerFaWikipediaLink">&nbsp;<a
:href="'https://fa.wikipedia.org/wiki/' + item.designerFaWikipediaLink.replaceAll(' ', '_')"
target="_blank">W</a></template>
<span class="desktop-only">{{ item.designers.length === 1 ? 'طراح: ' : 'طراحان: ' }}</span>
<span v-for="(designer, index) in item.designers" :key="index">
<a href="#" @click.prevent="selectDesigner(designer.label)">{{ designer.label }}</a>
<span class="item-links">
<a :href="'https://www.wikidata.org/wiki/' + designer.id" target="_blank">Q</a>
<template v-if="designer.faWikipediaLink">
&nbsp;<a :href="'https://fa.wikipedia.org/wiki/' + designer.faWikipediaLink.replaceAll(' ', '_')" target="_blank">W</a>
</template>
</span>
<br v-if="index < item.designers.length - 1">
</span>
</div>
<div id="film-links" class="item-links">
Expand Down Expand Up @@ -1377,7 +1378,14 @@
item.posterHash = poster.hash;
item.isNsfw = poster.characteristics?.includes('Q2716583') ?? false;
if (poster.designers?.length ?? 0) {
item.designer = poster.designers[0];
item.designers = poster.designers.map(designerId => {
const designer = data.secondary[designerId];
return {
id: designerId,
label: designer.labels.fa,
faWikipediaLink: designer.sitelinks?.fawiki
};
});
item.characteristics = poster.characteristics;
item.designerLabel = data.secondary[poster.designers[0]].labels.fa;
const fawiki = data.secondary[poster.designers[0]].sitelinks.fawiki;
Expand Down

0 comments on commit 748ec00

Please sign in to comment.