add: rewrite root html
This commit is contained in:
parent
78d0766345
commit
350e47f4b7
7 changed files with 405 additions and 442 deletions
|
@ -36,7 +36,7 @@ pub const ME_JS: &str = include_str!("./public/js/me.js");
|
|||
pub const STREAMS_JS: &str = include_str!("./public/js/streams.js");
|
||||
|
||||
// html
|
||||
pub const ROOT: &str = include_str!("./public/html/root.html");
|
||||
pub const ROOT: &str = include_str!("./public/html/root.lisp");
|
||||
pub const MACROS: &str = include_str!("./public/html/macros.html");
|
||||
pub const COMPONENTS: &str = include_str!("./public/html/components.html");
|
||||
|
||||
|
@ -140,7 +140,13 @@ pub(crate) async fn pull_icon(icon: &str, icons_dir: &str) {
|
|||
}
|
||||
|
||||
println!("download icon: {icon}");
|
||||
let svg = reqwest::get(icon_url).await.unwrap().text().await.unwrap();
|
||||
let svg = reqwest::get(icon_url)
|
||||
.await
|
||||
.unwrap()
|
||||
.text()
|
||||
.await
|
||||
.unwrap()
|
||||
.replace("\n", "");
|
||||
|
||||
write(&file_path, &svg).unwrap();
|
||||
writer.insert(icon.to_string(), svg);
|
||||
|
@ -245,7 +251,7 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
|
|||
// ...
|
||||
let html_path = PathBufD::current().join(&config.dirs.templates);
|
||||
|
||||
write_template!(html_path->"root.html"(crate::assets::ROOT) --config=config);
|
||||
write_template!(html_path->"root.html"(crate::assets::ROOT) --config=config --lisp);
|
||||
write_template!(html_path->"macros.html"(crate::assets::MACROS) --config=config);
|
||||
write_template!(html_path->"components.html"(crate::assets::COMPONENTS) --config=config);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue