feat: 后台全中文(Filament zh_CN 语言包+资源中文label)+ 插件独立导航分组 + 插件/主题管理卡片化 + 主题预览图(无头浏览器生成)+ 两套主题移动端适配

This commit is contained in:
ak
2026-08-11 21:18:18 +08:00
parent d0ae0f60ad
commit 6c7562115f
332 changed files with 5455 additions and 39 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ plugins/{vendor}.{name}/
|------|------|
| `provider` | 入口类 FQCN;缺省时自动推断 `src/ServiceProvider.php` |
| `requires` | 依赖的其他插件(如会员依赖支付),按 `vendor.name` 引用 |
| `filament_pages` / `filament_resources` | 注册到后台的页面/资源(由 `PluginPages` 汇总) |
| `filament_pages` / `filament_resources` | 注册到后台的页面/资源(由 `PluginPages` 汇总,统一归入「插件」导航分组 |
## ServiceProvider
+9 -1
View File
@@ -22,7 +22,7 @@ themes/{name}/
"version": "1.0.0",
"description": "主题描述",
"author": "作者",
"screenshot": null
"screenshot": "screenshot.png"
}
```
@@ -100,6 +100,14 @@ themes/{name}/
- 开发期:`GET /themes/{name}/assets/{path}` 流式返回(带缓存头)
- 生产:`php artisan theme:publish` 复制到 `public/themes/`,由 Web 服务器托管
## 预览图
`theme.json``screenshot` 指向 `assets/` 下的预览图(如 `screenshot.png`),后台主题管理以卡片形式展示。可用无头浏览器截图生成:`node` + playwright 打开站点首页保存为 `themes/{name}/assets/screenshot.png`
## 移动端适配
主题 CSS 需自带 `@media (max-width: 768px)` 断点:容器改全宽、两栏改单栏、导航换行。内置 sablog / modern 已实现,新主题请参照。
## 打包与安装
- 目录打成 ZIP(根目录含 theme.json),后台「主题管理」上传安装,或远程市场安装