Skip to content

Commit

Permalink
chore/feat(ctwc_vn_24): feature parity with ctwc23 and CTVS Winter 20…
Browse files Browse the repository at this point in the history
…24 borders
  • Loading branch information
TwoQuantumBits authored Dec 6, 2024
1 parent e60286f commit 4d90d14
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
Binary file added public/views/border_3px_ctvswinter.webp
Binary file not shown.
51 changes: 49 additions & 2 deletions public/views/mp/ctwc_vn_24.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@

.hearts {
bottom: -766px;
width: 24px;
padding-right: 0;
height: unset;
font-size: 0px;
line-height: 32px;
display: flex;
flex-direction: column;
}

.hearts span {
Expand All @@ -188,7 +189,7 @@
background: url(/views/heart_grey.png);
background-repeat: no-repeat;
background-position: center left;
display: block;
display: inline-block;
}

.hearts span.win {
Expand Down Expand Up @@ -300,6 +301,7 @@
}

.p2 > * {
right: unset;
left: var(--offset);
}

Expand Down Expand Up @@ -384,6 +386,39 @@
bottom: unset;
top: 477px;
}

.heartpos1 .match.small .hearts {
top: 311px;
--offset: 459px;
}
.heartpos2 .match.small .hearts {
top: 139px;
--offset: 535px;
}
.heartpos3 .match.small .hearts,
.heartpos4 .match.small .hearts {
--border-size: 14;
width: unset;
top: 91px;
--offset: 707px;
height: 29px;
padding: 0 6px 0 9px;
gap: 2px;
flex-direction: row;
}
.heartpos3 .match.small .p2 .hearts,
.heartpos4 .match.small .p2 .hearts {
right: unset;
}
.heartpos4 .match.small .hearts {
left: -1325px;
right: unset;
}
.heartpos4 .match.small .p2 .hearts {
left: unset;
right: -1325px;
}

.match.small .flag,
.match.small .name {
z-index: 6;
Expand Down Expand Up @@ -550,6 +585,12 @@
import InvisibleMixin from '/views/InvisibleMixin.js';
import { easeOutElastic } from '/js/anim.js';

if (/^[1234]$/.test(QueryString.get('heartpos'))) {
document
.querySelector('#stream_bg')
.classList.add(`heartpos${QueryString.get('heartpos')}`);
}

const isDAS = QueryString.get('style') === 'das';
const hasAds = QueryString.get('ads') === '1';

Expand Down Expand Up @@ -601,6 +642,12 @@
'.box { border-image-source: url(/views/border_3px_ctwcvn.webp) }'
);
document.adoptedStyleSheets = [stylesheet];
} else if (QueryString.get('box_border') === 'vswinter') {
const stylesheet = new CSSStyleSheet();
stylesheet.replaceSync(
'.box { border-image-source: url(/views/border_3px_ctvswinter.webp) }'
);
document.adoptedStyleSheets = [stylesheet];
}

let images;
Expand Down

0 comments on commit 4d90d14

Please sign in to comment.