diff --git a/public/elotracker/chart-integration.js b/public/elotracker/chart-integration.js index 1615a21..418bf4a 100644 --- a/public/elotracker/chart-integration.js +++ b/public/elotracker/chart-integration.js @@ -378,11 +378,15 @@ function getColor(num) { function toggle_combined_chart() { const comb_charts = this.parentNode.parentNode.querySelectorAll(`.leaderboard>.graph-wrapper`); const chart = this.parentNode.parentNode.querySelector(`.graph-wrapper.${this.id}`); + const buttons = document.querySelectorAll("button.open-general-graph"); if (chart.classList.contains("closed")) { comb_charts.forEach(element => element.classList.add("closed")); + buttons.forEach(element => element.classList.remove("dropdown-open")); chart.classList.remove("closed"); + this.classList.add("dropdown-open"); } else { chart.classList.add("closed"); + this.classList.remove("dropdown-open"); } } diff --git a/public/elotracker/index.php b/public/elotracker/index.php index a268a67..bd5c26f 100644 --- a/public/elotracker/index.php +++ b/public/elotracker/index.php @@ -14,8 +14,8 @@
- - + +
diff --git a/public/elotracker/styles.css b/public/elotracker/styles.css index 5e97743..d51607e 100644 --- a/public/elotracker/styles.css +++ b/public/elotracker/styles.css @@ -38,6 +38,9 @@ button[disabled] { button[disabled]:hover { background-color: initial; } +button svg { + transition: transform 400ms; +} .uem-logo-header { display: flex; @@ -56,6 +59,18 @@ button.update-leaderboard { align-items: center; margin-bottom: 8px; } +button.open-general-graph { + display: flex; + flex-direction: row; + gap: 4px; + align-items: center; +} +button.dropdown-open { + background-color: #1f2931; +} +button.dropdown-open svg { + transform: rotateX(180deg); +} button.progress-button { position: relative; overflow: hidden; @@ -81,6 +96,12 @@ button.button-updating svg { to { transform: rotate(-360deg)} } +.combined-charts-buttons { + display: flex; + flex-direction: row; + gap: 4px; +} + .leaderboard { display: flex; flex-direction: column; diff --git a/public/img/material-symbols/keyboard_arrow_down_24dp_FILL1_wght300_GRAD0_opsz24.svg b/public/img/material-symbols/keyboard_arrow_down_24dp_FILL1_wght300_GRAD0_opsz24.svg new file mode 100644 index 0000000..4dcc74c --- /dev/null +++ b/public/img/material-symbols/keyboard_arrow_down_24dp_FILL1_wght300_GRAD0_opsz24.svg @@ -0,0 +1 @@ + \ No newline at end of file