From e373241f8e27472907c1a7680a538dd1270ade2c Mon Sep 17 00:00:00 2001 From: Roy Palkovitch Date: Fri, 2 Dec 2022 09:48:23 +0200 Subject: [PATCH] first commit --- src/config.html | 1 - src/dark_style.css | 1 + src/index.html | 2 -- src/js/calculator.js | 2 +- src/style.css | 1 + src/ts/application.ts | 1 + src/ts/calculator.ts | 2 ++ 7 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/config.html b/src/config.html index 8dd11b5..93829f9 100644 --- a/src/config.html +++ b/src/config.html @@ -11,7 +11,6 @@

user config:

- diff --git a/src/dark_style.css b/src/dark_style.css index ac54325..30bf9fe 100644 --- a/src/dark_style.css +++ b/src/dark_style.css @@ -8,6 +8,7 @@ body.dark .col{ background-color: #3d3b3b ; } + body.dark #center > .col > .row > .col{ background-color: #707681; font-weight: bold; diff --git a/src/index.html b/src/index.html index 5104582..21b0602 100644 --- a/src/index.html +++ b/src/index.html @@ -110,6 +110,4 @@ - - \ No newline at end of file diff --git a/src/js/calculator.js b/src/js/calculator.js index 3407a4b..b897bf2 100644 --- a/src/js/calculator.js +++ b/src/js/calculator.js @@ -395,7 +395,7 @@ function render() { } async function remoteCalc(num) { document.body.style.pointerEvents = 'none'; - return fetch('http://api.mathjs.org/v4/?expr=' + encodeURIComponent(num)) + return fetch('https://api.mathjs.org/v4/?expr=' + encodeURIComponent(num)) .then(response => response.text()) .then(response => response) .finally(() => document.body.style.pointerEvents = ''); diff --git a/src/style.css b/src/style.css index 8464ba0..2cf8b33 100644 --- a/src/style.css +++ b/src/style.css @@ -134,6 +134,7 @@ img{ } + #popup{ grid-column: 2 / 2; grid-row: 1/3 ; diff --git a/src/ts/application.ts b/src/ts/application.ts index 8dbd4ee..1ece640 100644 --- a/src/ts/application.ts +++ b/src/ts/application.ts @@ -65,6 +65,7 @@ const buttonsRight = () => { + function toggleButtons(tag: Element) { switch (tag.id) { case 'show-info': diff --git a/src/ts/calculator.ts b/src/ts/calculator.ts index ddb3bbe..55626c5 100644 --- a/src/ts/calculator.ts +++ b/src/ts/calculator.ts @@ -4,6 +4,8 @@ const sciOperators: { '^': string, 'root': string } = { 'root': 'root' }; + + const operators: { '*': string, '/': string, '-': string, '+': string, '%':string } = { '*': '*', '/': '/',