From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D82AD1FF17A for ; Tue, 6 Aug 2024 15:28:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 475081E47F; Tue, 6 Aug 2024 15:28:26 +0200 (CEST) Date: Tue, 6 Aug 2024 15:27:53 +0200 From: Christoph Heiss To: pmg-devel@lists.proxmox.com Message-ID: References: <20240618094824.570620-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240618094824.570620-1-c.heiss@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pmg-devel] [PATCH docs] asciidoc: add clickable anchor link to all headings X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" Ping, still applies. On Tue, Jun 18, 2024 at 11:48:18AM GMT, Christoph Heiss wrote: > Works the same as for our PVE/PBS documentation and is generally common > for documentations. > > Very useful for linking specific sections of the documentation in other > places. Previously, this always had to be done by getting the correct > anchor from the HTML directly via e.g. browser devtools. > > Signed-off-by: Christoph Heiss > --- > The PVE equivalent was recently applied [0] - this is essentially the > same patch, just adapted for pmg-docs. > > [0] https://git.proxmox.com/?p=pve-docs.git;a=commit;h=ecab5895a4 > > asciidoc/pmg-docs.css | 33 +++++++++++++++++++++++++++++++++ > asciidoc/pmg-html.conf | 18 ++++++++++++++---- > 2 files changed, 47 insertions(+), 4 deletions(-) > > diff --git a/asciidoc/pmg-docs.css b/asciidoc/pmg-docs.css > index 45e2b11..47eeb79 100644 > --- a/asciidoc/pmg-docs.css > +++ b/asciidoc/pmg-docs.css > @@ -1,6 +1,7 @@ > :root { > /* pre-defined colors */ > --pdt-grey-950: hsl(0deg, 0%, 95%); > + --pdt-grey-750: hsl(0deg, 0%, 75%); > --pdt-grey-400: hsl(0deg, 0%, 40%); > --pdt-grey-250: hsl(0deg, 0%, 25%); > --pdt-grey-150: hsl(0deg, 0%, 15%); > @@ -30,6 +31,38 @@ div.admonitionblock td.icon > img { > padding: 0.15em; > } > > +/* Support for heading anchor links */ > +h3 { > + border-bottom: unset; > +} > + > +h3 > span { > + display: inline-block; > + border-bottom: 2px solid silver; > +} > + > +a.headerlink { > + color: var(--pdt-grey-750); > + padding: 0 4px; > + text-decoration: none; > + visibility: hidden; > +} > + > +/* add it as an pseudo-element, so that it does not show up in the ToC */ > +a.headerlink::after { > + content: '\00b6'; > + text-decoration: none; > +} > + > +h2:hover > a.headerlink, > +h3:hover > a.headerlink, > +h4:hover > a.headerlink, > +h5:hover > a.headerlink, > +h6:hover > a.headerlink { > + visibility: visible; > +} > + > +/* Dark mode theme */ > @media screen and (prefers-color-scheme: dark) { > :root { > color-scheme: dark; > diff --git a/asciidoc/pmg-html.conf b/asciidoc/pmg-html.conf > index 9f694fd..40dae57 100644 > --- a/asciidoc/pmg-html.conf > +++ b/asciidoc/pmg-html.conf > @@ -508,7 +508,10 @@ bodydata=| > > [sect1] >
> -{numbered?{sectnum} }{title} > + > +{numbered?{sectnum} }{title} > +{id? } > + >
> | >
> @@ -516,19 +519,26 @@ bodydata=| > > [sect2] >
> -{numbered?{sectnum} }{title} > + > +{numbered?{sectnum} }{title} > +{id? } > + > | >
> > [sect3] >
> -{numbered?{sectnum} }{title} > +{numbered?{sectnum} }{title} > +{id? } > + > | >
> > [sect4] >
> -{title} > +{title} > +{id? } > + > | >
> > -- > 2.44.1 > > > > _______________________________________________ > pmg-devel mailing list > pmg-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel > > _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel