Add xess
This commit is contained in:
parent
97bb5283d1
commit
073d876fcf
|
@ -1,4 +0,0 @@
|
|||
body {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
53
flake.lock
53
flake.lock
|
@ -85,11 +85,28 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"xess": "xess"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -116,6 +133,40 @@
|
|||
"repo": "rust-overlay",
|
||||
"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",
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
};
|
||||
|
||||
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:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -42,6 +44,10 @@
|
|||
drv = my-crate;
|
||||
};
|
||||
|
||||
packages = {
|
||||
xess = xess.packages.${system}.customized ./static/css/theme.css;
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = builtins.attrValues self.checks;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{boxed, error};
|
|||
use dkregistry::v2::Client;
|
||||
use maud::{html, Markup, DOCTYPE};
|
||||
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;
|
||||
|
||||
// To be expanded upon.
|
||||
|
@ -21,9 +21,10 @@ async fn main() {
|
|||
// build our application with a single route
|
||||
let app = Router::new()
|
||||
.route("/", get(root))
|
||||
.merge(SpaRouter::new("/assets", "assets"));
|
||||
.merge(SpaRouter::new("/static", "/static"));
|
||||
|
||||
// run it with hyper on localhost:3000
|
||||
println!("Running webserver on port :3000");
|
||||
axum::Server::bind(&"0.0.0.0:3000".parse().unwrap())
|
||||
.serve(app.into_make_service())
|
||||
.await
|
||||
|
@ -35,7 +36,7 @@ fn header(page_title: &str) -> Markup {
|
|||
(DOCTYPE)
|
||||
meta charset="utf-8";
|
||||
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
8
static/css/theme.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
:root {
|
||||
--background-color: 0;
|
||||
--text-color: 43;
|
||||
--accent-color: 344;
|
||||
|
||||
--width: 80ch;
|
||||
--padding: 0;
|
||||
}
|
Loading…
Reference in a new issue