aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/html
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index 30ae0562..9f568287 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -634,8 +634,18 @@ open class HtmlRenderer(
}
private fun FlowContent.buildNavigationElement(node: PageNode, page: PageNode) =
- if (node.isNavigable) buildLink(node, page)
- else text(node.name)
+ if (node.isNavigable) {
+ val isCurrentPage = (node == page)
+ if (isCurrentPage) {
+ span(classes = "current") {
+ text(node.name)
+ }
+ } else {
+ buildLink(node, page)
+ }
+ } else {
+ text(node.name)
+ }
private fun FlowContent.buildLink(to: PageNode, from: PageNode) =
locationProvider.resolve(to, from)?.let { path ->