cerrado @ 1e45ae2ea3497958b2ea6a20137955cfc3bbc964

 1{% import "context" %}
 2
 3{% code
 4type LoginPage struct {
 5    ErrorMessage string
 6}
 7%}
 8
 9{% func (p *LoginPage) Title(ctx context.Context) %}Hello{% endfunc %}
10
11{% func (p *LoginPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, Login) %}{% endfunc %}
12
13{% func (p *LoginPage) Content(ctx context.Context) %}
14<div class="row">
15  <div class="col-md-6 offset-md-3">
16    <form action="/login/" method="POST">
17      <div class="form-group m-3">
18        <label for="username" class="form-label">Username</label>
19        <input type="text" class="form-control" name="username" id="username">
20      </div>
21      <div class="form-group m-3">
22        <label for="password" class="form-label">Password</label>
23        <input type="password" class="form-control" name="password" id="password">
24      </div>
25      <div class="form-group m-3">
26        <button type="submit" class="btn btn-primary">Login</button>
27      </div>
28    </form>
29  </div>
30  {% if p.ErrorMessage != "" %}
31  <div class="col-md-6 offset-md-3">
32    <div class="alert alert-warning text-center" >
33        {%s p.ErrorMessage  %}
34    </div>
35  </div>
36  {% endif %}
37</div>
38{% endfunc %}
39
40{% func (p *LoginPage) Script(ctx context.Context) %}
41{% endfunc %}