This is an automated email from the ASF dual-hosted git repository.

grobmeier pushed a commit to branch ms12_conversion_of_md_files
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/ms12_conversion_of_md_files by 
this push:
     new afc6ca1ba4 added basic version of sidebar
afc6ca1ba4 is described below

commit afc6ca1ba48f8c94c5f0872d6e38fc81f9853b58
Author: Christian Grobmeier <[email protected]>
AuthorDate: Sun Feb 25 18:05:32 2024 +0100

    added basic version of sidebar
---
 src/asciidoc/templates/document.html.erb  | 13 +++++++++++--
 src/site/resources/css/logging-custom.css |  9 +++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/asciidoc/templates/document.html.erb 
b/src/asciidoc/templates/document.html.erb
index ed18e64e2e..21553f333c 100644
--- a/src/asciidoc/templates/document.html.erb
+++ b/src/asciidoc/templates/document.html.erb
@@ -86,9 +86,18 @@
   </nav>
 </div>
 
+<%
+  if (attr? :toc) && (attr? 'toc-placement', 'auto') %>
+  <div id="toc" class="toc2">
+    <div id="toctitle"><%= attr 'toc-title' %></div>
+    <%= converter.convert self, 'outline' %>
+  </div><%
+  end
+%>
+
 <div id="content">
-  <h1><%= doctitle %></h1>
-  <%= content %>
+    <h1><%= doctitle %></h1>
+    <%= content %>
 </div><%
   unless !footnotes? || attr?(:nofootnotes) %>
     <div id="footnotes">
diff --git a/src/site/resources/css/logging-custom.css 
b/src/site/resources/css/logging-custom.css
index ee2098cf64..b5bd6de115 100644
--- a/src/site/resources/css/logging-custom.css
+++ b/src/site/resources/css/logging-custom.css
@@ -3,6 +3,8 @@
     max-width: 100%;
     height: 10vh;
     align-items: center;
+    background-color: white;
+    z-index: 10000;
 }
 
 #header .logo img {
@@ -81,6 +83,9 @@
 }
 
 /** Footer */
+#footer {
+    z-index: 1000;
+}
 
 #footer .footer-blocks {
     display: flex;
@@ -123,5 +128,9 @@
     padding: 1em;
 }
 
+#toc.toc2 {
+    padding-top: 15vh;
+    border-top: 1px solid #e7e7e9;
+}
 
 

Reply via email to