mirror of
https://github.com/kataras/iris.git
synced 2026-01-01 01:07:06 +00:00
add template_html_5 for fund part in html.go
Former-commit-id: f2143a7aded3c026da5eb0755630e7dd2cb0f874
This commit is contained in:
14
_examples/view/template_html_5/views/about.html
Normal file
14
_examples/view/template_html_5/views/about.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ define "about-head"}}
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: #666;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
|
||||
{{ define "about-body"}}
|
||||
extend body content in layout.
|
||||
{{ end }}
|
||||
<div>
|
||||
Hello about page
|
||||
</div>
|
||||
11
_examples/view/template_html_5/views/home.html
Normal file
11
_examples/view/template_html_5/views/home.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "home-head"}}
|
||||
<title>{{.title}}</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: #999;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
<div>
|
||||
Hello home page
|
||||
</div>
|
||||
11
_examples/view/template_html_5/views/layout.html
Normal file
11
_examples/view/template_html_5/views/layout.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<head>
|
||||
{{ part "head" }}
|
||||
</head>
|
||||
<body>
|
||||
<h1>[layout] Body content is below...</h1>
|
||||
{{ part "body" }}
|
||||
<!-- Render the current template here -->
|
||||
{{ yield }}
|
||||
</body>
|
||||
</html>
|
||||
10
_examples/view/template_html_5/views/user/index.html
Normal file
10
_examples/view/template_html_5/views/user/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ define "user/index-head"}}
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
<div>
|
||||
Hello user index page
|
||||
</div>
|
||||
Reference in New Issue
Block a user