This commit is contained in:
Gabriel Simmer 2022-12-11 18:09:02 +00:00
parent 97bb5283d1
commit 073d876fcf
Signed by: arch
GPG key ID: C81B106D46C5B875
5 changed files with 71 additions and 9 deletions

View file

@ -1,4 +0,0 @@
body {
background-color: black;
color: white;
}

View file

@ -85,11 +85,28 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1640319671,
"narHash": "sha256-ZkKmakwaOaLiZOpIZWbeJZwap5CzJ30s4UJTfydYIYc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "eac07edbd20ed4908b98790ba299250b5527ecdf",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"xess": "xess"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -116,6 +133,40 @@
"repo": "rust-overlay", "repo": "rust-overlay",
"type": "github" "type": "github"
} }
},
"utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"xess": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1667763126,
"narHash": "sha256-wKn3q3hICvEfs0m3CaeJmLCSyWVuVw/5LgDdh3QSXkU=",
"owner": "Xe",
"repo": "Xess",
"rev": "882799a25ce4fa4df014ad701aaa5a9b23ff9e85",
"type": "github"
},
"original": {
"owner": "Xe",
"repo": "Xess",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -10,9 +10,11 @@
}; };
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
xess.url = "github:Xe/Xess";
}; };
outputs = { self, nixpkgs, crane, flake-utils, ... }: outputs = { self, nixpkgs, crane, flake-utils, xess, ... }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = import nixpkgs { pkgs = import nixpkgs {
@ -42,6 +44,10 @@
drv = my-crate; drv = my-crate;
}; };
packages = {
xess = xess.packages.${system}.customized ./static/css/theme.css;
};
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
inputsFrom = builtins.attrValues self.checks; inputsFrom = builtins.attrValues self.checks;

View file

@ -2,7 +2,7 @@ use std::{boxed, error};
use dkregistry::v2::Client; use dkregistry::v2::Client;
use maud::{html, Markup, DOCTYPE}; use maud::{html, Markup, DOCTYPE};
use axum::{Router, routing::get}; use axum::{Router, routing::get};
use futures::{stream::{StreamExt, self}, future::join_all}; use futures::{stream::StreamExt, future::join_all};
use axum_extra::routing::SpaRouter; use axum_extra::routing::SpaRouter;
// To be expanded upon. // To be expanded upon.
@ -21,9 +21,10 @@ async fn main() {
// build our application with a single route // build our application with a single route
let app = Router::new() let app = Router::new()
.route("/", get(root)) .route("/", get(root))
.merge(SpaRouter::new("/assets", "assets")); .merge(SpaRouter::new("/static", "/static"));
// run it with hyper on localhost:3000 // run it with hyper on localhost:3000
println!("Running webserver on port :3000");
axum::Server::bind(&"0.0.0.0:3000".parse().unwrap()) axum::Server::bind(&"0.0.0.0:3000".parse().unwrap())
.serve(app.into_make_service()) .serve(app.into_make_service())
.await .await
@ -35,7 +36,7 @@ fn header(page_title: &str) -> Markup {
(DOCTYPE) (DOCTYPE)
meta charset="utf-8"; meta charset="utf-8";
title { (page_title) } title { (page_title) }
link rel="stylesheet" href="/assets/style.css"; link rel="stylesheet" href="/static/css/style.css";
} }
} }

8
static/css/theme.css Normal file
View file

@ -0,0 +1,8 @@
:root {
--background-color: 0;
--text-color: 43;
--accent-color: 344;
--width: 80ch;
--padding: 0;
}