use baseof block

master
Ingolf Wagner 2018-06-18 09:14:28 +02:00
parent 64de2c9a5f
commit 526f385980
4 changed files with 17 additions and 14 deletions

View File

@ -0,0 +1,13 @@
<html>
<head>
<title> {{ .Title }} </title>
</head>
<body>
{{ block "main" . }}
empty
{{ end }}
</body>
</html>

View File

@ -1,7 +1,4 @@
<html>
<head> <title> {{ .Title }} </title> </head>
<body>
{{ define "main" }}
<p>
{{ .Content }}
</p>
@ -12,6 +9,4 @@
{{ end }}
</ul>
</p>
</body>
</html>
{{ end }}

View File

@ -1,9 +1,4 @@
<html>
<head> <title> {{ .Title }} </title> </head>
<body>
{{ define "main" }}
<h1> {{ .Title }} </h1>
{{ .Content }}
</body>
</html>
{{ end }}