Add license to XESS, aarch64 support
This commit is contained in:
parent
a41e523097
commit
2031f4c527
|
@ -15,7 +15,7 @@
|
|||
};
|
||||
|
||||
outputs = { self, nixpkgs, crane, flake-utils, Xess, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
@ -69,6 +69,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
defaultPackage = self.packages.${system}.bin;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = builtins.attrValues self.checks;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::{error::Error, path::Path, fs};
|
||||
|
||||
const XESS: &str = r#"
|
||||
/* XESS by Xe https://github.com/Xe/Xess/blob/master/LICENSE */
|
||||
:root {
|
||||
--background-color: 236;
|
||||
--text-color: 55;
|
||||
|
@ -104,10 +105,12 @@ footer {
|
|||
}
|
||||
"#;
|
||||
|
||||
/// Returns either the plain XESS template with aoi theme or
|
||||
/// concats it with the contents of the theme.css file.
|
||||
pub fn render_css() -> Result<String, Box<dyn Error>> {
|
||||
if Path::new("theme.css").exists() {
|
||||
let theme: String = fs::read_to_string("theme.css")?.parse()?;
|
||||
return Ok(format!("{}\n{}", XESS, theme))
|
||||
return Ok(format!("{}{}", XESS, theme).replace("\n", ""))
|
||||
}
|
||||
Ok(XESS.to_string())
|
||||
Ok(XESS.to_string().replace("\n", ""))
|
||||
}
|
||||
|
|
|
@ -80,14 +80,6 @@ async fn root() -> Markup {
|
|||
}
|
||||
}
|
||||
|
||||
async fn page(body: &Markup) -> Markup {
|
||||
html! {
|
||||
(header("/"))
|
||||
(body)
|
||||
(footer())
|
||||
}
|
||||
}
|
||||
|
||||
async fn get_images() -> Result<Vec<Image>, boxed::Box<dyn error::Error>> {
|
||||
let host = "icr.gmem.ca";
|
||||
let dclient = Client::configure()
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
:root {
|
||||
--background-color: 236;
|
||||
--text-color: 55;
|
||||
--accent-color: 200;
|
||||
|
||||
--width: 80ch;
|
||||
--padding: 0;
|
||||
}
|
||||
|
||||
details {
|
||||
font-size: large;
|
||||
border: 1px solid white;
|
||||
padding: 20px;
|
||||
margin-bottom: -1px;
|
||||
}
|
Loading…
Reference in a new issue