base/src/sqwl/cms/layout/PrimaryView.scala
changeset 19 83fb90bdd15b
parent 13 216da61215db
child 33 fa0f19a74283
equal deleted inserted replaced
18:8cfd67425811 19:83fb90bdd15b
     7 object PrimaryView extends config with UrlScheme {
     7 object PrimaryView extends config with UrlScheme {
     8   def apply(cnt: iContent, st: ViewState): Option[TypedTag[String]] =
     8   def apply(cnt: iContent, st: ViewState): Option[TypedTag[String]] =
     9     st match {
     9     st match {
    10       case ViewArticle(art) => Some(tags2.section(
    10       case ViewArticle(art) => Some(tags2.section(
    11         h1(a(href:=s"/${http.prefix}/${art.pathSegment}", art.title)),
    11         h1(a(href:=s"/${http.prefix}/${art.pathSegment}", art.title)),
    12         div(cls:="row", art.tags.map(t =>
    12         div(cls:="row", div(cls:="col-md-12", art.tags.map(t =>
    13           a(href:=s"/${http.prefix}/$TAG/${t.pathSegment}", cls:="tag", s"(${t.name})"))),
    13           a(href:=s"/${http.prefix}/$TAG/${t.pathSegment}", cls:="tag",
       
    14             t.name)))),
    14         raw(art.htmlContent)
    15         raw(art.htmlContent)
    15       ))
    16       ))
    16       case _ => None
    17       case _ => None
    17     }
    18     }
    18 
    19