feat(web): SSR nav brand/client embed and form markdown labels

Replace author theme.js with framework chrome (nav brand, theme boot,
client mount) plus bridge scroll/observe helpers; add form submit copy
and type=markdown textareas so sites can drop business JS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-18 12:42:50 +08:00
1 parent aeac4d6d20
commit 98018fc63b
19 files changed
+777 -84

No files matched your search

+25 -12
View File
@@ -140,18 +140,28 @@ pub fn resolve_import(from_dir: &Path, rel: &str) -> Result<PathBuf> {
"cannot resolve import `{rel}` from {}",
from_dir.display()
);
let user_ext = crate::ext_cli::default_user_ext_dir();
if env::var_os("MARQDO_EXT").is_none() && !user_ext.join("web").join("web.mq.md").is_file()
#[cfg(feature = "cli")]
{
msg.push_str(&format!(
"\nhint: run `marqdo ext add web` (installs under {}), or set MARQDO_EXT",
user_ext.display()
));
} else if env::var_os("MARQDO_EXT").is_none() {
msg.push_str(&format!(
"\nhint: looked under {}; set MARQDO_EXT to override",
user_ext.display()
));
let user_ext = crate::ext_cli::default_user_ext_dir();
if env::var_os("MARQDO_EXT").is_none()
&& !user_ext.join("web").join("web.mq.md").is_file()
{
msg.push_str(&format!(
"\nhint: run `marqdo ext add web` (installs under {}), or set MARQDO_EXT",
user_ext.display()
));
} else if env::var_os("MARQDO_EXT").is_none() {
msg.push_str(&format!(
"\nhint: looked under {}; set MARQDO_EXT to override",
user_ext.display()
));
}
}
#[cfg(not(feature = "cli"))]
{
if env::var_os("MARQDO_EXT").is_none() {
msg.push_str("\nhint: set MARQDO_EXT to your extension pack root");
}
}
bail!("{msg}");
}
@@ -203,7 +213,10 @@ fn ext_search_roots() -> Vec<PathBuf> {
roots.push(PathBuf::from(h));
}
// Default install root from `marqdo ext add` (~/.marqdo/ext)
roots.push(crate::ext_cli::default_user_ext_dir());
#[cfg(feature = "cli")]
{
roots.push(crate::ext_cli::default_user_ext_dir());
}
if let Ok(cwd) = env::current_dir() {
roots.push(cwd.join("ext"));
}