From 0006419b086be96617f2f5f2894dd3f6b48c2134 Mon Sep 17 00:00:00 2001 From: Iaphetes Date: Mon, 12 May 2025 07:08:56 +0200 Subject: [PATCH] working on nix. worked on css --- = filter.clone(); | 278 ++++++++++++++++++++++++++++++++++++++++++++++ flake.lock | 96 ++++++++++++++++ flake.nix | 130 ++++++++++++++++++++++ src/styles.css | 27 ++++- 4 files changed, 527 insertions(+), 4 deletions(-) create mode 100644 = filter.clone(); create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/= filter.clone(); b/= filter.clone(); new file mode 100644 index 0000000..df34061 --- /dev/null +++ b/= filter.clone(); @@ -0,0 +1,278 @@ +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #ffe21c); +} + +:root { + --main-bg-color: #2f2f2f; + --highlight-color: #3f3f3f; + --bright-highlight-color: #4f4f4f; + --text-color: #f6f6f6; + --accent-color: #5f5f5f; + --sidebar-width: 3em; + --filetree-width: 10em; + font-family: Avenir, Helvetica, Arial, sans-serif; + font-size: 30px; + line-height: 24px; + + color: #f6f6f6; + background-color: var(--main-bg-color); + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +.container { + height: 100%; + max-width: 100%; + margin: 0; + padding-top: 1vh; + display: flex; + flex-direction: row; + text-align: left; + align-items: stretch; +} + +#main_editor { + width: 100%; + font-size: 16px; + line-height: 18px; + display: flex; + height: 100%; + width: 100%; + color: var(--text-color); + background-color: var(--main-bg-color); + float: right; + overflow: hidden; +} + +.col { + flex: 0 0 49%; + width: 50%; + padding: 0.5em; + /* margin: .1em; */ + margin-left: 0.1em; + border: solid; + border-color: var(--highlight-color); + /* border-radius: .5em; */ +} + +#markdown_input { + grid-column: 1; + grid-row: 1; + text-align: left; + color: var(--text-color); + background: var(--main-bg-color); + overflow-x: wrap; + overflow-y: scroll; +} + +#rendered_markdown { + grid-column: 2; + grid-row: 1; + text-align: left; + color: var(--text-color); + background-color: var(--main-bg-color); + + img { + width: 100%; + } + + overflow-x: wrap; + overflow-y: scroll; +} + +h1 { + text-align: left; + line-height: 18px; + margin-top: 0.067em; + margin-bottom: 0.067em; + color: red; +} + +li { + /* line-height: 0.1em; */ + margin: 0; + margin-left: 1em; + padding: 0; +} + +.sidebar_button { + width: 100%; + background-color: var(--main-bg-color); + border: none; +} + +.sidebar_icon { + width: 100%; +} + +.top-bar { + display: flex; + flex-direction: row; +} + +.topbar_button { + height: 2em; + background-color: transparent; + border: none; +} + +.topbar_icon { + height: 100%; + background-color: transparent; +} + +@media (prefers-color-scheme: dark) { + :root { + color: #f6f6f6; + background-color: var(--main-bg-color); + } +} + +.main { + display: flex; + height: 95vh; + flex-direction: column; +} + +#sidebar { + visibility: visible; + width: var(--sidebar-width); + transition: all 0.1s ease-out; + float: left; +} + +.filetree { + float: left; + border: solid; + border-color: var(--highlight-color); + width: var(--filetree-width); + overflow-x: scroll; + /* overflow-y: scroll; */ + overflow-y: hidden; + text-overflow: ellipsis; + resize: horizontal; +} + +.filetree-directory-button, +.filetree-file-button, +.file-search-button { + background-color: transparent; + border: none; + width: 100%; + height: inherit; + text-align: left; + transition: all 0.01s ease-out; + white-space: nowrap; + /* overflow-y: visible; */ + overflow-y: hidden; + overflow: hidden; + color: var(--text-color); + text-overflow: ellipsis; +} + +.filetree-node { + margin-left: 1em; + overflow-y: hidden; +} + +.filetree-icon { + height: 1em; + background-color: transparent; + margin-right: 5px; +} + +.filetree_expand { + background-color: transparent; + border: none; +} + +.filetree-file-button:hover, +.filetree-directory-button:hover { + background-color: var(--highlight-color); + /* Green */ +} + +dialog { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) !important; + background-color: var(--highlight-color); + border: none; + border-radius: 10px; + box-shadow: + 0 0 #0000, + 0 0 #0000, + 0 25px 50px -12px rgba(0, 0, 0, 0.25); + width: 50%; + height: 20%; + margin: auto; + /* display: flex; */ + /* flex-direction: column; */ + overflow: hidden; + color: var(--text-color); + font-size: 0.5cm; +} + +.row { + display: flex; + justify-content: space-between; +} + +.button { + background-color: var(--accent-color); + /* Green */ + color: white; + border: solid; + border-color: transparent; + padding: 5px 3px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; +} + +.button:hover { + border: solid; + border-color: var(--bright-highlight-color); +} + +.button:active { + border: solid; + border-color: white; +} + +.input-field { + border: solid; + border-color: var(--accent-color); + color: var(--text-color); +} + +#knowledgebase-button { + width: 19%; +} + +#knowledgebase-path { + width: 80%; +} + +#file-search-dialog-input { + border-top-right-radius: 10px; + border-top-left-radius: 10px; +} + +#file-search-results { + overflow: scroll; + grid-column: 1; + grid-row: 1; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9dfbffd --- /dev/null +++ b/flake.lock @@ -0,0 +1,96 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1747017456, + "narHash": "sha256-C/U12fcO+HEF071b5mK65lt4XtAIZyJSSJAg9hdlvTk=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "5b07506ae89b025b14de91f697eba23b48654c52", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f98f9bc --- /dev/null +++ b/flake.nix @@ -0,0 +1,130 @@ +# { pkgs ? import {} }: + +# let + +# fenix = import "${ +# fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz" +# }/packages.nix"; + +# in + +# pkgs.mkShell { +# shellHook = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath [ +# pkgs.alsaLib +# pkgs.udev +# pkgs.vulkan-loader +# ]}"''; + +# buildInputs = with pkgs; [ +# ( +# with fenix; +# combine ( +# with default; [ +# cargo +# clippy-preview +# latest.rust-src +# rust-analyzer +# rust-std +# rustc +# rustfmt-preview +# ] +# ) +# ) +# cargo-edit +# cargo-watch + +# lld +# clang + +# # # bevy-specific deps (from https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md) +# pkgconfig +# udev +# alsaLib +# lutris +# x11 +# xorg.libXcursor +# xorg.libXrandr +# xorg.libXi +# vulkan-tools +# vulkan-headers +# vulkan-loader +# vulkan-validation-layers +# ]; + +# } +{ + description = "Minimal Rust development environment for Bevy project"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + rust-overlay.url = "github:oxalica/rust-overlay"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { inherit system overlays; }; + rustToolchain = pkgs.rust-bin.stable.latest.default.override { + extensions = [ "rust-src" "rust-analyzer" "clippy" ]; + }; + in { + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + pkg-config + gobject-introspection + cargo + cargo-tauri + nodejs + ]; + buildInputs = with pkgs; [ + rustToolchain + clang + llvmPackages_latest.bintools + udev + alsa-lib + vulkan-loader + xorg.libX11 + xorg.libXcursor + xorg.libXi + xorg.libXrandr + libxkbcommon + wayland + glibc.dev + glib.dev + dioxus-cli + at-spi2-atk + atkmm + cairo + gdk-pixbuf + glib + gtk3 + harfbuzz + librsvg + libsoup_3 + pango + webkitgtk_4_1 + openssl + xdotool + ]; + + shellHook = '' + export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin + export LD_LIBRARY_PATH=${ + pkgs.lib.makeLibraryPath [ + pkgs.vulkan-loader + pkgs.libxkbcommon + pkgs.wayland + pkgs.alsa-lib + pkgs.udev + ] + }:$LD_LIBRARY_PATH + export LIBCLANG_PATH="${pkgs.llvmPackages_latest.libclang.lib}/lib" + export BINDGEN_EXTRA_CLANG_ARGS="-I${pkgs.glibc.dev}/include -I${pkgs.llvmPackages_latest.libclang.lib}/lib/clang/${pkgs.llvmPackages_latest.libclang.version}/include -I${pkgs.glib.dev}/include/glib-2.0 -I${pkgs.glib.out}/lib/glib-2.0/include/" + export RUSTFLAGS="-C link-arg=-fuse-ld=lld" + echo "Bevy development environment loaded!" + ''; + }; + }); +} diff --git a/src/styles.css b/src/styles.css index ad1983c..a3153f9 100644 --- a/src/styles.css +++ b/src/styles.css @@ -3,18 +3,19 @@ } :root { - --main-bg-color: #2f2f2f; + --main-bg-color: #1f1f1f; --highlight-color: #3f3f3f; --bright-highlight-color: #4f4f4f; --text-color: #f6f6f6; - --accent-color: #5f5f5f; + --accent-color: #006f00; + --bright-accent-color: #009f00; --sidebar-width: 3em; --filetree-width: 10em; font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 30px; line-height: 24px; - color: #f6f6f6; + color: var(--main-bg-color); background-color: var(--main-bg-color); font-synthesis: none; @@ -95,7 +96,25 @@ h1 { line-height: 18px; margin-top: 0.067em; margin-bottom: 0.067em; - color: red; + /* color: red; */ +} +a { +} + +a:link { + color: var(--accent-color); +} + +a:visited { +} + +a:focus { +} + +a:hover { +} + +a:active { } li {