diff --git a/src/css/_backgrounds.scss b/src/css/_backgrounds.scss index 93fbd48..be4d8e7 100644 --- a/src/css/_backgrounds.scss +++ b/src/css/_backgrounds.scss @@ -9,6 +9,7 @@ $bg-mask-product: url(../img/bg-mask-product.png); $bg-mask-title-squid: url(../img/bg-mask-title-squid.png); $bg-mask-hook: url(../img/bg-mask-hook.png); $bg-mask-banner: url(../img/bg-mask-banner.png); +$bg-mask-ink-splat: url(../img/bg-mask-ink-splat.svg); // Colors $bg-battle-regular: #19d719; @@ -80,3 +81,10 @@ $bg-battle-league: #f02d7d; mask-size: 100% 100%; mask-position: center; } + +.bg-mask-ink-splat { + mask-image: $bg-mask-ink-splat; + mask-repeat: no-repeat; + mask-size: contain; + mask-position: center; +} diff --git a/src/css/main.scss b/src/css/main.scss index 57955b9..75105c2 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -221,20 +221,61 @@ body.has-modal #main { .panel-container { position: relative; - .alpha, .bravo { - @extend .font-splatoon1; - @extend .title-color; - @extend .is-size-5; + .labels { + .alpha, .bravo { + @extend .font-splatoon1; + @extend .title-color; + @extend .is-size-5; + position: absolute; + bottom: 0.25rem; + } + + .alpha { + left: 0.25rem; + } + + .bravo { + right: 0.25rem; + } + } + + .results { position: absolute; - bottom: 0.25rem; - } + top: 25px; + left: 15%; + right: 15%; - .alpha { - left: 0.25rem; - } + background: rgba($white-ter, 0.75); + border-radius: 15px; + padding: 10px; - .bravo { - right: 0.25rem; + .result { + background: rgba($black-ter, 0.65); + border-radius: 200px; + + margin: 10px 0 0 0; + + .level-item { + padding: 8px 0; + position: relative; + + .winner-mark { + @extend .bg-mask-ink-splat; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + + z-index: 0; + margin: -5px; + } + + .title { + z-index: 1; + } + } + } } } diff --git a/src/img/bg-mask-ink-splat.svg b/src/img/bg-mask-ink-splat.svg new file mode 100644 index 0000000..67e43b9 --- /dev/null +++ b/src/img/bg-mask-ink-splat.svg @@ -0,0 +1 @@ +ink_1 \ No newline at end of file diff --git a/src/js/components/App.vue b/src/js/components/App.vue index a4edd58..0d2bcac 100644 --- a/src/js/components/App.vue +++ b/src/js/components/App.vue @@ -83,7 +83,7 @@
- +
@@ -213,15 +213,17 @@ export default { showFestivalRegionDropdown() { if (this.festivals) return Object.values(this.festivals).some(arr => arr.length > 0); - // return this.festivals.na.length > 0 || this.festivals.eu.length > 0 || this.festivals.jp.length > 0; }, selectedFestival() { if (this.festivals && this.selectedRegionKey) return this.festivals[this.selectedRegionKey][0]; }, + selectedFestivalResults() { + if (this.selectedFestival) + return this.splatnet.festivals[this.selectedRegionKey].results.find(r => r.festival_id == this.selectedFestival.festival_id); + }, isSelectedFestivalActive() { - return this.selectedFestival && this.selectedFestival.times.start <= this.now; - // return this.festival && this.festival.times.start <= this.now && this.festival.times.end > this.now; + return this.selectedFestival && this.selectedFestival.times.start <= this.now && this.selectedFestival.times.end > this.now; }, // Salmon Run @@ -333,7 +335,10 @@ export default { return item.end_time > this.now; }, filterFestivals(item) { - return item.times.end > this.now; + // We want to show future/current festivals and festivals that ended recently (so we can show their results) + // Filter based on the result time and show festival results for 2 days + let cutoff = item.times.result + 172800; // 2 days + return cutoff > this.now; }, }, } diff --git a/src/js/components/splatoon/SplatfestBox.vue b/src/js/components/splatoon/SplatfestBox.vue index 1aa6877..9ab5378 100644 --- a/src/js/components/splatoon/SplatfestBox.vue +++ b/src/js/components/splatoon/SplatfestBox.vue @@ -10,12 +10,18 @@
-
- {{ festival.names.alpha_short }} -
-
- {{ festival.names.bravo_short }} + +
+
+ {{ festival.names.alpha_short }} +
+ +
+ {{ festival.names.bravo_short }} +
+ +
@@ -29,13 +35,19 @@
-