example/src/sqwl/cms/Content.scala
changeset 12 e7512f9dc903
parent 10 4b5313097a4d
child 13 216da61215db
equal deleted inserted replaced
11:4d8cf198bed2 12:e7512f9dc903
    61     ("icon.png", Paths.get("example/content/public/images/icon.png"))
    61     ("icon.png", Paths.get("example/content/public/images/icon.png"))
    62   def publicAssets: Path = Paths.get("example/content/public")
    62   def publicAssets: Path = Paths.get("example/content/public")
    63   def styleSheet =
    63   def styleSheet =
    64     ("site.css", Paths.get("example/content/public/css/site.css"))
    64     ("site.css", Paths.get("example/content/public/css/site.css"))
    65   def articlesByTag(t: iTag): Seq[iArticle] = Seq()
    65   def articlesByTag(t: iTag): Seq[iArticle] = Seq()
    66   def articlesByCategory(c: iCategory): Seq[iArticle] = Seq()
    66   def articlesByCategory(c: iCategory): Seq[iArticle] =
       
    67     Article.values.filter(_.category contains(c))
    67   def tags: Seq[iTag] = Seq()
    68   def tags: Seq[iTag] = Seq()
    68   def categories: Seq[iCategory] = Category.values
    69   def categories: Seq[iCategory] = Category.values
    69   def articleByPath(path: String): Option[iArticle] =
    70   def articleByPath(path: String): Option[iArticle] =
    70     Article.withNameOption(path)
    71     Article.withNameOption(path)
    71   def categoryByPath(path: String): Option[iCategory] =
    72   def categoryByPath(path: String): Option[iCategory] =