diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-08-08 14:19:57 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-08-19 15:37:33 +0200 |
commit | 079e3db0f157ee6eae9e8a34b3bbf7a75cdaa929 (patch) | |
tree | 3935ad3196cf7b6d957f16a02d43c49e21165568 /dottydoc/js/src/html/EntityLayout.scala | |
parent | 20fda579d76690cc86a1f0a5c9e703fa4a94cb47 (diff) | |
download | dotty-079e3db0f157ee6eae9e8a34b3bbf7a75cdaa929.tar.gz dotty-079e3db0f157ee6eae9e8a34b3bbf7a75cdaa929.tar.bz2 dotty-079e3db0f157ee6eae9e8a34b3bbf7a75cdaa929.zip |
Implement annotation parsing like CommentFactoryBase from nsc
Diffstat (limited to 'dottydoc/js/src/html/EntityLayout.scala')
-rw-r--r-- | dottydoc/js/src/html/EntityLayout.scala | 48 |
1 files changed, 27 insertions, 21 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", |