From 50ff59239c15d0fe6225fdc7f3252feb29d4ec80 Mon Sep 17 00:00:00 2001 From: Aircoookie Date: Sat, 1 Feb 2020 00:36:00 +0100 Subject: [PATCH 1/3] Segment grouping HTML support --- wled00/data/index.htm | 123 +++++++++++++++++++++++++++++++++--------- 1 file changed, 97 insertions(+), 26 deletions(-) diff --git a/wled00/data/index.htm b/wled00/data/index.htm index e7ea5e75..4d8cff08 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -46,6 +46,12 @@ p { color: #ddd; } +td { + text-align: center; + text-transform: uppercase; + font-size: 14px; +} + button { outline: none; cursor: pointer; @@ -86,6 +92,15 @@ button { margin: -2px 0 4px 0; } +table { + table-layout: fixed; + width: 76%; +} + +td { + text-align: center; +} + .slider-icon { transform: translateY(2px); @@ -432,8 +447,8 @@ input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; } -.botpad { - margin-bottom: 16px !important; +.segn { + margin: 3px 0 6px 0 !important; } .ic { @@ -470,11 +485,19 @@ input[type=number]::-webkit-outer-spin-button { } .cnf { - position: absolute; - top: 75px; - right: 60px; - color: #fff; - cursor: pointer; + position: absolute; + top: 66px; + right: 28px; + color: #fff; + cursor: pointer; + background: #333; + padding: 43px 6px; + border-radius: 5px; +} + +.half { + padding: 6px 6px; + top: 64px; } .del { @@ -572,8 +595,13 @@ input[type=number]::-webkit-outer-spin-button { .h { font-size: 13px; + text-align: center; color: #bbb; - text-align: left; + margin-bottom: 5px; +} + +.bp { + margin-bottom: 5px; } .seg { @@ -734,8 +762,8 @@ input[type=number]::-webkit-outer-spin-button {
First preset:
Last preset:
- Time per preset: s
- Transition: s + Time per preset: s
+ Transition: s @@ -864,9 +892,27 @@ function populateSegments(s)
- Start LED:
- Stop LED: - (${inst.stop - inst.start} LED${inst.stop - inst.start > 1 ? "s":""})
+ + + + + + + + + +
Start LEDStop LED
+ + + + + + + + + +
GroupingSpacing
+
${inst.stop - inst.start} LED${inst.stop - inst.start > 1 ? "s":""} (${Math.ceil((inst.stop - inst.start)/(inst.grp + inst.spc))} virtual)
- Start LED:
- Stop LED: - (${ledCount - ns} LEDs)
- + + + + + + + + + +
Start LEDStop LED
+
${ledCount - ns} LEDs
+
`; d.getElementById('segutil').innerHTML = cn; @@ -1130,6 +1194,13 @@ function setSeg(s){ var stop = parseInt(d.getElementById(`seg${s}e`).value); if (stop <= start) {delSeg(s); return;}; var obj = {"seg": {"id": s, "start": start, "stop": stop}}; + if (d.getElementById(`seg${s}grp`)) + { + var grp = parseInt(d.getElementById(`seg${s}grp`).value); + var spc = parseInt(d.getElementById(`seg${s}spc`).value); + obj.seg.grp = grp; + obj.seg.spc = spc; + } requestJson(obj); } From 773d6e002c87de8ef084056d63e4d88918a78528 Mon Sep 17 00:00:00 2001 From: Aircoookie Date: Tue, 4 Feb 2020 17:43:46 +0100 Subject: [PATCH 2/3] Add discourse to readme --- readme.md | 4 +++- wled00/data/index.htm | 53 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index 8a9d2ada..cdcd7b76 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,7 @@ ![WLED logo](https://raw.githubusercontent.com/Aircoookie/WLED/master/wled_logo.png) [![](https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square)](https://github.com/Aircoookie/WLED/releases) +[![](https://img.shields.io/discourse/topics?color=%230000ac&label=forum&server=https://wled.discourse.group?style=flat-square)](https://wled.discourse.group) [![](https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square)](https://discord.gg/KuqP7NE) [![](https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square)](https://github.com/Aircoookie/WLED/wiki) [![](https://img.shields.io/badge/app-wled-blue.svg?style=flat-square)](https://github.com/Aircoookie/WLED-App) @@ -57,7 +58,8 @@ Credits [here](https://github.com/Aircoookie/WLED/wiki/Contributors-&-About)! Uses Linearicons by Perxis! Join the Discord [server](https://discord.gg/KuqP7NE) to discuss everything about WLED! -You can also send me mails to [dev.aircoookie@gmail.com](mailto:dev.aircoookie@gmail.com). +Check out the WLED [Discourse forum](https://wled.discourse.group)! +You can also send me mails to [dev.aircoookie@gmail.com](mailto:dev.aircoookie@gmail.com), but please only do so if you want to talk to me privately. If WLED really brightens up your every day, you can [![](https://img.shields.io/badge/send%20me%20a%20small%20gift-paypal-blue.svg?style=flat-square)](https://paypal.me/aircoookie) *Disclaimer:* diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 4d8cff08..1cc88083 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -385,7 +385,7 @@ input[type=range]::-ms-thumb { background-color: #333; color: white; border: 0px solid white; - border-radius: 5px; + border-radius: 25px; filter: drop-shadow(0px 0px 2px #000); transition-duration: 0.5s; -webkit-backface-visibility: hidden; @@ -402,13 +402,32 @@ input[type=range]::-ms-thumb { vertical-align: middle; } +.qcs-w { + margin-top: 10px; +} +.qcs { + padding: 14px; + margin: 2px; + border-radius: 14px; + display: inline-block; +} +.qcsb { + padding: 13px; + border: 1px solid white; +} + +.cl { + width: 42px; +} + select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background: url("data:image/svg+xml;utf8,") no-repeat; background-size: 12px; - background-position: 210px 16px; + background-position: 206px 16px; + padding-left: 12px !important; background-repeat: no-repeat; outline: none; } @@ -455,13 +474,13 @@ input[type=number]::-webkit-outer-spin-button { padding: 6px 0 0 0; } -.xs { - width: 60px; +.xxs { + width: 40px; + margin: 6px; } -.xxs { - width: 42px; - margin: 8px; +.rect { + border-radius: 5px; } .psts { @@ -597,7 +616,6 @@ input[type=number]::-webkit-outer-spin-button { font-size: 13px; text-align: center; color: #bbb; - margin-bottom: 5px; } .bp { @@ -680,6 +698,19 @@ input[type=number]::-webkit-outer-spin-button {
+
+
+
+
+
+
+

+
+
+
+
+
R
+
@@ -1179,7 +1210,7 @@ function makeSeg() { } function resetUtil() { - var cn = `
`; + var cn = `
`; d.getElementById('segutil').innerHTML = cn; } @@ -1296,9 +1327,9 @@ function selectSlot(b) { cd[i].style.margin="5px"; cd[i].style.width="42px"; } - cd[csel].style.border="6px solid white"; + cd[csel].style.border="5px solid white"; cd[csel].style.margin="2px"; - cd[csel].style.width="54px"; + cd[csel].style.width="50px"; if (cpick.color.rgbString !== cd[csel].style.backgroundColor) { cpick.color.set(cd[csel].style.backgroundColor); } From fa7092cc17fafced658d47865d962b2f7b18267d Mon Sep 17 00:00:00 2001 From: Aircoookie Date: Tue, 4 Feb 2020 17:46:43 +0100 Subject: [PATCH 3/3] Fix discourse badge --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index cdcd7b76..044344ea 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ ![WLED logo](https://raw.githubusercontent.com/Aircoookie/WLED/master/wled_logo.png) [![](https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square)](https://github.com/Aircoookie/WLED/releases) -[![](https://img.shields.io/discourse/topics?color=%230000ac&label=forum&server=https://wled.discourse.group?style=flat-square)](https://wled.discourse.group) +[![](https://img.shields.io/discourse/topics?colorB=blue&label=forum&server=https%3A%2F%2Fwled.discourse.group%2F&style=flat-square)](https://wled.discourse.group) [![](https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square)](https://discord.gg/KuqP7NE) [![](https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square)](https://github.com/Aircoookie/WLED/wiki) [![](https://img.shields.io/badge/app-wled-blue.svg?style=flat-square)](https://github.com/Aircoookie/WLED-App)