all repos — elgit @ e70b90b4b86f672eb9ccf9a768e083edef73395e

fork of legit: web frontend for git, written in go

de-duplicate error page

Alan Pearce
commit

e70b90b4b86f672eb9ccf9a768e083edef73395e

parent

cfea2a3ba078b13b46a99963953175f6d1c16ff1

1 file changed, 1 insertion(+), 9 deletions(-)

changed files
M templates/errors.gotemplates/errors.go
@@ -5,18 +5,10 @@ g "alin.ovh/gomponents"
. "alin.ovh/gomponents/html" ) -func NotFoundPage(data PageData) g.Node { - return Page(data, []g.Node{ - Main( - H3(g.Text("404 — nothing like that here.")), - ), - }) -} - func ErrorPage(data PageData) g.Node { return Page(data, []g.Node{ Main( - H3(g.Text("500 — something broke!")), + H3(g.Textf("%d — %s", data.Error.Code, data.Error.Message)), ), }) }