diff --git a/flake.nix b/flake.nix index 29ed38fd3..c62c66987 100644 --- a/flake.nix +++ b/flake.nix @@ -26,15 +26,23 @@ # like so `nix build --override-input debugBuild github:boolean-option/true` debugBuild.url = "github:boolean-option/false/d06b4794a134686c70a1325df88a6e6768c6b212"; }; - outputs = { self, devenv, flake-utils, nixpkgs, rust-overlay, crane, ... } @ inputs: - (flake-utils.lib.eachDefaultSystem - (system: + outputs = + { + self, + devenv, + flake-utils, + nixpkgs, + rust-overlay, + crane, + ... + }@inputs: + ( + flake-utils.lib.eachDefaultSystem ( + system: let features = "--all-features"; overlays = [ (import rust-overlay) ]; - pkgs = import nixpkgs { - inherit overlays system; - }; + pkgs = import nixpkgs { inherit overlays system; }; stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv; rustPlatform = pkgs.makeRustPlatform { cargo = pkgs.rust-bin.stable.latest.minimal; @@ -57,62 +65,84 @@ src = pkgs.lib.cleanSourceWith { src = pkgs.lib.cleanSource ./.; - filter = name: type: - let baseName = baseNameOf (toString name); - in !(baseName == "flake.lock" || pkgs.lib.hasSuffix ".nix" baseName); + filter = + name: type: + let + baseName = baseNameOf (toString name); + in + !(baseName == "flake.lock" || pkgs.lib.hasSuffix ".nix" baseName); }; - commonArgs = { - inherit src stdenv buildInputs nativeBuildInputs; - - strictDeps = true; - - meta = { - description = "ActivityPub-federated microblogging"; - homepage = "https://joinkitsune.org"; - }; - - OPENSSL_NO_VENDOR = 1; - NIX_OUTPATH_USED_AS_RANDOM_SEED = "aaaaaaaaaa"; - cargoExtraArgs = "--locked ${features}"; - } // (pkgs.lib.optionalAttrs inputs.debugBuild.value { - # do a debug build, as `dev` is the default debug profile - CARGO_PROFILE = "dev"; - }); + commonArgs = + { + inherit + src + stdenv + buildInputs + nativeBuildInputs + ; + + strictDeps = true; + + meta = { + description = "ActivityPub-federated microblogging"; + homepage = "https://joinkitsune.org"; + }; + + OPENSSL_NO_VENDOR = 1; + NIX_OUTPATH_USED_AS_RANDOM_SEED = "aaaaaaaaaa"; + cargoExtraArgs = "--locked ${features}"; + } + // (pkgs.lib.optionalAttrs inputs.debugBuild.value { + # do a debug build, as `dev` is the default debug profile + CARGO_PROFILE = "dev"; + }); cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); version = cargoToml.workspace.package.version; - cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { - pname = "kitsune-workspace"; - src = craneLib.cleanCargoSource src; - }); + cargoArtifacts = craneLib.buildDepsOnly ( + commonArgs + // { + pname = "kitsune-workspace"; + src = craneLib.cleanCargoSource src; + } + ); in { formatter = pkgs.nixpkgs-fmt; packages = rec { default = main; - cli = craneLib.buildPackage (commonArgs // { - pname = "kitsune-cli"; - cargoExtraArgs = commonArgs.cargoExtraArgs + " --bin kitsune-cli"; - inherit cargoArtifacts; - doCheck = false; - }); - - mrf-tool = craneLib.buildPackage (commonArgs // { - pname = "mrf-tool"; - cargoExtraArgs = commonArgs.cargoExtraArgs + " --bin mrf-tool"; - inherit cargoArtifacts; - doCheck = false; - }); - - main = craneLib.buildPackage (commonArgs // rec { - pname = "kitsune"; - cargoExtraArgs = commonArgs.cargoExtraArgs + " --bin kitsune --bin kitsune-job-runner"; - inherit cargoArtifacts; - doCheck = false; - }); + cli = craneLib.buildPackage ( + commonArgs + // { + pname = "kitsune-cli"; + cargoExtraArgs = commonArgs.cargoExtraArgs + " --bin kitsune-cli"; + inherit cargoArtifacts; + doCheck = false; + } + ); + + mrf-tool = craneLib.buildPackage ( + commonArgs + // { + pname = "mrf-tool"; + cargoExtraArgs = commonArgs.cargoExtraArgs + " --bin mrf-tool"; + inherit cargoArtifacts; + doCheck = false; + } + ); + + main = craneLib.buildPackage ( + commonArgs + // { + pname = "kitsune"; + cargoExtraArgs = commonArgs.cargoExtraArgs + " --bin kitsune --bin kitsune-job-runner"; + inherit cargoArtifacts; + doCheck = false; + } + ); frontend = pkgs.mkYarnPackage { inherit version; @@ -141,32 +171,37 @@ inherit pkgs inputs; modules = [ - ({ pkgs, ... }: { - packages = with pkgs; [ - cargo-insta - diesel-cli - rust-bin.stable.latest.default - ] - ++ - buildInputs ++ nativeBuildInputs; - - enterShell = '' - export PG_HOST=127.0.0.1 - export PG_PORT=5432 - [ -z "$DATABASE_URL" ] && export DATABASE_URL=postgres://$USER@$PG_HOST:$PG_PORT/$USER - - export REDIS_PORT=6379 - [ -z "$REDIS_URL" ] && export REDIS_URL="redis://127.0.0.1:$REDIS_PORT" - ''; - - services = { - postgres = { - enable = true; - listen_addresses = "127.0.0.1"; + ( + { pkgs, ... }: + { + packages = + with pkgs; + [ + cargo-insta + diesel-cli + rust-bin.stable.latest.default + ] + ++ buildInputs + ++ nativeBuildInputs; + + enterShell = '' + export PG_HOST=127.0.0.1 + export PG_PORT=5432 + [ -z "$DATABASE_URL" ] && export DATABASE_URL=postgres://$USER@$PG_HOST:$PG_PORT/$USER + + export REDIS_PORT=6379 + [ -z "$REDIS_URL" ] && export REDIS_URL="redis://127.0.0.1:$REDIS_PORT" + ''; + + services = { + postgres = { + enable = true; + listen_addresses = "127.0.0.1"; + }; + redis.enable = true; }; - redis.enable = true; - }; - }) + } + ) ]; }; @@ -174,21 +209,26 @@ buildInputs = with pkgs; [ nodejs yarn + nodePackages.svelte-language-server + nodePackages.typescript-language-server ]; }; }; } - ) // { - overlays = rec { - default = kitsune; - kitsune = (import ./overlay.nix self); - }; + ) + // { + overlays = rec { + default = kitsune; + kitsune = (import ./overlay.nix self); + }; - nixosModules = rec { - default = kitsune; - kitsune = (import ./module.nix); - }; - }) // { + nixosModules = rec { + default = kitsune; + kitsune = (import ./module.nix); + }; + } + ) + // { nixci.default = { debug = { dir = "."; diff --git a/kitsune-fe/package-lock.json b/kitsune-fe/package-lock.json index 945bdbe13..61451c38c 100644 --- a/kitsune-fe/package-lock.json +++ b/kitsune-fe/package-lock.json @@ -104,6 +104,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/kitsune-fe/src/lib/components/Button.svelte b/kitsune-fe/src/lib/components/Button.svelte index 8b377eac3..276c6ee6a 100644 --- a/kitsune-fe/src/lib/components/Button.svelte +++ b/kitsune-fe/src/lib/components/Button.svelte @@ -23,12 +23,13 @@ cursor: pointer; border: 0; - border-radius: 5px; + border-radius: 10px; background-color: $shade1dark; padding: 10px; width: 100px; + height: 50px; font-size: 16px; &:hover { diff --git a/kitsune-fe/src/routes/+page.svelte b/kitsune-fe/src/routes/+page.svelte index ad8633cb2..bb9e871f5 100644 --- a/kitsune-fe/src/routes/+page.svelte +++ b/kitsune-fe/src/routes/+page.svelte @@ -61,65 +61,49 @@
-
-
-
- - -

