feat: updated bottom menu toggle logic and hurst bands color
This commit is contained in:
23
index.html
23
index.html
@ -158,7 +158,7 @@
|
||||
<span class="material-symbols-outlined group-hover:text-blue-400">show_chart</span>
|
||||
<span class="text-[10px] font-medium mt-1">Markets</span>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center text-[#b6c4ff] bg-[#2962ff]/10 rounded-xl px-4 py-1.5 transition-transform duration-200 cursor-pointer border border-[#2962ff]/20">
|
||||
<div class="flex flex-col items-center justify-center text-[#b6c4ff] bg-[#2962ff]/10 rounded-xl px-4 py-1.5 transition-transform duration-200 cursor-pointer border border-[#2962ff]/20" onclick="window.hideAllPanels()">
|
||||
<span class="material-symbols-outlined">candlestick_chart</span>
|
||||
<span class="text-[10px] font-bold mt-1">Chart</span>
|
||||
</div>
|
||||
@ -184,7 +184,7 @@
|
||||
<button class="sidebar-tab active text-xs uppercase tracking-wider font-bold" data-tab="indicators">Indicators</button>
|
||||
<button class="sidebar-tab text-xs uppercase tracking-wider font-bold" data-tab="strategy">Strategy</button>
|
||||
</div>
|
||||
<button class="text-gray-400 hover:text-white p-1 hover:bg-[#2d3a4f] rounded" onclick="document.getElementById('rightSidebar').classList.add('collapsed')">
|
||||
<button class="text-gray-400 hover:text-white p-1 hover:bg-[#2d3a4f] rounded" onclick="window.hideAllPanels()">
|
||||
<span class="material-symbols-outlined">close</span>
|
||||
</button>
|
||||
</div>
|
||||
@ -226,7 +226,17 @@
|
||||
const sidebar = document.getElementById('rightSidebar');
|
||||
if (!sidebar) return;
|
||||
|
||||
// Remove collapsed class to show
|
||||
const isOpen = !sidebar.classList.contains('collapsed');
|
||||
const activeTab = document.querySelector('.sidebar-tab.active');
|
||||
const currentTabName = activeTab ? activeTab.dataset.tab : null;
|
||||
|
||||
// If sidebar is open AND the clicked tab is already active, CLOSE IT.
|
||||
if (isOpen && currentTabName === tabName) {
|
||||
sidebar.classList.add('collapsed');
|
||||
return; // Done
|
||||
}
|
||||
|
||||
// Otherwise, OPEN it (remove collapsed) and switch tab
|
||||
sidebar.classList.remove('collapsed');
|
||||
|
||||
if (tabName) {
|
||||
@ -237,6 +247,13 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.hideAllPanels = function() {
|
||||
const sidebar = document.getElementById('rightSidebar');
|
||||
if (sidebar) {
|
||||
sidebar.classList.add('collapsed');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<script src="./config.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user