diff --git a/bun.lockb b/bun.lockb index 2f09a1f..908f40d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index ecb85d2..3d051a3 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,8 @@ "eslint": "^8.45.0", "lost": "^9.0.2", "postcss": "^8.4.31", - "postcss-advanced-variables": "^3.0.1", "postcss-color-mod-function": "^3.0.3", - "postcss-css-variables": "^0.19.0", + "postcss-custom-properties": "^13.3.3", "postcss-import": "^15.1.0", "postcss-preset-env": "^9.2.0", "postcss-scss": "^4.0.9", diff --git a/postcss.config.js b/postcss.config.js index 48e4582..51c1d76 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -2,15 +2,15 @@ export default { syntax: "postcss-scss", plugins: { + "postcss-custom-properties": {}, "postcss-import": {}, "postcss-preset-env": { stage: 2, }, - precss: {}, - "postcss-css-variables": {}, "postcss-color-mod-function": {}, "postcss-utilities": {}, lost: {}, + precss: {}, cssnano: {}, }, }; diff --git a/src/App.css b/src/App.css deleted file mode 100644 index 46d328a..0000000 --- a/src/App.css +++ /dev/null @@ -1,7 +0,0 @@ -.logo.vite:hover { - filter: drop-shadow(0 0 2em #747bff); -} - -.logo.solid:hover { - filter: drop-shadow(0 0 2em #2f5d90); -} diff --git a/src/App.jsx b/src/App.jsx deleted file mode 100644 index 63ced43..0000000 --- a/src/App.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import { invoke } from "@tauri-apps/api/tauri"; -import { createSignal } from "solid-js"; -import "./App.css"; -import logo from "./assets/logo.svg"; -import WindowMoveHandler from "./components/WindowMoveHandler/WindowMoveHandler"; - -function App() { - const [greetMsg, setGreetMsg] = createSignal(""); - const [name, setName] = createSignal(""); - - async function greet() { - // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command - setGreetMsg(await invoke("greet", { name: name() })); - } - - return ( - <> - -
-

Welcome to Tauri!

- - - -

Click on the Tauri, Vite, and Solid logos to learn more.

- -
{ - e.preventDefault(); - greet(); - }} - > - setName(e.currentTarget.value)} - placeholder="Enter a name..." - /> - -
- -

{greetMsg()}

-
- - ); -} - -export default App; diff --git a/src/BootLayout.jsx b/src/BootLayout.jsx deleted file mode 100644 index 31e3d71..0000000 --- a/src/BootLayout.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import WindowMoveHandler from "./components/WindowMoveHandler/WindowMoveHandler"; - -export default function BootLayout(props) { - return ( - <> - - {props.children} - - ); -} diff --git a/src/components/Spacer/Spacer.jsx b/src/components/Spacer/Spacer.jsx new file mode 100644 index 0000000..20e9b79 --- /dev/null +++ b/src/components/Spacer/Spacer.jsx @@ -0,0 +1,5 @@ +import classes from "./Spacer.module.css"; + +export default function Spacer() { + return
; +} diff --git a/src/components/Spacer/Spacer.module.css b/src/components/Spacer/Spacer.module.css new file mode 100644 index 0000000..a0afaec --- /dev/null +++ b/src/components/Spacer/Spacer.module.css @@ -0,0 +1,3 @@ +.spacer { + flex: 1; +} diff --git a/src/index.jsx b/src/index.jsx index 9cb62de..ab1b40c 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -2,7 +2,7 @@ import { render } from "solid-js/web"; import { Router } from "@solidjs/router"; -import BootLayout from "./BootLayout"; +import BootLayout from "./layout/BootLayout"; import "./styles.css"; render( diff --git a/src/layout/BootLayout.jsx b/src/layout/BootLayout.jsx new file mode 100644 index 0000000..009a4c7 --- /dev/null +++ b/src/layout/BootLayout.jsx @@ -0,0 +1,12 @@ +import { prop } from "ramda"; +import WindowMoveHandler from "../components/WindowMoveHandler/WindowMoveHandler"; +import classes from "./BootLayout.module.css"; + +export default function BootLayout(props) { + return ( + <> + +
{props.children}
+ + ); +} diff --git a/src/layout/BootLayout.module.css b/src/layout/BootLayout.module.css new file mode 100644 index 0000000..296292e --- /dev/null +++ b/src/layout/BootLayout.module.css @@ -0,0 +1,7 @@ +@import "../mixins.css"; + +.layout-container { + @include flex(row, flex-start, stretch); + @util size(100%, 100%); + @util padding(var(--spacing-s)); +} diff --git a/src/mixins.css b/src/mixins.css index 495d76b..458040b 100644 --- a/src/mixins.css +++ b/src/mixins.css @@ -3,3 +3,16 @@ @content; } } + +@mixin flex( + $direction: row, + $justify: flex-start, + $align: flex-start, + $gap: 0 +) { + display: flex; + flex-direction: $direction; + justify-content: $justify; + align-items: $align; + gap: $gap; +} diff --git a/src/styles.css b/src/styles.css index a4db284..7f6ede2 100644 --- a/src/styles.css +++ b/src/styles.css @@ -29,16 +29,16 @@ -webkit-text-size-adjust: 100%; } +body { + background-color: rgba(219, 219, 219, 0.05); + @include dark-mode { + background-color: rgba(36, 36, 36, 0.05); + } +} + body, #root { @util size(100vw, 100vh); overflow: hidden; user-select: none; } - -/* @media (prefers-color-scheme: dark) { - :root { - color: var(--color-dark-fg); - background-color: var(--color-dark-bg); - } -} */