aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/renderers/HtmlRenderer.kt6
-rw-r--r--core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt21
-rw-r--r--core/src/main/resources/dokka/styles/style.css7
3 files changed, 10 insertions, 24 deletions
diff --git a/core/src/main/kotlin/renderers/HtmlRenderer.kt b/core/src/main/kotlin/renderers/HtmlRenderer.kt
index bf4090f4..c8d2f619 100644
--- a/core/src/main/kotlin/renderers/HtmlRenderer.kt
+++ b/core/src/main/kotlin/renderers/HtmlRenderer.kt
@@ -30,13 +30,11 @@ open class HtmlRenderer(fileWriter: FileWriter, locationProvider: LocationProvid
return buildNavigationWithContext(page, page)
}
- override fun buildGroup(children: List<ContentNode>, pageContext: PageNode): String =
- children.find { it is ContentLink }?.build(pageContext) + "</td>\n" +
- "<td>" + children.filterNot { it is ContentLink }.joinToString("\n") { it.build(pageContext) }
+ override fun buildGroup(children: List<ContentNode>, pageContext: PageNode): String = children.joinToString("</td>\n<td>\n") { it.build(pageContext) }
override fun buildBlock(name: String, content: List<ContentNode>, pageContext: PageNode): String =
buildHeader(3, name) + "<table>\n<tr>\n<td>\n" +
- content.joinToString("</td>\n</tr>\n<tr>\n<td>") { "(" + it.dci.platformDataList.map {it.platformName}.joinToString() + ") " + it.build(pageContext) } + "</td></tr>\n</table>"
+ content.joinToString("</td>\n</tr>\n<tr>\n<td>") { "(" + it.dci.platformDataList.map { it.platformName }.joinToString() + ") " + it.build(pageContext) } + "</td></tr>\n</table>"
override fun renderPage(page: PageNode) {
val pageText = buildStartHtml(page) + buildPageContent(page) + buildEndHtml()
diff --git a/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt b/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt
index 5db50e35..5e351d95 100644
--- a/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt
+++ b/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt
@@ -180,7 +180,7 @@ class DefaultDocumentationToPageTransformer(
}
private fun ContentBuilder.type(t: KotlinType) {
- t.constructor.declarationDescriptor?.also { link(it.fqNameSafe.asString(), DRI.from(it)) }
+ t.constructor.declarationDescriptor?.also { link(it.fqNameSafe.pathSegments().last().asString(), DRI.from(it)) }
?: run {
logger.error("type $t cannot be resolved")
text("???")
@@ -189,21 +189,4 @@ class DefaultDocumentationToPageTransformer(
type(it.type)
}
}
-}
-
-fun DocumentationNode<*>.identifier(platformData: List<PlatformData>): List<ContentNode> {
-// when(this) {
-// is Class -> ContentText(this.descriptor.toString(), platforms), ContentText("(") this.properties.map { ContentText(it.descriptor.visibility + " " + it.descriptor.name + ":" + ),}
-// is Function ->
-// is Property ->
-// else -> return emptyList()
-// }
- TODO()
-}
-// take this ^ from old dokka
-/*
-pages are equal if the content and the children are equal
-we then can merge the content by merging the platforms
-and take an arbitrary set of the children
-but we need to recursively process all of the children anyway
- */ \ No newline at end of file
+} \ No newline at end of file
diff --git a/core/src/main/resources/dokka/styles/style.css b/core/src/main/resources/dokka/styles/style.css
index 914be69d..4253fc4c 100644
--- a/core/src/main/resources/dokka/styles/style.css
+++ b/core/src/main/resources/dokka/styles/style.css
@@ -1,6 +1,6 @@
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300i,400,700);
-body, table {
+body, table{
padding:50px;
font:14px/1.5 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
color:#555;
@@ -10,6 +10,11 @@ body, table {
max-width: 1440px;
}
+table {
+ display: flex;
+ padding:5px;
+}
+
.keyword {
color:black;
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;