yggdrasil/src/main.rs
xfy 8b9c6aa83d 重构 admin 模块,新增共享组件和文章撰写页面
- 将 monolithic admin.rs 拆分为 admin/ 目录模块(dashboard、write)
- 新增 components 模块:Header、Footer、AdminLayout
- 新增 /admin/write 文章撰写页面,支持 Markdown 实时预览
- 添加 pulldown-cmark 依赖用于 Markdown 渲染
- .env 移出版本控制,新增 .env.example 模板
- Home、Archives、Tags、Login、Register 等页面适配新组件

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 16:13:18 +08:00

25 lines
448 B
Rust

mod api;
mod auth;
mod components;
mod db;
mod models;
mod pages;
mod router;
mod tasks;
mod theme;
use router::AppRouter;
fn main() {
#[cfg(feature = "server")]
{
dotenvy::dotenv().ok();
std::thread::spawn(|| {
let rt = tokio::runtime::Runtime::new().expect("Failed to create Tokio runtime");
rt.block_on(tasks::session_cleanup::run_cleanup());
});
}
dioxus::launch(AppRouter);
}