diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-10-17 18:07:11 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-10-17 18:07:11 +0200 |
commit | 70031d8971136583647125d967ace7b9c831ed00 (patch) | |
tree | 9b3b329b366ab9e5637de3dabb2a64c46bfc76f0 /pages/pages.templ | |
parent | 650053446d18424500ae6330b5ad0da81fa86373 (diff) | |
download | gosten-70031d8971136583647125d967ace7b9c831ed00.tar.gz gosten-70031d8971136583647125d967ace7b9c831ed00.tar.bz2 gosten-70031d8971136583647125d967ace7b9c831ed00.zip |
Save User as part of the context
Diffstat (limited to '')
-rw-r--r-- | pages/pages.templ | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/pages.templ b/pages/pages.templ index d2bfad2..67e2792 100644 --- a/pages/pages.templ +++ b/pages/pages.templ @@ -2,22 +2,22 @@ package pages import "gosten/model" -templ notfound(uri string) { +templ notfound() { @content() { <div class="alert alert-danger d-flex align-items-center" role="alert"> <svg class="me-2" role="img" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M9.05.435c-.58-.58-1.52-.58-2.1 0L.436 6.95c-.58.58-.58 1.519 0 2.098l6.516 6.516c.58.58 1.519.58 2.098 0l6.516-6.516c.58-.58.58-1.519 0-2.098zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/> </svg> <div> - Seite <span class="fst-italic">{uri}</span> nicht gefunden! + Seite <span class="fst-italic">{getCurrPath(ctx)}</span> nicht gefunden! </div> </div> } } -templ index(user string) { +templ index() { @content() { - Logged in with user: {user} + Logged in with user: {getUser(ctx).Name} } } |