diff options
Diffstat (limited to 'dottydoc/js/src')
-rw-r--r-- | dottydoc/js/src/html/EntityLayout.scala | 48 | ||||
-rw-r--r-- | dottydoc/js/src/model/entities.scala | 22 |
2 files changed, 47 insertions, 23 deletions
diff --git a/dottydoc/js/src/html/EntityLayout.scala b/dottydoc/js/src/html/EntityLayout.scala index 251644075..f81f42e02 100644 --- a/dottydoc/js/src/html/EntityLayout.scala +++ b/dottydoc/js/src/html/EntityLayout.scala @@ -58,28 +58,34 @@ case class EntityLayout(entity: Entity) extends MemberLayout { main( id := "entity-container", cls := "mdl-layout__content", - div( - cls := "page-content", - div(cls := "entity-title", entityTitle), - div(raw(entity.comment.fold("")(_.body))), - entity match { - case x if x.hasMembers => - val e = x.asInstanceOf[Entity with Members] - if (e.members.nonEmpty) - Seq( - h5("Members"), - div( - cls := "mld-grid", - e.members - .collect { - case x if x.hasModifiers && !x.isPrivate => x - } - .flatMap(member(_, entity)).toList + div( + cls := "page-content", + div(cls := "entity-title", entityTitle), + div(raw(entity.comment.fold("")(_.body))), + entity.comment.filter(_.authors.nonEmpty).map { comment => + dl( + dt(cls := "entity-authors", "Authors"), + comment.authors.map(x => dd(cls := "entity-author", raw(x))).toList + ) + }.toOption, + entity match { + case x if x.hasMembers => + val e = x.asInstanceOf[Entity with Members] + if (e.members.nonEmpty) + Seq( + h5("Members"), + div( + cls := "mdl-grid", + e.members + .collect { + case x if x.hasModifiers && !x.isPrivate => x + } + .flatMap(member(_, entity)).toList + ) ) - ) - case _ => () - } - ) + case _ => () + } + ) ), main( id := "search-results", diff --git a/dottydoc/js/src/model/entities.scala b/dottydoc/js/src/model/entities.scala index 4180ad431..ca1b5ec69 100644 --- a/dottydoc/js/src/model/entities.scala +++ b/dottydoc/js/src/model/entities.scala @@ -28,8 +28,26 @@ trait Entity extends sjs.Object { @ScalaJSDefined trait Comment extends sjs.Object { - val body: String - val short: String + val body: String + val short: String + val authors: sjs.Array[String] + val see: sjs.Array[String] + val result: sjs.UndefOr[String] + val throws: Map[String, String] + val valueParams: Map[String, String] + val typeParams: Map[String, String] + val version: sjs.UndefOr[String] + val since: sjs.UndefOr[String] + val todo: List[String] + val deprecated: sjs.UndefOr[String] + val note: List[String] + val example: List[String] + val constructor: sjs.UndefOr[String] + val group: sjs.UndefOr[String] + val groupDesc: Map[String, String] + val groupNames: Map[String, String] + val groupPrio: Map[String, String] + val hideImplicitConversions: List[String] } @ScalaJSDefined |