From 6aee48932f6d394c8dd1db3c9f644f305de3beb6 Mon Sep 17 00:00:00 2001 From: HaykalRadiandra Date: Wed, 3 Aug 2022 07:16:51 +0700 Subject: [PATCH] Mengatasi error(js & html) dan sudah selesai --- assets/Storage.js | 4 ++-- assets/kalkulator.js | 4 ++-- assets/style.css | 10 +++++++++- index.html | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/assets/Storage.js b/assets/Storage.js index a5ea068..48c7a5d 100644 --- a/assets/Storage.js +++ b/assets/Storage.js @@ -34,7 +34,7 @@ function showHistory() { function renderHistory() { const historyData = showHistory(); let historyList = document.querySelector("#historyList"); - historyList.innerHTML = ""; + historyList.innerHTML=""; for (let history of historyData) { let row = document.createElement('tr'); @@ -46,5 +46,5 @@ function renderHistory() { historyList.appendChild(row); } } - + renderHistory(); \ No newline at end of file diff --git a/assets/kalkulator.js b/assets/kalkulator.js index 47e6c99..edfa94f 100644 --- a/assets/kalkulator.js +++ b/assets/kalkulator.js @@ -65,8 +65,8 @@ function performCalculation() { putHistory(history); calculator.displayNumber = result; renderHistory(); -} - + } + const buttons = document.querySelectorAll('.button'); for (const button of buttons) { button.addEventListener('click', function (event) { diff --git a/assets/style.css b/assets/style.css index 1564f89..29af45a 100644 --- a/assets/style.css +++ b/assets/style.css @@ -62,7 +62,15 @@ text-shadow: 2px 2px 4px white; } - @media screen and (max-width: 992px) { + @media screen and (max-width: 513px) { + + /* .button { + padding: 10px; + } + + .history { + width: 100%; + } */ .card { padding: 15px; diff --git a/index.html b/index.html index 1123a1e..59d6b43 100644 --- a/index.html +++ b/index.html @@ -50,7 +50,7 @@

Riwayat Perhitungan

Hasil - +