equal
deleted
inserted
replaced
3 import BuildInfo.versions |
3 import BuildInfo.versions |
4 import scalatags.Text.all |
4 import scalatags.Text.all |
5 import scalatags.Text.all._ |
5 import scalatags.Text.all._ |
6 import scalatags.Text.tags2 |
6 import scalatags.Text.tags2 |
7 import scalatags.Text.TypedTag |
7 import scalatags.Text.TypedTag |
8 import sqwl.cms.layout.Navbar |
8 import sqwl.cms.layout._ |
9 |
9 |
10 object Layout extends config { |
10 object Layout extends config { |
11 |
11 |
12 lazy val bootstrapCss = s"/${http.prefix}/assets/bootstrap/${versions.bootstrap}/css/bootstrap.min.css" |
12 lazy val bootstrapCss = s"/${http.prefix}/assets/bootstrap/${versions.bootstrap}/css/bootstrap.min.css" |
13 lazy val bootstrapJs = s"/${http.prefix}/assets/bootstrap/${versions.bootstrap}/js/bootstrap.min.js" |
13 lazy val bootstrapJs = s"/${http.prefix}/assets/bootstrap/${versions.bootstrap}/js/bootstrap.min.js" |
34 }) |
34 }) |
35 ), |
35 ), |
36 body(paddingTop:=120, |
36 body(paddingTop:=120, |
37 Navbar(content, st), |
37 Navbar(content, st), |
38 div(role:="main", cls:="container", |
38 div(role:="main", cls:="container", |
39 st match { |
39 Categories(content, st), |
40 case ViewArticle(article) => div( |
40 ArticlesInCategory(content, st), |
41 a(href:=s"/${http.prefix}/${article.pathSegment}", article.title), |
41 PrimaryView(content, st) |
42 raw(article.htmlContent) |
|
43 ) |
|
44 case _ => "" |
|
45 } |
|
46 ), |
42 ), |
47 footer(id:="footer", p(raw(" "))), |
43 footer(id:="footer", p(raw(" "))), |
48 script(src:=jquery), |
44 script(src:=jquery), |
49 script(src:=bootstrapJs) |
45 script(src:=bootstrapJs) |
50 ) |
46 ) |