--- /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
+ }
+
+}