all repos — homestead @ 4b11ea624dc32fdb0950cdb4665656218874a702

Code for my website

determine tailscale remote user and greet them

Alan Pearce
commit

4b11ea624dc32fdb0950cdb4665656218874a702

parent

c641b47bd01a0f1fbf3dc7749594ceec373e794c

1 file changed, 12 insertions(+), 2 deletions(-)

changed files
M domain/content/publisher/templates/index.godomain/content/publisher/templates/index.go
@@ -2,9 +2,19 @@ package templates
import ( g "alin.ovh/gomponents" + . "alin.ovh/gomponents/html" base "alin.ovh/homestead/domain/web/templates" ) -func IndexPage(site base.SiteSettings, page base.PageSettings) g.Node { - return Layout(site, page, g.Text("Index Page")) +type PageSettings struct { + User string + base.PageSettings +} + +func IndexPage(site base.SiteSettings, page PageSettings) g.Node { + return Layout(site, page.PageSettings, + P( + g.Textf("Hello, %s", page.User), + ), + ) }