diff --git a/src/components/ProductContainer.vue b/src/components/ProductContainer.vue
index d3ce98d..280c564 100644
--- a/src/components/ProductContainer.vue
+++ b/src/components/ProductContainer.vue
@@ -1,6 +1,6 @@
@@ -11,6 +11,7 @@ const props = defineProps({
type: String,
default: 'bg-splatoon-blue',
},
+ bgStyle: String,
})
diff --git a/src/components/SplatfestResultsBox.vue b/src/components/SplatfestResultsBox.vue
new file mode 100644
index 0000000..9f724fa
--- /dev/null
+++ b/src/components/SplatfestResultsBox.vue
@@ -0,0 +1,90 @@
+
+
+
+
+ Results!
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+ {{ row.title }}
+
+
+
+
+
+ {{ (result.ratio * 100).toFixed(2) }}%
+
+
+
+
+
+
+
+
+ Team {{ winner.teamName }} Wins!
+
+
+
+
+
+
+
+
diff --git a/src/stores/splatfests.mjs b/src/stores/splatfests.mjs
index 9f3582e..b5e01a5 100644
--- a/src/stores/splatfests.mjs
+++ b/src/stores/splatfests.mjs
@@ -27,6 +27,7 @@ function defineSplatfestRegionStore(region) {
return {
...node,
status: getStatus(node),
+ hasResults: node.teams.some(t => t.result),
};
}));
@@ -34,6 +35,12 @@ function defineSplatfestRegionStore(region) {
const activeFestival = computed(() => festivals.value?.find(f => f.status === STATUS_ACTIVE));
const upcomingFestival = computed(() => festivals.value?.find(f => f.status === STATUS_UPCOMING));
+ // A "recent festival" is one that ended within the past 3 days
+ const recentFestival = computed(() => festivals.value?.find(f =>
+ f.status === STATUS_PAST &&
+ time.now - Date.parse(f.endTime) < 3 * 24 * 60 * 60 * 1000
+ ));
+
// TODO: Eventually this needs to be handled on a per-region basis.
const tricolor = computed(() => {
let fest = useSchedulesDataStore().data?.currentFest;
@@ -48,7 +55,7 @@ function defineSplatfestRegionStore(region) {
};
});
- return { festivals, previousFestivals, activeFestival, upcomingFestival, tricolor };
+ return { festivals, previousFestivals, activeFestival, upcomingFestival, recentFestival, tricolor };
});
}
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 5d905a6..967b82a 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -20,6 +20,19 @@
class="flex-1 max-w-md md:-rotate-1"
/>
+
+
+
+
+
+
@@ -31,5 +44,6 @@ import ScheduleBox from '../components/ScheduleBox.vue';
import { useUSSplatfestsStore } from '@/stores/splatfests';
import SplatfestBox from '../components/SplatfestBox.vue';
+import SplatfestResultsBox from '../components/SplatfestResultsBox.vue';
const usSplatfests = useUSSplatfestsStore();