diff --git a/app/wol/static/css/slider.css b/app/wol/static/css/slider.css new file mode 100644 index 00000000..3d7878e6 --- /dev/null +++ b/app/wol/static/css/slider.css @@ -0,0 +1,59 @@ +.switch { + position: relative; + display: inline-block; + width: 45px; + height: 25px; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 18px; + width: 18px; + left: 5px; + bottom: 4px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked+.slider { + background-color: #2196F3; +} + +input:focus+.slider { + box-shadow: 0 0 1px #2196F3; +} + +input:checked+.slider:before { + -webkit-transform: translateX(17px); + -ms-transform: translateX(17px); + transform: translateX(17px); +} + +/* Rounded sliders */ +.slider.round { + border-radius: 15px; +} + +.slider.round:before { + border-radius: 50%; +} \ No newline at end of file diff --git a/app/wol/static/css/style.css b/app/wol/static/css/style.css index ef7657e2..ee80fddf 100644 --- a/app/wol/static/css/style.css +++ b/app/wol/static/css/style.css @@ -71,6 +71,10 @@ flex-shrink: unset; } +.section.settings { + padding: 0; +} + @media (prefers-color-scheme: dark) { .box { background-color: var(--box-bg); diff --git a/app/wol/templates/wol/index.html b/app/wol/templates/wol/index.html index 4174ed1e..838e1002 100644 --- a/app/wol/templates/wol/index.html +++ b/app/wol/templates/wol/index.html @@ -29,6 +29,14 @@
+ Settings +
+