add: forges ui

TODO: forges tickets feed, posts open/closed state
This commit is contained in:
trisua 2025-06-09 16:45:36 -04:00
parent 5b1db42c51
commit a6140f7c8c
40 changed files with 1664 additions and 1270 deletions

View file

@ -31,6 +31,8 @@ pub const FAVICON: &str = include_str!("./public/images/favicon.svg");
// css
pub const STYLE_CSS: &str = include_str!("./public/css/style.css");
pub const ROOT_CSS: &str = include_str!("./public/css/root.css");
pub const UTILITY_CSS: &str = include_str!("./public/css/utility.css");
// js
pub const LOADER_JS: &str = include_str!("./public/js/loader.js");
@ -39,6 +41,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 BODY: &str = include_str!("./public/html/body.lisp");
pub const ROOT: &str = include_str!("./public/html/root.lisp");
pub const MACROS: &str = include_str!("./public/html/macros.lisp");
pub const COMPONENTS: &str = include_str!("./public/html/components.lisp");
@ -113,6 +116,10 @@ pub const STACKS_LIST: &str = include_str!("./public/html/stacks/list.lisp");
pub const STACKS_POSTS: &str = include_str!("./public/html/stacks/posts.lisp");
pub const STACKS_MANAGE: &str = include_str!("./public/html/stacks/manage.lisp");
pub const FORGE_HOME: &str = include_str!("./public/html/forge/home.lisp");
pub const FORGE_BASE: &str = include_str!("./public/html/forge/base.lisp");
pub const FORGE_INFO: &str = include_str!("./public/html/forge/info.lisp");
// langs
pub const LANG_EN_US: &str = include_str!("./langs/en-US.toml");
@ -312,6 +319,7 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
let mut plugins = lisp_plugins();
let html_path = PathBufD::current().join(&config.dirs.templates);
write_template!(html_path->"body.html"(crate::assets::BODY) --config=config --lisp plugins);
write_template!(html_path->"root.html"(crate::assets::ROOT) --config=config --lisp plugins);
write_template!(html_path->"macros.html"(crate::assets::MACROS) --config=config --lisp plugins);
write_template!(html_path->"components.html"(crate::assets::COMPONENTS) --config=config --lisp plugins);
@ -381,6 +389,10 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
write_template!(html_path->"stacks/posts.html"(crate::assets::STACKS_POSTS) --config=config --lisp plugins);
write_template!(html_path->"stacks/manage.html"(crate::assets::STACKS_MANAGE) --config=config --lisp plugins);
write_template!(html_path->"forge/home.html"(crate::assets::FORGE_HOME) -d "forge" --config=config --lisp plugins);
write_template!(html_path->"forge/base.html"(crate::assets::FORGE_BASE) --config=config --lisp plugins);
write_template!(html_path->"forge/info.html"(crate::assets::FORGE_INFO) --config=config --lisp plugins);
html_path
}