Skip to content

Commit

Permalink
Themes, table column values, 3-state bool, insRow, delRow
Browse files Browse the repository at this point in the history
index.css + index.html
- add theme dropdown
- themes: add :root (WIP)
- use in h1, h2, th, module,  mdlColumn, over (WIP)

index.js
- remove varNodeMapping
- add theme
- add genTableRowHTML

index.js: genHTML
- table, add insRow/+ button
- uiFun handling: -1 for requested, -2 for processed
- remove varNodeMapping

index.js: receiveData
- remove varNodeMapping

index.js: changeHTML
- simplify label
- value / table: simplify using genTableRowHTML
- value / th: refactor supporting column values and simplify using genTableRowHTML
- value / checkbox: support indeterminate
- advanced value assignment
- add setTheme and getTheme

SysModModel:
- getValue: add optional rowNr

SysModPins
- pinTbl readonly (no insRow and delRow)
- pinNr default empty

SysModUI
- vlTbl default ro
- vlloops default empty
- processJson: add insRow and delRow (WIP)
- insVars: add count and valueFun (WIP)!
- 3-state boolean
- initVarAndUpdate: support null values (using uint16Max), add valueFun (WIP)

SysModWeb
- clTbl ro and move table value to columns value
- clTbl columns: default null
- clientsChanged: remove column values instead of processUIFun (WIP)

SysModModules
- mdlTbl ro and move table value to columns value
- columns value: use valueFun (WIP), default null

ArtNet: defa
  • Loading branch information
ewowi committed Jan 14, 2024
1 parent 226c0e5 commit 919b485
Show file tree
Hide file tree
Showing 40 changed files with 1,869 additions and 1,564 deletions.
5 changes: 3 additions & 2 deletions data/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// @title StarMod
// @file app.js
// @date 20231016
// @date 20240114
// @repo https://github.com/ewowi/StarMod
// @Authors https://github.com/ewowi/StarMod/commits/main
// @Copyright (c) 2023 Github StarMod Commit Authors
// @Copyright (c) 2024 Github StarMod Commit Authors
// @license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
// @license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]

function userFun(userFunId, data) {
if (userFunId == "pview" && jsonValues.pview) {
Expand Down
125 changes: 82 additions & 43 deletions data/index.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,86 @@
/*
@title StarMod
@file index.css
@date 20231016
@date 20240114
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright (c) 2023 Github StarMod Commit Authors
@Copyright (c) 2024 Github StarMod Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]
*/

:root,
:root.starmod {
--bg-color: linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%);
--th-color: #b60f6281;
--h-color: #b60f62;
--border-color: #666;
}
:root.light {
--bg-color: #fff;
--h-color: #000000;
--th-color: #6d686a81;
--text-color: #123;
}
:root.dark {
--bg-color: #121212;
--text-color: #696d7d;
}
:root.blue {
--bg-color: #05396B;
--text-color: #E7F1FE;
}
:root.pink {
--bg-color: #ffcad4;
--text-color: #e75480;
}
:root.space {
--bg-color: #000;
--text-color: #f2bd16;
--bg-url: url(//space);
--font-family: 'Press Start 2P', cursive;
}
:root.nyan {
--bg-color: #013367;
--text-color: #fff;
--bg-url: url(//nyan);
--font-family: 'Comic Neue', cursive;
}

/* inspired by WLED / MoonModules - temporary */
:root {
--c-1: #111;
--c-f: #fff;
--c-2: #222;
--c-3: #333;
--c-4: #444;
--c-5: #555;
--c-6: #666;
--c-8: #888;
--c-b: #bbb;
--c-c: #ccc;
--c-e: #eee;
--c-d: #ddd;
--c-r: #c32;
--c-g: #2c1;
--c-l: #48a;
--c-y: #a90;
--t-b: 0.5;
--c-o: rgba(34, 34, 34, 0.9);
--c-tb : rgba(34, 34, 34, var(--t-b));
--c-tba: rgba(102, 102, 102, var(--t-b));
--c-tbh: rgba(51, 51, 51, var(--t-b));
/*following are internal*/
--th: 70px;
--tp: 70px;
--bh: 63px;
--tbp: 14px 14px 10px 14px;
--bbp: 9px 0 7px 0;
--bhd: none;
--sgp: "block";
--bmt: 0px;
}

/* default nodes */
label {
margin-right: 6px; /*space after*/
Expand Down Expand Up @@ -53,11 +126,11 @@ select {
}

h1,h2 {
color: #b60f62; /* StarMod base color??? */
color: var(--h-color);
}

div {
line-height: 1.6; /* recommended height */
line-height: 2; /* 1.6 is recommended height */
}

/* for toggleModal */
Expand Down Expand Up @@ -105,7 +178,7 @@ div {
/* padding-top: 12px;
padding-bottom: 12px; */
text-align: left;
background-color: #676767;
background-color: var(--th-color);
color: white;
}

Expand All @@ -116,10 +189,10 @@ div {
}

.module {
border: 3px solid #666;
border: 3px solid var(--border-color);
/* background-color: #ddd; */
/* background: linear-gradient(to bottom, #33ccff 0%, #ff99cc 100%); */
background: linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%);
background: var(--bg-color); /* linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%); */
border-radius: 21px; /* from .5em */
padding: 10px;
margin: 10px; /*space around modules */
Expand All @@ -131,49 +204,15 @@ div {
}

.mdlColumn {
border: 3px solid #666;
border: 3px solid var(--border-color);
/* border-radius: .5em; */
border-radius: 21px;
padding: 10px;
/* cursor: move; */
}

.module.over, .mdlColumn.over {
border: 3px dotted #666;
}

/* inspired by WLED / MoonModules */
:root {
--c-1: #111;
--c-f: #fff;
--c-2: #222;
--c-3: #333;
--c-4: #444;
--c-5: #555;
--c-6: #666;
--c-8: #888;
--c-b: #bbb;
--c-c: #ccc;
--c-e: #eee;
--c-d: #ddd;
--c-r: #c32;
--c-g: #2c1;
--c-l: #48a;
--c-y: #a90;
--t-b: 0.5;
--c-o: rgba(34, 34, 34, 0.9);
--c-tb : rgba(34, 34, 34, var(--t-b));
--c-tba: rgba(102, 102, 102, var(--t-b));
--c-tbh: rgba(51, 51, 51, var(--t-b));
/*following are internal*/
--th: 70px;
--tp: 70px;
--bh: 63px;
--tbp: 14px 14px 10px 14px;
--bbp: 9px 0 7px 0;
--bhd: none;
--sgp: "block";
--bmt: 0px;
border: 3px dotted var(--border-color);
}

#connind {
Expand Down
33 changes: 25 additions & 8 deletions data/index.htm
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<!-- @title StarMod
@file index.htm
@date 20231016
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright (c) 2023 Github StarMod Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 -->
<!--
@title StarMod
@file index.htm
@date 20240114
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright (c) 2024 Github StarMod Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]
*/
-->

<!DOCTYPE html>
<html>
Expand Down Expand Up @@ -38,6 +42,19 @@ <h1>StarMod by MoonModules 💫 <div id="instanceName"></div></h1>
<input type="button" value="All" id="vAll" onclick="showHideModules(this)">
<span> | </span>
<input type="button" value="Save" id="bSave" onclick="saveModel(this)">
<span> | </span>
Theme <select name="theme-select" id="theme-select" onchange="setTheme(this.value)">
<option value="starmod">StarMod</option>
<option value="wled">WLED</option>
<option value="alt1">Alternative1</option>
<option value="alt2">Alternative2</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
<option value="blue">Blue</option>
<option value="pink">Pink</option>
<option value="space">Space</option>
<option value="nyan">Nyan</option>
</select>
<div id="instPH"></div>
</div>
<div id="mdlContainer" class="mdlContainer">
Expand All @@ -52,7 +69,7 @@ <h1>StarMod by MoonModules 💫 <div id="instanceName"></div></h1>
</div>
<div id="connind">&#9790;</div>
<div id="modalView" class="modal"></div>
<p style="color:grey;"> (c) 2023 MoonModules Licensed under GPL v3</p>
<p style="color:grey;"> (c) 2024 MoonModules Licensed under GPL-v3</p>
<div id="canvasMenu" style="position:absolute;display:none"> <!--;background-color:#b60f62-->
<p><button id="canvasButton"></button></p>
<p><button id="canvasButton2">Add Effect</button></p>
Expand Down
Loading

0 comments on commit 919b485

Please sign in to comment.