Files
backend_v2/internal/handler/templates/layout.html
toom1996 c3a6baa419 update
2026-09-22 21:40:04 +08:00

27 lines
961 B
HTML
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.

{{/*
后台页面外壳:<head> + 共享样式/脚本 + 页面内容插槽。
页面模板只需提供三个 define:
{{define "title"}} 浏览器标题
{{define "content"}} 正文(含自己的 .bar / .main 容器)
需要顶部导航时,在 content 里写 {{template "bar" .}}(登录页不需要,故不引用)。
样式与脚本走 /admin/assets/(同样是 embed 进二进制,零外部依赖、零构建):
CSS 独立成文件后浏览器可跨页缓存,也才有真正的 CSS 语法高亮与补全。
*/}}
{{define "layout"}}<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{template "title" .}}</title>
<link rel="stylesheet" href="/admin/assets/admin.css">
</head>
<body>
{{template "content" .}}
<div id="toast" class="flash ok" hidden></div>
<script src="/admin/assets/admin.js" defer></script>
</body>
</html>
{{end}}