Update homepage
parent
e201591789
commit
e85f4ff49b
|
@ -14,6 +14,7 @@ export const birthdays = {
|
|||
xiao: [4, 17],
|
||||
yelan: [4, 20],
|
||||
diluc: [4, 30],
|
||||
collei: [5, 8],
|
||||
gorou: [5, 18],
|
||||
yun_jin: [5, 21],
|
||||
fischl: [5, 27],
|
||||
|
@ -49,5 +50,6 @@ export const birthdays = {
|
|||
sucrose: [11, 26],
|
||||
kaeya: [11, 30],
|
||||
ganyu: [12, 2],
|
||||
tighnari: [12, 29],
|
||||
zhongli: [12, 31],
|
||||
};
|
||||
|
|
|
@ -13,18 +13,25 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
|
||||
const featured = {
|
||||
yoimiya: {
|
||||
name: 'Yoimiya',
|
||||
collei: {
|
||||
name: 'Collei',
|
||||
rarity: 'rare',
|
||||
count: 0,
|
||||
average: '...',
|
||||
percentage: '...',
|
||||
},
|
||||
tighnari: {
|
||||
name: 'Tighnari',
|
||||
rarity: 'legendary',
|
||||
count: 0,
|
||||
average: '...',
|
||||
percentage: '...',
|
||||
},
|
||||
};
|
||||
const bannerId = 300033;
|
||||
const image = 'yoimiya.png';
|
||||
const bannerId = 300034;
|
||||
const image = 'tighnari_collei.png';
|
||||
const width = 800;
|
||||
const height = 495;
|
||||
const height = 593;
|
||||
|
||||
let loading = true;
|
||||
let user = '';
|
||||
|
|
|
@ -19,6 +19,17 @@
|
|||
dispatch('done');
|
||||
}
|
||||
|
||||
function getArtifactImage(artifact) {
|
||||
switch (artifact) {
|
||||
case '+18%_atk_set':
|
||||
return 'gladiators_finale';
|
||||
case '+20%_energy_recharge':
|
||||
return 'emblem_of_severed_fate';
|
||||
default:
|
||||
return artifact;
|
||||
}
|
||||
}
|
||||
|
||||
$: id = promoted[current];
|
||||
$: buildData = Object.entries(builds[id].roles).sort((a, b) => b[1].recommended - a[1].recommended)[0];
|
||||
$: buildName = buildData[0];
|
||||
|
@ -60,7 +71,7 @@
|
|||
<div class="rounded-md p-1 bg-background-secondary m-1 flex">
|
||||
{#each artifacts as artifact}
|
||||
<img
|
||||
src="/images/artifacts/{artifact === '+18%_atk_set' ? 'gladiators_finale' : artifact}_flower.png"
|
||||
src="/images/artifacts/{getArtifactImage(artifact)}_flower.png"
|
||||
alt={artifact}
|
||||
title={artifact}
|
||||
class="w-12 h-12"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script context="module">
|
||||
export async function load({ fetch }) {
|
||||
const promoted = ['yoimiya', 'yun_jin'];
|
||||
const promoted = ['fischl', 'diona'];
|
||||
const builds = {};
|
||||
for (const p of promoted) {
|
||||
const response = await fetch(`/characters/build/${p}.json`);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 402 KiB After Width: | Height: | Size: 197 KiB |
Binary file not shown.
Before Width: | Height: | Size: 557 KiB After Width: | Height: | Size: 276 KiB |
Binary file not shown.
After Width: | Height: | Size: 330 KiB |
Loading…
Reference in New Issue