diff --git a/css/dashboard.css b/css/dashboard.css new file mode 100644 index 0000000..7812491 --- /dev/null +++ b/css/dashboard.css @@ -0,0 +1,42 @@ +.dashboard { + background: var(--panel-bg); + height: 100%; + z-index: 7; + /*border-radius: var(--rounded-radius);*/ + backdrop-filter: blur(var(--blur-strength)); + + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.rightDashboardBody { + margin: 10px; + height: auto; + width: 330px; +} + +#rightDashboard { + width: 0; + right: 0; + position: absolute; + overflow-x: hidden; + overflow-y: auto; + box-sizing: border-box; + scrollbar-width: none; + transition: width var(--transition-speed); +} + +/*Hide scrollbar*/ +#rightDashboard::-webkit-scrollbar { + display: none; +} + +.showRightDashboard { + width: 350px !important; + z-index: 7 !important; + scrollbar-width: none !important; +} \ No newline at end of file diff --git a/css/style.css b/css/style.css index 7cae70c..7c7ec49 100644 --- a/css/style.css +++ b/css/style.css @@ -9,6 +9,7 @@ @import url('centered-box-overlay.css'); @import url('profile-image.css'); @import url('search-box.css'); +@import url('dashboard.css'); :root { /* Colors */ diff --git a/index.html b/index.html index aa7a86a..a044e25 100644 --- a/index.html +++ b/index.html @@ -55,11 +55,19 @@ +
+
+

gagoka

+
+
+ + + \ No newline at end of file diff --git a/js/animate-dashboard.js b/js/animate-dashboard.js new file mode 100644 index 0000000..a0b7fba --- /dev/null +++ b/js/animate-dashboard.js @@ -0,0 +1,41 @@ +var dashboard = document.getElementById("rightDashboard"); + +let rightDashboardVisibility = false; + + +const showDashboard = () => { + dashboard.classList.add('showRightDashboard'); + + rightDashboardVisibility = !rightDashboardVisibility; +} + +const hideDashboard = () => { + dashboard.classList.remove('showRightDashboard'); + dashboard.scrollTop = 0; + + rightDashboardVisibility = !rightDashboardVisibility; +} + +const toggleDashboard = () => { + + // If profile anim is still running, + // Return to avoid spam + if (profileAnimRunning) return; + + // Rotate profile + rotateProfile(); + + if (rightDashboardVisibility) { + // Hide search box + hideDashboard(); + + } else { + // Show search box + showDashboard(); + } + + // Show overlay + // centeredBoxOverlay.classList.toggle('showOverlay'); + + console.log('toggle dashboard'); +} \ No newline at end of file diff --git a/js/dock-buttons.js b/js/dock-buttons.js index 004aed7..d852cb2 100644 --- a/js/dock-buttons.js +++ b/js/dock-buttons.js @@ -89,7 +89,7 @@ const populateDock = () => { 'dashboard', () => { // Toggle dashboard - alert('toggle dashboard'); + toggleDashboard(); } );