2025-03-27 16:27:41 +08:00

36 lines
951 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 视图模板
此目录包含应用程序的HTML模板文件使用Go模板引擎
## 目录结构
- `layouts/` - 布局模板
- `main.html` - 主布局模板
- `auth/` - 认证相关页面
- `login.html` - 登录页面
- `robot/` - 机器人管理页面
- `index.html` - 机器人列表页面
- `new.html` - 创建新机器人页面
- `show.html` - 机器人详情页面
- `login.html` - 微信登录页面
- `contact/` - 联系人管理页面
- `index.html` - 联系人列表页面
- `show.html` - 联系人详情页面
- `members.html` - 群成员列表页面
- `message/` - 消息管理页面
- `index.html` - 聊天记录页面
- `error.html` - 错误页面
## 使用说明
模板使用Go标准模板引擎语法结合TailwindCSS进行样式设计。
数据使用Fiber的`fiber.Map`传递到模板中:
```go
return c.Render("robot/index", fiber.Map{
"Title": "机器人列表",
"Robots": robots,
})
```