26 lines
865 B
Rust
26 lines
865 B
Rust
use crate::config::Config;
|
|
|
|
pub fn gen_site(c: &Config) -> String {
|
|
maud::html!(
|
|
(maud::DOCTYPE)
|
|
html {
|
|
head {
|
|
meta charset="UTF-8";
|
|
meta name="viewport" content="width=device-width, initial-scale=1.0";
|
|
title { "Umbrella ☂️"};
|
|
link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css";
|
|
style { (maud::PreEscaped(include_str!("style.css"))) };
|
|
};
|
|
body {
|
|
script { (maud::PreEscaped(include_str!("script.js"))) };
|
|
main class="container" {
|
|
h1 { "Umbrella ☂️" };
|
|
|
|
@for (id, card) in &c.projects {
|
|
(card.build(id));
|
|
}
|
|
};
|
|
};
|
|
}
|
|
).into_string()
|
|
}
|