Add marqdo-blog example with GFM-table style assembly
Introduce web_style ABI (样式装配) so themes are GFM style tables
(|选择器|属性|值|, optional |媒体| column for @media) assembled by
functions instead of hand-written CSS strings — 文档即代码. The new
examples/marqdo-blog shows a full blog: card grid, dynamic /post/{slug},
tag archive, WebSocket live widget, and session-gated admin CRUD, plus a
smoke test (15 checks) and README.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7645dd4c1f
commit
da9fc75b1e
20 files changed
+1518
-93
No files matched your search
@@ -134,10 +134,14 @@ pub fn compose_main(
|
||||
SitePath::DbField { table, field } => format!("{table}.{field}"),
|
||||
SitePath::Plain(s) => s,
|
||||
SitePath::LibMember { lib, member } => {
|
||||
let v = call_lib(&format!("{lib}.{member}"))?;
|
||||
match v {
|
||||
Value::String(s) => s,
|
||||
other => other.to_string(),
|
||||
// Try a module member (e.g. `theme.hero`); if the lib is unknown,
|
||||
// treat `a.b` as a DB field `a.b` (table `a`, column `b`).
|
||||
match call_lib(&format!("{lib}.{member}")) {
|
||||
Ok(v) => match v {
|
||||
Value::String(s) => s,
|
||||
other => other.to_string(),
|
||||
},
|
||||
Err(_) => format!("{lib}.{member}"),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user