From 59aa29833c80869509c481ca9e62b424959b7f3f Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 19 Feb 2022 21:36:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- output/template.hbs | 46 +++++++++++++++++++++++++++------------------ public/index.js | 14 ++++++++++++++ public/style.css | 4 ---- 3 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 public/index.js diff --git a/output/template.hbs b/output/template.hbs index 0113977..0f693d8 100644 --- a/output/template.hbs +++ b/output/template.hbs @@ -10,29 +10,39 @@

Warframe Market Gaps

+ + + 1 + - - - - - - - {{#each items}} - - - - - - - {{/each}} + + + + + + + + + + {{#each items}} + + + + + + + {{/each}} +
NameParts priceSet priceDifference
- - {{this.name}} - - {{this.parts}}{{this.set}}{{this.difference}}
NameParts priceSet priceDifference
+ + {{this.name}} + + {{this.parts}}{{this.set}}{{this.difference}}
Generated at {{timestamp}}
+ + \ No newline at end of file diff --git a/public/index.js b/public/index.js new file mode 100644 index 0000000..81d6613 --- /dev/null +++ b/public/index.js @@ -0,0 +1,14 @@ +const slider = document.getElementById('minDifference') + +slider.addEventListener('input', function (event) { + const table = document.getElementById('items') + Array.from(table.children).forEach(row => { + if (row.dataset.difference < Number(event.target.value)) { + row.style.display = 'none' + } else { + row.style.display = 'table-row' + } + }) + + document.getElementById('filterValue').innerText = event.target.value +}) diff --git a/public/style.css b/public/style.css index fe14b7e..972a845 100644 --- a/public/style.css +++ b/public/style.css @@ -16,10 +16,6 @@ tr { text-align: left; } -tr:nth-child(even) { - background: rgb(240, 242, 243); -} - td { padding: 2px 16px; }