diff options
author | Pacien TRAN-GIRARD | 2015-01-22 20:58:09 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-01-22 20:58:09 +0100 |
commit | 2f6780969318c08c7a0a0e8e52a7dad33ff53786 (patch) | |
tree | 893d9356b0fd02b40124712bfa88128f02cd7b53 /app | |
download | minibay-2f6780969318c08c7a0a0e8e52a7dad33ff53786.tar.gz |
Bootstrap Play Scala project
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/Application.scala | 12 | ||||
-rw-r--r-- | app/views/index.scala.html | 7 | ||||
-rw-r--r-- | app/views/main.scala.html | 15 |
3 files changed, 34 insertions, 0 deletions
diff --git a/app/controllers/Application.scala b/app/controllers/Application.scala new file mode 100644 index 0000000..7cd798f --- /dev/null +++ b/app/controllers/Application.scala | |||
@@ -0,0 +1,12 @@ | |||
1 | package controllers | ||
2 | |||
3 | import play.api._ | ||
4 | import play.api.mvc._ | ||
5 | |||
6 | object Application extends Controller { | ||
7 | |||
8 | def index = Action { | ||
9 | Ok(views.html.index("Your new application is ready.")) | ||
10 | } | ||
11 | |||
12 | } \ No newline at end of file | ||
diff --git a/app/views/index.scala.html b/app/views/index.scala.html new file mode 100644 index 0000000..d6a6b22 --- /dev/null +++ b/app/views/index.scala.html | |||
@@ -0,0 +1,7 @@ | |||
1 | @(message: String) | ||
2 | |||
3 | @main("Welcome to Play") { | ||
4 | |||
5 | @play20.welcome(message) | ||
6 | |||
7 | } | ||
diff --git a/app/views/main.scala.html b/app/views/main.scala.html new file mode 100644 index 0000000..5025aa5 --- /dev/null +++ b/app/views/main.scala.html | |||
@@ -0,0 +1,15 @@ | |||
1 | @(title: String)(content: Html) | ||
2 | |||
3 | <!DOCTYPE html> | ||
4 | |||
5 | <html> | ||
6 | <head> | ||
7 | <title>@title</title> | ||
8 | <link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")"> | ||
9 | <link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")"> | ||
10 | <script src="@routes.Assets.at("javascripts/hello.js")" type="text/javascript"></script> | ||
11 | </head> | ||
12 | <body> | ||
13 | @content | ||
14 | </body> | ||
15 | </html> | ||