[pmg-devel] applied: [PATCH docs 1/3] adapt toc2 and more responsive style changes from PVE

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Feb 13 18:09:28 CET 2020


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 asciidoc-pmg.in        |  1 +
 asciidoc/pmg-html.conf | 44 ++++++++++++++++++++++++++++++++++++++++++
 pmg-admin-guide.adoc   |  2 +-
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/asciidoc-pmg.in b/asciidoc-pmg.in
index 443afe6..ec4bb2a 100644
--- a/asciidoc-pmg.in
+++ b/asciidoc-pmg.in
@@ -319,6 +319,7 @@ sub compile_asciidoc {
     } elsif ($env eq 'default') {
 	die "$infile: wrong doctype\n" if $doctype != 0;
 	$attributes->{toc} = undef;
+	$attributes->{toc2} = undef;
     }
 
     if (!defined($outfile)) {
diff --git a/asciidoc/pmg-html.conf b/asciidoc/pmg-html.conf
index 75cc9a4..b801096 100644
--- a/asciidoc/pmg-html.conf
+++ b/asciidoc/pmg-html.conf
@@ -587,6 +587,50 @@ endif::toc2[]
 include1::{stylesheet}[]
 </style>
 endif::linkcss[]
+
+ifdef::toc2[]
+<style type="text/css">
+div #toc {
+    width: 19em;
+    font-family: sans;
+    border-right: 3px solid gainsboro;
+}
+.book, .article {
+    margin-left: 22em
+}
+div #toc a:link, div #toc a:visited {
+    color: black;
+    text-decoration: none;
+}
+div #toc a:hover {
+    text-decoration: underline;
+}
+div .toclevel1 {
+    font-size: 1.1em;
+    margin-bottom: 0.3em;
+}
+
+.monospaced, code, pre {
+    overflow-wrap: break-word;
+}
+img {
+    max-width: 100%;
+}
+
+ at media only screen and (min-width: 85em) {
+div #toc {
+    width: 22em
+}
+.book, .article {
+    margin-left: 25em
+}
+div .toclevel1 {
+    font-size: 1.2em;
+}
+}
+</style>
+endif::toc2[]
+
 ifndef::disable-javascript[]
 ifdef::linkcss[]
 <script type="text/javascript" src="{scriptsdir=.}/asciidoc.js"></script>
diff --git a/pmg-admin-guide.adoc b/pmg-admin-guide.adoc
index aee7cf6..15ca793 100644
--- a/pmg-admin-guide.adoc
+++ b/pmg-admin-guide.adoc
@@ -8,7 +8,7 @@ Proxmox Mail Gateway Administration Guide
 endif::pmglogo[]
 :doctype:   book
 :title: Proxmox Mail Gateway Administration Guide
-:toc:
+:toc2:
 :numbered:
 :data-uri:
 :icons:
-- 
2.20.1




More information about the pmg-devel mailing list