mirror of
https://github.com/kataras/iris.git
synced 2026-03-10 02:16:10 +00:00
reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
This commit is contained in:
36
_examples/view/quicktemplate/templates/base.qtpl
Normal file
36
_examples/view/quicktemplate/templates/base.qtpl
Normal file
@@ -0,0 +1,36 @@
|
||||
This is our templates' base implementation.
|
||||
|
||||
{% interface
|
||||
Partial {
|
||||
Body()
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
Template writes a template implementing the Partial interface.
|
||||
{% func Template(p Partial) %}
|
||||
<html>
|
||||
<head>
|
||||
<title>Quicktemplate integration with Iris</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
Header contents here...
|
||||
</div>
|
||||
|
||||
<div style="margin:10px;">
|
||||
{%= p.Body() %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<footer>
|
||||
Footer contents here...
|
||||
</footer>
|
||||
</html>
|
||||
{% endfunc %}
|
||||
|
||||
|
||||
Base template implementation. Other pages may inherit from it if they need
|
||||
overriding only certain Partial methods.
|
||||
{% code type Base struct {} %}
|
||||
{% func (b *Base) Body() %}This is the base body{% endfunc %}
|
||||
Reference in New Issue
Block a user