完善了值班表模板,现在基本上是可以最基本的使用了,另外增加了Makefile,可以一键构建,和部署

This commit is contained in:
2024-12-29 12:40:00 +08:00
parent ecf4a1db8a
commit de13e64f49
8 changed files with 35 additions and 26 deletions

View File

@@ -7,10 +7,10 @@ import (
)
// template wrapper
type tlw struct {
type Tlw struct {
Tl *template.Template
}
func (t tlw) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
func (t Tlw) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
return t.Tl.ExecuteTemplate(w, name, data)
}

View File

@@ -1,12 +1,9 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<header></header>
<main></main>
<footer></footer>
</body>
</html>
<table>
{{range .}} <!-- 遍历外层切片 -->
<tr>
{{range .}} <!-- 遍历内层切片 -->
<td>{{.}}</td>
{{end}}
</tr>
{{end}}
</table>