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