From 6e9ad9323c8e0948188b0cb573b7480a656c6abe Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 24 May 2023 23:20:05 +0400 Subject: [PATCH] Added error50x template. --- web/templates/error50x.jade | 22 ++++++++++++++++++++++ web/web.go | 1 + 2 files changed, 23 insertions(+) create mode 100644 web/templates/error50x.jade diff --git a/web/templates/error50x.jade b/web/templates/error50x.jade new file mode 100644 index 0000000..23e35e6 --- /dev/null +++ b/web/templates/error50x.jade @@ -0,0 +1,22 @@ +extends base.jade + +block head + :go:func Error50x(mainSite string, code int, errorMsg string) + style(type="text/css"). + #error { + font-size: 3.5rem; + line-height: 5rem; + text-align: center; + margin: 6rem 0; } + + #error h1 { font-size: 8rem; } + +block header + h1 Internal Server Error + +block body + section#error + h1 #{code} + | #{http.StatusText(code)} + if errorMsg != "" + | #{errorMsg} diff --git a/web/web.go b/web/web.go index ed63b6f..756bc32 100644 --- a/web/web.go +++ b/web/web.go @@ -11,6 +11,7 @@ import ( //go:generate $GOPATH/bin/jade -pkg=web -writer templates/deleted.jade //go:generate $GOPATH/bin/jade -pkg=web -writer templates/uploaded.jade //go:generate $GOPATH/bin/jade -pkg=web -writer templates/error404.jade +//go:generate $GOPATH/bin/jade -pkg=web -writer templates/error50x.jade //go:embed assets var assetsDir embed.FS