port error page to scalatags
parent
c2286d7093
commit
5ee02f5af1
|
@ -0,0 +1,28 @@
|
|||
package views.html
|
||||
package base
|
||||
|
||||
import lila.api.Context
|
||||
import lila.app.templating.Environment._
|
||||
import lila.app.ui.ScalatagsTemplate._
|
||||
|
||||
import controllers.routes
|
||||
|
||||
object errorPage {
|
||||
|
||||
def apply(ex: Throwable)(implicit ctx: Context) = {
|
||||
layout(
|
||||
title = "Internal server error",
|
||||
responsive = true
|
||||
) {
|
||||
main(cls := "page-small box box-pad")(
|
||||
h1("Something went wrong on this page"),
|
||||
p(
|
||||
"If the problem persists, please ",
|
||||
a(href := s"${routes.Main.contact}#help-error-page")("report the bug"),
|
||||
"."
|
||||
),
|
||||
code(ex.getMessage)
|
||||
)
|
||||
}
|
||||
}.toHtml
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
@(ex: Throwable)(implicit ctx: Context)
|
||||
|
||||
@base.layout(title = "Internal server error") {
|
||||
|
||||
<div class="content_box small_box">
|
||||
<h1>Something went wrong on this page.</h1>
|
||||
<br />
|
||||
<br />
|
||||
<p>If the problem persists, please <a href="@routes.Main.contact#error-page">report the bug</a>.</p>
|
||||
<br />
|
||||
<br />
|
||||
<code>@ex.getMessage</code>
|
||||
</div>
|
||||
}.toHtml
|
Loading…
Reference in New Issue