-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Structure in classes and files, add theme (WIP)
NewUI MainNav: - rename addBody to addHTML - rename activeModule to activeModuleJson - rename module to moduleJson - use controller.model and controller.mainNav module.css: add label comment and input (WIP) module.js: add moduleFun (to do create class) newui.htm: - add theme.js/css and module.js/css - body onLoad = controller.onLoad newui.js - create Controller class and add all stuff in it - add themeClass - fetchModelForLiveServer: sort modules - addModule do push to module - addModule: moduleFun as parameter to updateUI - window.controller = new Controller() theme.js/css - new - css: WIP - js: add ThemeClass: create html (WIP), setTheme, getTheme Old UI: - index.css: remove theme items and move to themes.css (reused old and new) - index.htm: add theme.css - index.js: rename module to moduleJson
- Loading branch information
1 parent
5e79219
commit 864477f
Showing
10 changed files
with
355 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,93 +9,6 @@ | |
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected] | ||
*/ | ||
|
||
:root, | ||
:root.starbase { | ||
--bg-color: #121212; | ||
--text-color: #cfd096; | ||
--th-color: #c27e66; | ||
--h-color:#c27e66; | ||
--border-color: #cdad6a; | ||
--select-color: #1a8aff; /*used for view buttons*/ | ||
--label-color: #83c5eb; | ||
--comment-color: #598a43; | ||
--font-size: 10px; | ||
} | ||
:root.starlight { | ||
--bg-color: linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%); | ||
--text-color: #030303; | ||
--th-color: #b60f6281; | ||
--h-color: #b60f62; | ||
--border-color: #666; | ||
--select-color: #FFFFFF; /*used for view buttons*/ | ||
--font-size: 10px; | ||
} | ||
:root.wled { | ||
--bg-color: #121212; | ||
--text-color: #fff; | ||
--th-color: rgb(255, 160, 0); | ||
--h-color: rgb(255, 160, 0); | ||
--border-color: rgb(255, 160, 0); | ||
--select-color: rgb(255, 160, 0); | ||
--font-size: 10px; | ||
} | ||
:root.grayeen { | ||
--bg-color: linear-gradient(to bottom, #979294 0%, #474542 100%); | ||
--text-color: #fbf4f4; | ||
--th-color: #21482b; | ||
--h-color: #21482b; | ||
--border-color: #21482b; | ||
--select-color: #21482b; /*used for view buttons*/ | ||
--font-size: 10px; | ||
--font-size-s: 8px; /*var(--font-size-s) not working for some reason */ | ||
} | ||
:root.dev { | ||
--bg-color: #121212; | ||
--text-color: #cfd096; | ||
--th-color: #c27e66; | ||
--h-color:#c27e66; | ||
--border-color: #cdad6a; | ||
--select-color: #1a8aff; /*used for view buttons*/ | ||
--label-color: #83c5eb; | ||
--comment-color: #598a43; | ||
--font-size: 10px; | ||
} | ||
:root.light { | ||
--bg-color: #fff; | ||
--text-color: #123; | ||
--h-color: #000000; | ||
--th-color: #6d686a81; | ||
--select-color: #6d686a81; | ||
} | ||
:root.dark { | ||
--bg-color: #121212; | ||
--text-color: #696d7d; | ||
} | ||
:root.blue { | ||
--bg-color: #05396B; | ||
--text-color: #E7F1FE; | ||
--th-color: #b60f6281; | ||
--h-color: #b60f62; | ||
--select-color: #b60f6281; | ||
} | ||
:root.pink { | ||
--bg-color: #ffcad4; | ||
--text-color: #e75480; | ||
--select-color: #e75480; /*used for view buttons*/ | ||
} | ||
: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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
@title StarBase | ||
@file module.css | ||
@date 20240720 | ||
@repo https://github.com/ewowi/StarBase, submit changes to this file as PRs to ewowi/StarBase | ||
@Authors https://github.com/ewowi/StarBase/commits/main | ||
@Copyright © 2024 Github StarBase 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] | ||
*/ | ||
|
||
/* default nodes */ | ||
label { | ||
margin-right: 6px; /*space after*/ | ||
color: var(--label-color); | ||
} | ||
|
||
comment { | ||
/* font-size: 10px; */ | ||
font-style: italic; | ||
margin-left: 6px; /*space before*/ | ||
color: var(--comment-color); | ||
} | ||
|
||
input { | ||
background: transparent; | ||
color: var(--text-color); | ||
font-size: 8px; /*var(--font-size-s) not working for some reason */ | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// @title StarBase | ||
// @file module.js | ||
// @date 20240720 | ||
// @repo https://github.com/ewowi/StarBase, submit changes to this file as PRs to ewowi/StarBase | ||
// @Authors https://github.com/ewowi/StarBase/commits/main | ||
// @Copyright © 2024 Github StarBase 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 moduleFun(moduleJson) { | ||
let code = ""; | ||
for (variable of moduleJson.n) { | ||
// console.log(variable); | ||
code += `<p>` | ||
code += `<label>${variable.id}</label>` | ||
switch (variable.type) { | ||
case "progress": | ||
code += `<progress max="${variable.max}" id="${variable.id}" class="progress"></progress>` | ||
break | ||
default: | ||
code += `<input type=${variable.type} class="${variable.type}"></input>` | ||
} | ||
code += `<p>` | ||
} | ||
code += '<pre>' + JSON.stringify(moduleJson, null, 2) + '</pre>' | ||
return code | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.