From 401a2921c8661b4e72386f54e793c083c1cffa89 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 18 May 2024 11:43:27 +0200 Subject: [PATCH] Added sample UI to config --- src/index.html | 1 + src/lib/toggle.css | 67 ++++++++++++++++++++++++++++++++++++ src/views/config/config.html | 48 ++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 src/lib/toggle.css diff --git a/src/index.html b/src/index.html index 4ad4c59..a0717d2 100644 --- a/src/index.html +++ b/src/index.html @@ -6,6 +6,7 @@ + diff --git a/src/lib/toggle.css b/src/lib/toggle.css new file mode 100644 index 0000000..69b27a5 --- /dev/null +++ b/src/lib/toggle.css @@ -0,0 +1,67 @@ +.toggle-switch { + position: relative; + display: inline-block; + width: 80px; + height: 40px; + cursor: pointer; +} + +.toggle-switch input[type="checkbox"] { + display: none; +} + +.toggle-switch-background { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #ddd; + border-radius: 20px; + box-shadow: inset 0 0 0 2px #ccc; + transition: background-color 0.3s ease-in-out; +} + +.toggle-switch-handle { + position: absolute; + top: 5px; + left: 5px; + width: 30px; + height: 30px; + background-color: #fff; + border-radius: 50%; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + transition: transform 0.3s ease-in-out; +} + +.toggle-switch::before { + content: ""; + position: absolute; + top: -25px; + right: -35px; + font-size: 12px; + font-weight: bold; + color: #aaa; + text-shadow: 1px 1px #fff; + transition: color 0.3s ease-in-out; +} + +.toggle-switch input[type="checkbox"]:checked + .toggle-switch-handle { + transform: translateX(45px); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 0 3px #05c46b; +} + +.toggle-switch input[type="checkbox"]:checked + .toggle-switch-background { + background-color: #05c46b; + box-shadow: inset 0 0 0 2px #04b360; +} + +.toggle-switch input[type="checkbox"]:checked + .toggle-switch:before { + content: "On"; + color: #05c46b; + right: -15px; +} + +.toggle-switch input[type="checkbox"]:checked + .toggle-switch-background .toggle-switch-handle { + transform: translateX(40px); +} diff --git a/src/views/config/config.html b/src/views/config/config.html index 1713c02..e983029 100644 --- a/src/views/config/config.html +++ b/src/views/config/config.html @@ -7,6 +7,54 @@

Create and manage filtering rules

+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
#String to ReplaceReplace WithEnabled by defaultAction

1

+ + + +
\ No newline at end of file