diff --git a/make/Docs.gmk b/make/Docs.gmk index 3c28fe190a1..b0618cee119 100644 --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -626,7 +626,7 @@ ifeq ($(ENABLE_PANDOC), true) FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \ CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ REPLACEMENTS := @@VERSION_SHORT@@ => $(VERSION_SHORT), \ - OPTIONS := -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \ + OPTIONS := --toc -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \ POST_PROCESS := $(TOOL_FIXUPPANDOC), \ EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \ $(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT), \ diff --git a/make/data/docs-resources/resources/jdk-default.css b/make/data/docs-resources/resources/jdk-default.css index 2a0dbcdbb43..0db25dfcbcc 100644 --- a/make/data/docs-resources/resources/jdk-default.css +++ b/make/data/docs-resources/resources/jdk-default.css @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -162,3 +162,22 @@ table.centered td { font-style: italic; font-size: 80%; } + +nav#TOC { + border: 1px solid gray; + border-radius: 10px; + padding: 5px 10px; + margin-bottom: 15px; +} + +nav#TOC ul ul { + font-size:smaller; +} + +nav#TOC ul ul li { + display: inline-block +} + +nav#TOC ul ul li::before { + content: " \2022 " +} diff --git a/make/jdk/src/classes/build/tools/fixuppandoc/Main.java b/make/jdk/src/classes/build/tools/fixuppandoc/Main.java index 9159fd8e818..c790f0f16a3 100644 --- a/make/jdk/src/classes/build/tools/fixuppandoc/Main.java +++ b/make/jdk/src/classes/build/tools/fixuppandoc/Main.java @@ -81,6 +81,10 @@ import java.util.regex.Pattern; * * Update the content string, to indicate it has been processed by this program. * + *

{@code

+ * + * Set attribute {@code title="Table Of Contents"} + * */ public class Main { /** @@ -273,6 +277,11 @@ public class Main { } //
is not permitted within these elements allowMain = false; + if (name.equals("nav") && Objects.equals(attrs.get("id"), "TOC")) { + out.write(buffer.toString() + .replaceAll(">$", " title=\"Table Of Contents\">")); + buffer.setLength(0); + } break; case "body":