diff --git a/static/css/style.css b/static/css/style.css index 1ab7f0b..2f1a795 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -21,12 +21,52 @@ body { border-bottom-width: 1px; } +.burgerDropdown { + position: fixed; + z-index: 2; + left: 7px; + top: 30px; + width: 160px; + height: 90px; + + background-color: rgba(233, 233, 233, 0.5); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + + border: solid; + border-color: #dadada; + border-width: 1px; + border-radius: 8px; +} + +.burgerDropdown a { + position: absolute; + width: calc(100% - 14px - 4px - 7px); + color: black; + background-color: #ffffff; + + height: 35px; + line-height: 35px; + margin: 7px; + padding-left: 7px; + + border: solid; + border-color: #dadada; + border-width: 1px; + border-radius: 8px; + + font-size: 15px; + + text-decoration: none; +} + .topBar p { display: inline-block; } .topBar .logo { padding-left: 12px; + cursor: pointer; } .topBar .usernameBox { diff --git a/static/js/main.js b/static/js/main.js index c93e57d..f6cb585 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -27,6 +27,8 @@ let notesDiv = document.getElementById("notesDiv") let newNote = document.getElementById("newNote") let noteBox = document.getElementById("noteBox") let loadingStuff = document.getElementById("loadingStuff") +let burgerDropdown = document.getElementById("burgerDropdown") +let burgerButton = document.getElementById("burgerButton") for (let i = 0; i < 40; i++) { notesDiv.appendChild(loadingStuff.cloneNode()) @@ -289,4 +291,18 @@ newNote.addEventListener("click", (event) => { } }); } +}); +document.body.addEventListener("click", (event) => { + if (event.clientX > 100) { + burgerDropdown.classList.add("hidden") + } + if (event.clientY > 50) { + burgerDropdown.classList.add("hidden") + } +}); +burgerButton.addEventListener("click", (event) => { + burgerDropdown.classList.remove("hidden") + + burgerDropdown.style.left = String(event.clientX) + "px" + burgerDropdown.style.top = String(event.clientY) + "px" }); \ No newline at end of file diff --git a/templates/app.html b/templates/app.html index 836f27d..ad165cb 100644 --- a/templates/app.html +++ b/templates/app.html @@ -14,7 +14,7 @@
- +

@@ -25,6 +25,11 @@ + +