cerrado @ fb45f1f5002ffdb40150333c5a48458b801f3022

 1This is a base page template. All the other template pages implement this interface.
 2
 3{% import "strconv" %}
 4
 5{% code 
 6 var Slug = ""
 7%}
 8
 9{% interface
10Page {
11	Title()
12	Content()
13    Script()
14    Navbar()
15}
16%}
17
18
19{% code func FromUInttoString(u *uint) string {
20        if u != nil {
21            return strconv.FormatUint(uint64(*u), 10)
22        }
23        return ""
24    }
25%}
26
27Page prints a page implementing Page interface.
28{% func PageTemplate(p Page) %}
29<html lang="en">
30    <head>
31        <meta charset="utf-8">
32        <link rel="icon" href="data:,">
33        <title>cerrado | {%= p.Title() %}</title> 
34        <link rel="stylesheet" href="/static/main{%s Slug%}.css">
35        <meta name="viewport" content="width=device-width, initial-scale=1" />
36    </head>
37    <body>
38        {%= p.Navbar() %}
39        <div class="container">
40            {%= p.Content() %}
41        </div>
42    </body>
43    {%= p.Script() %}
44</html>
45{% endfunc %}
46
47{% code type BasePage struct {} %}
48{% func (p *BasePage) Title() %}Empty{% endfunc %}
49{% func (p *BasePage) Body() %}HelloWorld{% endfunc %}
50{% func (p *BasePage) Script() %}{% endfunc %}