mirror of
https://github.com/ZSCNetSupportDept/scheduler.git
synced 2025-10-28 20:45:05 +08:00
完善了值班表模板,现在基本上是可以最基本的使用了,另外增加了Makefile,可以一键构建,和部署
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user