diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 73fd07e0..b4d98b58 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -41,7 +41,7 @@ open class HtmlRenderer( setupSharedModel(templateModelMerger.invoke(templateModelFactories) { buildSharedModel() }) } - private var shouldRenderSourceSetBubbles: Boolean = false + private var shouldRenderSourceSetTabs: Boolean = false override val preprocessors = context.plugin<DokkaBase>().query { htmlPreprocessors } @@ -175,7 +175,7 @@ open class HtmlRenderer( pageContext: ContentPage, extra: PropertyContainer<ContentNode> = PropertyContainer.empty(), styles: Set<Style> = emptySet(), - shouldHaveTabs: Boolean = shouldRenderSourceSetBubbles + shouldHaveTabs: Boolean = shouldRenderSourceSetTabs ) { val contents = contentsForSourceSetDependent(nodes, pageContext) val isOnlyCommonContent = contents.singleOrNull()?.let { (sourceSet, _) -> @@ -500,19 +500,17 @@ open class HtmlRenderer( } private fun FlowContent.createPlatformTagBubbles(sourceSets: List<DisplaySourceSet>, cssClasses: String = "") { - if (shouldRenderSourceSetBubbles) { - div("platform-tags $cssClasses") { - sourceSets.sortedBy { it.name }.forEach { - div("platform-tag") { - when (it.platform.key) { - "common" -> classes = classes + "common-like" - "native" -> classes = classes + "native-like" - "jvm" -> classes = classes + "jvm-like" - "js" -> classes = classes + "js-like" - "wasm" -> classes = classes + "wasm-like" - } - text(it.name) + div("platform-tags $cssClasses") { + sourceSets.sortedBy { it.name }.forEach { + div("platform-tag") { + when (it.platform.key) { + "common" -> classes = classes + "common-like" + "native" -> classes = classes + "native-like" + "jvm" -> classes = classes + "jvm-like" + "js" -> classes = classes + "js-like" + "wasm" -> classes = classes + "wasm-like" } + text(it.name) } } } @@ -779,7 +777,7 @@ open class HtmlRenderer( } override fun render(root: RootPageNode) { - shouldRenderSourceSetBubbles = shouldRenderSourceSetBubbles(root) + shouldRenderSourceSetTabs = shouldRenderSourceSetTabs(root) super.render(root) } @@ -805,7 +803,6 @@ open class HtmlRenderer( page, resources, locationProvider, - shouldRenderSourceSetBubbles, generatedContent ) } |