Slightly prettier styling with Xess
This commit is contained in:
parent
23d086d057
commit
df278ffac5
10
src/main.rs
10
src/main.rs
|
@ -1,4 +1,4 @@
|
||||||
use std::{boxed, error};
|
use std::{boxed, error, fs};
|
||||||
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};
|
||||||
|
@ -21,7 +21,7 @@ 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("/static", "/static"));
|
.merge(SpaRouter::new("/static", "result/static"));
|
||||||
|
|
||||||
// run it with hyper on localhost:3000
|
// run it with hyper on localhost:3000
|
||||||
println!("Running webserver on port :3000");
|
println!("Running webserver on port :3000");
|
||||||
|
@ -51,6 +51,10 @@ async fn root() -> Markup {
|
||||||
let c = get_images().await.unwrap_or_else(|e| panic!("{}", e));
|
let c = get_images().await.unwrap_or_else(|e| panic!("{}", e));
|
||||||
html! {
|
html! {
|
||||||
(header("/"))
|
(header("/"))
|
||||||
|
body {
|
||||||
|
main {
|
||||||
|
h1 { "DREF" }
|
||||||
|
hr;
|
||||||
@for image in &c {
|
@for image in &c {
|
||||||
div {
|
div {
|
||||||
details {
|
details {
|
||||||
|
@ -63,6 +67,8 @@ async fn root() -> Markup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
(footer())
|
(footer())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
:root {
|
:root {
|
||||||
--background-color: 0;
|
--background-color: 236;
|
||||||
--text-color: 43;
|
--text-color: 55;
|
||||||
--accent-color: 344;
|
--accent-color: 200;
|
||||||
|
|
||||||
--width: 80ch;
|
--width: 80ch;
|
||||||
--padding: 0;
|
--padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
details {
|
||||||
|
font-size: large;
|
||||||
|
border: 1px solid white;
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue