Running into issues when using CSS in Play Framework 2.0.3 and could really use some help spotting where I'm going wrong.
My view, called siteview.scala.html, is defined as:
@(name: String, records: List[Record])
@import helper._
@main(name) {
<html>
<head>
<link rel="stylesheet" type="text/css" href="@routes.Assets.at("stylesheets/main.css")">
</head>
<h1>@name</h1>
<ul>
...
</ul>
</html>
}
The CSS file, main.less, is located in app/assets/stylesheets and looks like this:
h1 {color:#F6F9ED;}
@font-face {
font-family: Gentium;
src: url(fonts/GenBasR.ttf);
}
font-family: Gentium, Arial, Georgia;
My apologies for the messy style changes, I've been tweaking it trying to get it right! The asset route is the default one.
Play compiles the CSS without any syntax errors, but it's not getting loaded into the HTML. I even tried moving the file to the public folder, but got a duplicate file error, suggesting it's in the right place.
How can I get the HTML to display with the proper styling? I have a feeling I'm missing something obvious, but I'm new to web development and running out of ideas.