diff -r 4d8cf198bed2 -r e7512f9dc903 base/src/sqwl/cms/layout/PrimaryView.scala --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base/src/sqwl/cms/layout/PrimaryView.scala Thu Dec 06 15:19:41 2018 +0100 @@ -0,0 +1,17 @@ +package sqwl.cms.layout + +import scalatags.Text.all._ +import scalatags.Text.{TypedTag, tags2} +import sqwl.cms._ + +object PrimaryView extends config { + def apply(cnt: iContent, st: ViewState): Option[TypedTag[String]] = + st match { + case ViewArticle(art) => Some(tags2.section( + h1(a(href:=s"/${http.prefix}/${art.pathSegment}", art.title)), + raw(art.htmlContent) + )) + case _ => None + } + +}