LoginSignup
1
0

More than 5 years have passed since last update.

Scala Templateの関数で少し簡単にCSSファイルへの参照を記述する

Last updated at Posted at 2013-06-06
@(content: Html)
@style(asset: String) = {
 <link rel="stylesheet" href="@routes.Assets.at(asset)">
}
<!DOCTYPE html>
<head>
  <title>sample</title>
  @style("bootstrap/css/bootstrap.css")
  @style("stylesheets/main.css")
</head>
  <body>
  </body>
</html>

Instant Play Framework Starterに掲載されていた方法、こうすると少しらくちん。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0