From caf5083caae7bd160e2582a6e35463b00e567b46 Mon Sep 17 00:00:00 2001 From: OFF0 Date: Mon, 16 Jan 2023 09:09:18 +0100 Subject: [PATCH] nip-13: difficulty filter added a slider to adjust the difficulty filter, current default is 0 so all notes are rendered. increasing the filter will hide notes with lower difficulty target. changed the max difficulty from 256 to 32 for now so that the range slider is usable. this does not yet hide reactions with lower difficulty. --- src/form.css | 9 +++++---- src/index.html | 10 +++++++++- src/main.js | 27 +++++++++++++++++++++++++-- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/form.css b/src/form.css index 562c7a0..200476e 100644 --- a/src/form.css +++ b/src/form.css @@ -52,9 +52,13 @@ textarea { border: .2rem solid #b7b7b7; border-radius: .2rem; display: block; - margin: 0 0 1.2rem 0; + margin: 0 0 var(--gap-half) 0; padding: var(--padding); } +label.number, +input[type="range"] { + margin: 0 0 var(--gap) 0; +} input[type="number"]:focus, input[type="password"]:focus, input[type="text"]:focus, @@ -194,9 +198,6 @@ label.number { gap: var(--gap); padding: 0; } -* + label.number { - margin: var(--gap) 0 0 0; -} label.number span { flex-grow: 1; padding: 0 0 0 var(--padding); diff --git a/src/index.html b/src/index.html index 31493a0..333f00c 100644 --- a/src/index.html +++ b/src/index.html @@ -84,6 +84,14 @@
+ +