diff --git a/static/assets/css/style.css b/static/assets/css/style.css index df93c91..19c2941 100644 --- a/static/assets/css/style.css +++ b/static/assets/css/style.css @@ -53,7 +53,6 @@ button { font-optical-sizing: auto; font-weight: 400; font-style: normal; - user-select: none; transform: scale(1.2); filter: blur(10px); @@ -83,4 +82,29 @@ body.history-open .calculator { transform: scale(0.8); filter: blur(10px); opacity: 0.4; +} + +.settings-container { + position: absolute; + width: 100%; + height: 80%; + bottom: -80%; + left: 0; + + font-family: "IBM Plex", sans-serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + + z-index: 150; + + transition: all 0.4s; +} + +body.settings-open .settings-container { + bottom: 0; +} + +body.settings-open .calculator { + transform: translateY(-80%); } \ No newline at end of file diff --git a/static/assets/js/calculator-logic.js b/static/assets/js/calculator-logic.js index 086104d..2a47c1a 100644 --- a/static/assets/js/calculator-logic.js +++ b/static/assets/js/calculator-logic.js @@ -13,6 +13,8 @@ buttons.forEach(button => { resetCalculator(); } else if (value === 'H') { toggleHistory(); + } else if (value === '') { + toggleSettings(); } else if (value === '=') { calculateResult(); } else { @@ -134,6 +136,10 @@ function toggleHistory() { } } +function toggleSettings() { + $('body').toggleClass('settings-open'); +} + $('#history').on('click', toggleHistory); function clearDisplay() { diff --git a/static/index.html b/static/index.html index bf28180..5d38301 100644 --- a/static/index.html +++ b/static/index.html @@ -50,6 +50,12 @@ +