mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-11-18 16:58:18 -06:00
Preserve card proportions in Tricolor social images
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<div class="pt-2 pb-6 px-2 space-y-2">
|
||||
<div class="flex items-center justify-between font-splatoon2">
|
||||
<div class="flex items-center font-splatoon2">
|
||||
<div class="flex items-center space-x-2 text-xl">
|
||||
<div>
|
||||
<TricolorIcon
|
||||
@@ -22,15 +22,6 @@
|
||||
{{ $t('screenshots.tricolor') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div v-if="type.badge" class="flex items-center">
|
||||
<img :src="type.img" class="h-8" />
|
||||
<div v-if="type.badge" class="font-splatoon2 text-xl bg-splatoon-blue px-2 drop-shadow-sm rounded-sm">
|
||||
{{ $t(type.badge) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="tricolor?.tricolorStage" class="space-y-8">
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
<template>
|
||||
<ScreenshotLayout :header="$t('screenshots.headers.schedules')">
|
||||
<div class="grow flex items-center justify-center">
|
||||
<div v-if="activeFestivals.length > 0" class="flex space-x-6 items-center mx-6">
|
||||
<div :class="marginsClass">
|
||||
<div
|
||||
v-if="activeFestivals.length > 0"
|
||||
class="flex space-x-6 items-center mx-6"
|
||||
:class="{ 'scaled-splatfest': scaleSplatfest }"
|
||||
>
|
||||
<div class="splatfest-card" :class="marginsClass">
|
||||
<SplatfestMultiBox
|
||||
:festivals="activeFestivals"
|
||||
class="flex-1 md:-rotate-1"
|
||||
:class="`${splatfestSizeClass} ${regionSizeClass}`"
|
||||
/>
|
||||
</div>
|
||||
<ScreenshotScheduleBox type="splatfestOpen" class="flex-1 rotate-1" />
|
||||
<ScreenshotScheduleBox type="splatfestPro" class="flex-1 -rotate-1" />
|
||||
<ScreenshotTricolorBox v-if="tricolor?.isTricolorActive" class="flex-1 rotate-1" />
|
||||
<ScreenshotScheduleBox type="splatfestOpen" class="battle-card flex-1 rotate-1" />
|
||||
<ScreenshotScheduleBox type="splatfestPro" class="battle-card flex-1 -rotate-1" />
|
||||
<ScreenshotTricolorBox v-if="tricolor?.isTricolorActive" class="battle-card flex-1 rotate-1" />
|
||||
</div>
|
||||
|
||||
<div v-else class="flex space-x-6 mx-6">
|
||||
@@ -39,7 +43,27 @@ const jpSplatfests = useJPSplatfestsStore();
|
||||
const apSplatfests = useAPSplatfestsStore();
|
||||
const tricolor = computed(() => usSplatfests.tricolor || euSplatfests.tricolor || jpSplatfests.tricolor || apSplatfests.tricolor);
|
||||
const activeFestivals = computed(() => uniqBy([usSplatfests.activeFestival, euSplatfests.activeFestival, jpSplatfests.activeFestival, apSplatfests.activeFestival].filter(festival => festival), '__splatoon3ink_id'));
|
||||
const splatfestSizeClass = computed(() => (tricolor.value?.isTricolorActive || activeFestivals.value?.length > 1) ? 'max-w-xs' : 'max-w-md');
|
||||
const scaleSplatfest = computed(() => tricolor.value?.isTricolorActive && activeFestivals.value.length === 1);
|
||||
const splatfestSizeClass = computed(() => (activeFestivals.value?.length > 1) ? 'max-w-xs' : 'max-w-md');
|
||||
const regionSizeClass = computed(() => (activeFestivals.value?.length > 1) ? '' : 'scale-[1.2]');
|
||||
const marginsClass = computed(() => (activeFestivals.value?.length <= 1) ? 'mx-10' : '');
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* Fit the original card widths and spacing into the 1200px screenshot's 1152px content area. */
|
||||
.scaled-splatfest {
|
||||
width: max-content;
|
||||
flex: none;
|
||||
transform: scale(calc(1152 / 1476));
|
||||
}
|
||||
|
||||
.scaled-splatfest > .splatfest-card {
|
||||
width: 448px;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.scaled-splatfest > .battle-card {
|
||||
width: 300px;
|
||||
flex: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user