diff options
Diffstat (limited to 'common/shared/src/main/scala/TextTemplates.scala')
-rw-r--r-- | common/shared/src/main/scala/TextTemplates.scala | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/common/shared/src/main/scala/TextTemplates.scala b/common/shared/src/main/scala/TextTemplates.scala index 24a3b0e..e7e364a 100644 --- a/common/shared/src/main/scala/TextTemplates.scala +++ b/common/shared/src/main/scala/TextTemplates.scala @@ -6,6 +6,9 @@ object TextTemplates extends Templates(scalatags.Text) { def scripts(js: Boolean = true) = if (js) Seq( + div(id := "scalajs-error", style := "display: none;")( + "ScalaJS raised an exception. See the log for more information." + ), script(`type` := "text/javascript", src := "/assets/ui/js/ui-fastopt.js"), script(`type` := "text/javascript")( @@ -25,7 +28,7 @@ object TextTemplates extends Templates(scalatags.Text) { | triad.Main().main(root) | } catch(ex) { | // display warning message in case of exception - | //document.getElementById("scalajs-error").style.display = "block"; + | document.getElementById("scalajs-error").style.display = "block"; | throw ex; | } |}); @@ -36,7 +39,22 @@ object TextTemplates extends Templates(scalatags.Text) { else Seq.empty def page(messages: Seq[Message], js: Boolean = true) = html( - head(), + head( + link(rel := "stylesheet", + `type` := "text/css", + href := "/assets/lib/bootstrap-4.1.0/css/bootstrap-reboot.min.css"), + link(rel := "stylesheet", + `type` := "text/css", + href := "/assets/lib/bootstrap-4.1.0/css/bootstrap-grid.min.css"), + link(rel := "stylesheet", + `type` := "text/css", + href := "/assets/lib/bootstrap-4.1.0/css/bootstrap.min.css"), + link(rel := "stylesheet", + `type` := "text/css", + href := "/assets/main.css"), + meta(name := "viewport", + content := "width=device-width, initial-scale=1, shrink-to-fit=no") + ), body( conversation(messages), scripts(js) |