Federated microblogging

- - Statistics: - -
    -
  • 1,000,000,000 registered users
  • -
  • 96,000,000,000 posts
  • -
  • 50,000,000 connected instances
  • -
-
- -
-
{ - registerButtonDisabled = true; - handleRegister(e).finally(() => (registerButtonDisabled = false)); - }} - > - - - - - - - - -

- -

-
-
+
+
+ + +

Federated microblogging

+ + Statistics: + +
    +
  • 1,000,000,000 registered users
  • +
  • 96,000,000,000 posts
  • +
  • 50,000,000 connected instances
  • +
+
+
+ +
+
+
{ + registerButtonDisabled = true; + handleRegister(e).finally(() => (registerButtonDisabled = false)); + }} + > + + + + + +

+ +

+
-
diff --git a/kitsune-fe/src/styles/_colours.scss b/kitsune-fe/src/styles/_colours.scss index cf1241917..6f3615c67 100644 --- a/kitsune-fe/src/styles/_colours.scss +++ b/kitsune-fe/src/styles/_colours.scss @@ -1,7 +1,8 @@ -$dark1: #0f1026; -$dark2: #051c30; +$dark1: #1C1626; +$dark2: #2B233A; $dark3: #042f40; -$shade1dark: #53a0c4; +$shade1dark: #FF9E55; $shade1light: #afd7fa; $shade2dark: #935d7e; $shade2light: #d68fbc; +$text1: #E5D4B5; diff --git a/kitsune-fe/static/kitsune_full.svg b/kitsune-fe/static/kitsune_full.svg new file mode 100644 index 000000000..0a35396ff --- /dev/null +++ b/kitsune-fe/static/kitsune_full.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file