diff --git a/html/index.html b/html/index.html index 434c18e..2b861e0 100644 --- a/html/index.html +++ b/html/index.html @@ -23,6 +23,7 @@ *{ font-family: 'Comfortaa', cursive; font-size: 1rem; + transition: background-color 1000ms linear; } diff --git a/index.js b/index.js index b54265a..157a7ed 100644 --- a/index.js +++ b/index.js @@ -1,16 +1,16 @@ import { Stear, SWindow } from "./stear/main.js"; import {applyScrollBarCss1} from "./stear/extra/Style/scrollBar1.js" import start from "./pages/start.jsx"; - +import * as color from "./js/color.js" var stear = new Stear(document.querySelector("#stear")); stear.style({ - backgroundColor: "#dde", + backgroundColor: color.bg(), fontFamily: "Helvetica Neue", fontWeight: "lighter", fontSize: "0.9em", - color: "#2a2a2a", + color: color.text(), }); applyScrollBarCss1(); @@ -22,3 +22,5 @@ Stear.addLanguageFile({ }, "de"); Stear.lang = "de"; + +window.stear = stear; \ No newline at end of file diff --git a/js/color.js b/js/color.js index e69de29..62da3b5 100644 --- a/js/color.js +++ b/js/color.js @@ -0,0 +1,36 @@ +let dark = true; + +export const text = () =>{ + return "#2a2a2a"; +} +export const bg = () =>{ + if(dark) return "#4b6584"; + else return "#d1d8e0"; +} +export const mainBar = () =>{ + if(dark) return "#3867d6"; + else return "#45aaf2"; +} +export const modeInUse = () =>{ + if(dark) return "#27ae60"; + else return "#2ecc71"; +} +export const modeNotInUse = () =>{ + if(dark) return "#c0392b"; + else return "#e74c3c"; +} +export const floatingBtn = () =>{ + return mainBar(); +} +export const floatingMenu = ()=>{ + return bg(); +} +export const cancleBtn = () =>{ + if(dark) return "#eb3b5a"; + else return "#fc5c65"; +} + +export const setMode = (m)=> { + if(m==-1) dark = !dark; + else dark = m; +} \ No newline at end of file diff --git a/pages/elems/mode.jsx b/pages/elems/mode.jsx index e69de29..2d332a7 100644 --- a/pages/elems/mode.jsx +++ b/pages/elems/mode.jsx @@ -0,0 +1,26 @@ +import { SFrame, Stear, s } from "../../stear/main"; +import * as color from "../../js/color.js"; + +export const LightMode = new SFrame({ + call: (stear, { find, resolve, render, call, event }, args) => { + + return