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