diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-12-11 17:05:12 +0100 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-12-11 17:05:12 +0100 |
commit | 1e45ae2ea3497958b2ea6a20137955cfc3bbc964 (patch) | |
tree | 00af0e28864d79d7a9cbb8b693aff1b397b1a949 /templates/gititem.qtpl | |
parent | e6ded0d01117c592ec124f3e02d6c89eeafec382 (diff) | |
download | cerrado-1e45ae2ea3497958b2ea6a20137955cfc3bbc964.tar.gz cerrado-1e45ae2ea3497958b2ea6a20137955cfc3bbc964.tar.bz2 cerrado-1e45ae2ea3497958b2ea6a20137955cfc3bbc964.zip |
feat: Add UI/Handler login process
It adds the whole workflow to store and handle login on both UI and
handler level. With that the login information should be available at
any point given the context.
Diffstat (limited to 'templates/gititem.qtpl')
-rw-r--r-- | templates/gititem.qtpl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/gititem.qtpl b/templates/gititem.qtpl index a6a312d..c43bbfd 100644 --- a/templates/gititem.qtpl +++ b/templates/gititem.qtpl @@ -1,3 +1,5 @@ +{% import "context" %} + {% interface GitItemBase { Nav(name, ref string) @@ -13,16 +15,16 @@ type GitItemPage struct { } %} -{% func (p *GitItemPage) Title() %}Git | {%s p.Name %}{% endfunc %} +{% func (p *GitItemPage) Title(ctx context.Context) %}Git | {%s p.Name %}{% endfunc %} -{% func (p *GitItemPage) Navbar() %}{%= Navbar(Git) %}{% endfunc %} +{% func (p *GitItemPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, Git) %}{% endfunc %} -{% func (p *GitItemPage) Content() %} +{% func (p *GitItemPage) Content(ctx context.Context) %} {%= p.Nav(p.Name, p.Ref) %} <div class="container"> {%= p.GitContent(p.Name, p.Ref) %} </div> {% endfunc %} -{% func (p *GitItemPage) Script() %} +{% func (p *GitItemPage) Script(ctx context.Context) %} {% endfunc %} |