27 lines
786 B
HTML
27 lines
786 B
HTML
{{/* 定义基础模板,作为其他页面模板的布局基础 */}}
|
|
{{ define "layout/base" }}
|
|
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{{ block "title" . }}默认标题{{ end }}</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
<link rel="stylesheet" href="/static/navbar.css">
|
|
<link rel="stylesheet" href="/static/footer.css"> <!-- 引入底部导航栏样式 -->
|
|
|
|
{{/* 允许子模板添加额外的CSS */}}
|
|
{{ block "styles" . }}{{ end }}
|
|
</head>
|
|
<body>
|
|
{{template "layout/navbar"}}
|
|
|
|
<main>
|
|
{{ block "content" . }}{{ end }}
|
|
</main>
|
|
|
|
<!-- 引入底部导航栏 -->
|
|
{{ template "layout/footer" . }}
|
|
|
|
</body>
|
|
</html>
|
|
{{ end }} |