From 1e45ae2ea3497958b2ea6a20137955cfc3bbc964 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Wed, 11 Dec 2024 17:05:12 +0100 Subject: 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. --- templates/about.qtpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'templates/about.qtpl') diff --git a/templates/about.qtpl b/templates/about.qtpl index faee50e..cfbf0d9 100644 --- a/templates/about.qtpl +++ b/templates/about.qtpl @@ -1,16 +1,19 @@ +{% import "context" %} + {% code type AboutPage struct { + LoggedIn bool Body []byte } %} -{% func (p *AboutPage) Title() %}Hello{% endfunc %} +{% func (p *AboutPage) Title(ctx context.Context) %}Hello{% endfunc %} -{% func (p *AboutPage) Navbar() %}{%= Navbar(About) %}{% endfunc %} +{% func (p *AboutPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, About) %}{% endfunc %} -{% func (p *AboutPage) Content() %} +{% func (p *AboutPage) Content(ctx context.Context) %} {%z= p.Body %} {% endfunc %} -{% func (p *AboutPage) Script() %} +{% func (p *AboutPage) Script(ctx context.Context) %} {% endfunc %} -- cgit v1.2.3