Update homepage

pull/1/head
Made Baruna 2021-09-01 11:09:13 +07:00
parent cf1e1a5887
commit 5c136d57fc
No known key found for this signature in database
GPG Key ID: 5AA5DA16AA5DCEAD
4 changed files with 11 additions and 17 deletions

View File

@ -13,23 +13,23 @@
const dispatch = createEventDispatcher();
const featured = {
yoimiya: {
name: 'Yoimiya',
raiden_shogun: {
name: 'Raiden Shogun',
rarity: 'legendary',
count: 0,
average: '...',
percentage: '...',
},
sayu: {
name: 'Sayu',
kujou_sara: {
name: 'Kujou Sara',
rarity: 'rare',
count: 0,
average: '...',
percentage: '...',
},
};
const bannerId = 300017;
const image = 'yoimiya_sayu.png';
const bannerId = 300018;
const image = 'raiden_kujou.png';
let loading = true;
let user = '';

View File

@ -80,6 +80,7 @@
export let banner;
export let featured = [];
let featuredValues = featured.map(() => ({
total: 0,
percentage: 0,
@ -228,7 +229,6 @@
for (let i = 0; i < 90; i++) {
percentageEachPity[i] = legendaryPityData[i] / data.countEachPity[i];
}
console.log(percentageEachPity);
const mappedPercentage = new Array(legendaryMap[legendaryMap.length - 1] + 1).fill(0);
for (let i = 0; i < 90; i++) {
@ -285,17 +285,12 @@
onMount(() => {
getData();
});
</script>
<div class="flex flex-col bg-item rounded-xl px-4 pt-4 pb-2 mb-4 space-y-4">
<div class="flex flex-col xl:flex-row">
<a href="/wish/tally/{id}" class="xl:mr-4">
<img
src="/images/banners/{banner.name} {banner.image}.png"
alt={banner.name}
class="rounded-xl xl:h-64 w-auto"
/>
<img src="/images/banners/{banner.name} {banner.image}.png" alt={banner.name} class="rounded-xl xl:h-64 w-auto" />
</a>
<div class="h-4 xl:h-0" />
{#if loading}
@ -653,5 +648,4 @@
@apply -rotate-90;
}
}
</style>

View File

@ -39,21 +39,21 @@
featured={banners.characters[16].featured}
/>
<ItemNew type="weapon" banner={banners.weapons[15]} id={400016} featured={banners.weapons[15].featured} />
<ItemNew type="character" banner={banners.standard} id={200001} />
<ItemNew type="character" banner={banners.standard[0]} id={200001} />
{#each showOld as show, i}
{#if show}
<svelte:component
this={i < showOld.length - 3 ? ItemNew : Item}
type="character"
banner={banners.characters[banners.characters.length - 3 - i]}
id={300015 - i}
id={300016 - i}
featured={banners.characters[banners.characters.length - 3 - i].featured}
/>
<svelte:component
this={i < showOld.length - 3 ? ItemNew : Item}
type="weapon"
banner={banners.weapons[banners.weapons.length - 3 - i]}
id={400014 - i}
id={400015 - i}
featured={banners.weapons[banners.weapons.length - 3 - i].featured}
/>
{:else}

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB