diff options
author | Filip Zybała <fzybala@virtuslab.com> | 2020-04-30 11:42:30 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@users.noreply.github.com> | 2020-05-07 14:00:13 +0200 |
commit | 652fd907f5bef6dfb87b545158c34d84f2902f06 (patch) | |
tree | 006bb4b97372b17745b0fa3ef67d93151b01bbcf /plugins/base/src/main/kotlin/translators/documentables | |
parent | 31d6374cc7101d7dea24defcd1c03e909420ccb6 (diff) | |
download | dokka-652fd907f5bef6dfb87b545158c34d84f2902f06.tar.gz dokka-652fd907f5bef6dfb87b545158c34d84f2902f06.tar.bz2 dokka-652fd907f5bef6dfb87b545158c34d84f2902f06.zip |
Changed html table to div's. Adjusted css to match figma.
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/documentables')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 86 |
1 files changed, 37 insertions, 49 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index c3621d1b..61ec2acf 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -69,7 +69,7 @@ open class DefaultPageCreator( } +contentForComments(m) block("Packages", 2, ContentKind.Packages, m.packages, m.platformData.toSet()) { - link(it.name, it.dri) + link(it.name, it.dri, kind = ContentKind.Main) } // text("Index\n") TODO // text("Link to allpage here") @@ -82,14 +82,12 @@ open class DefaultPageCreator( +contentForComments(p) +contentForScope(p, p.dri, p.platformData) block("Type aliases", 2, ContentKind.TypeAliases, p.typealiases, p.platformData.toSet()) { - link(it.name, it.dri) - group { - platformDependentHint(it.dri, it.platformData.toSet()) { - +buildSignature(it) - } - group(kind = ContentKind.BriefComment) { - text(it.briefDocumentation()) - } + link(it.name, it.dri, kind = ContentKind.Main) + platformDependentHint(it.dri, it.platformData.toSet(), kind = ContentKind.Symbol) { + +buildSignature(it) + } + group(kind = ContentKind.BriefComment) { + text(it.briefDocumentation()) } } } @@ -100,36 +98,30 @@ open class DefaultPageCreator( platformData: List<PlatformData> ) = contentBuilder.contentFor(s as Documentable) { block("Types", 2, ContentKind.Classlikes, s.classlikes, platformData.toSet()) { - link(it.name.orEmpty(), it.dri) - group { - platformDependentHint(it.dri, it.platformData.toSet()) { - +buildSignature(it) - } - group(kind = ContentKind.BriefComment) { - text(it.briefDocumentation()) - } + link(it.name ?: "", it.dri, kind = ContentKind.Main) + platformDependentHint(it.dri, it.platformData.toSet(), kind = ContentKind.Symbol) { + +buildSignature(it) + } + group(kind = ContentKind.BriefComment) { + text(it.briefDocumentation()) } } block("Functions", 2, ContentKind.Functions, s.functions, platformData.toSet()) { - link(it.name, it.dri) - group { - platformDependentHint(it.dri, it.platformData.toSet()) { - +buildSignature(it) - } - group(kind = ContentKind.BriefComment) { - text(it.briefDocumentation()) - } + link(it.name, it.dri, kind = ContentKind.Main) + platformDependentHint(it.dri, it.platformData.toSet(), kind = ContentKind.Symbol) { + +buildSignature(it) + } + group(kind = ContentKind.BriefComment) { + text(it.briefDocumentation()) } } block("Properties", 2, ContentKind.Properties, s.properties, platformData.toSet()) { - link(it.name, it.dri) - group { - platformDependentHint(it.dri, it.platformData.toSet()) { - +buildSignature(it) - } - group(kind = ContentKind.BriefComment) { - text(it.briefDocumentation()) - } + link(it.name, it.dri, kind = ContentKind.Main) + platformDependentHint(it.dri, it.platformData.toSet(), kind = ContentKind.Symbol) { + +buildSignature(it) + } + group(kind = ContentKind.BriefComment) { + text(it.briefDocumentation()) } } s.safeAs<WithExtraProperties<Documentable>>()?.let { it.extra[InheritorsInfo] }?.let { inheritors -> @@ -181,27 +173,23 @@ open class DefaultPageCreator( c.constructors.filter { it.extra[PrimaryConstructorExtra] == null }, c.platformData.toSet() ) { - link(it.name, it.dri) - group { - platformDependentHint(it.dri, it.platformData.toSet()) { - +buildSignature(it) - } - group(kind = ContentKind.BriefComment) { - text(it.briefDocumentation()) - } + link(it.name, it.dri, kind = ContentKind.Main) + platformDependentHint(it.dri, it.platformData.toSet(), kind = ContentKind.Symbol) { + +buildSignature(it) + } + group(kind = ContentKind.BriefComment) { + text(it.briefDocumentation()) } } } if (c is DEnum) { block("Entries", 2, ContentKind.Classlikes, c.entries, c.platformData.toSet()) { - link(it.name.orEmpty(), it.dri) - group { - platformDependentHint(it.dri, it.platformData.toSet()) { - +buildSignature(it) - } - group(kind = ContentKind.BriefComment) { - text(it.briefDocumentation()) - } + link(it.name.orEmpty(), it.dri, kind = ContentKind.Main) + platformDependentHint(it.dri, it.platformData.toSet(), kind = ContentKind.Symbol) { + +buildSignature(it) + } + group(kind = ContentKind.BriefComment) { + text(it.briefDocumentation()) } } } |