bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: two small [Contents] button blemishes


From: Per Bothner
Subject: Re: two small [Contents] button blemishes
Date: Sat, 13 Feb 2021 22:08:28 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 2/12/21 6:24 PM, Per Bothner wrote:
(2) If js-info is enabled then the [Contents] button seems to do nothing, since 
we
aleady have the navigation bar.  Hiding it using CSS isn't possible, because it 
is
surrounded by "[" and "]" (which are not in their own element).  Eleminating
it using JavaScript is possible but a bit fragile/ugly.

Attached is a preliminary patch for fixing the [Contents] links in the js-info 
reader.

It creates a new page-node with a copy of the table of contents.
(We need a copy distinct from the one in the side-bar.)

It mostly works, but needs some polishing.
It would be easier and cleaner if we could improve the generated HTML.
Instead of:

    <span id="SEC_Contents"></span>
    <h2 class="contents-heading">Table of Contents</h2>
    <div class="contents">
      <ul>
        <li><a id="toc-Features-and-screenshots" href="Features.html">Features and 
screenshots</a></li>
      ...

I think this would be cleaner and easier to work with:

    <div id="SEC_Contents" class="contents">
      <h2 class="contents-heading">Table of Contents</h2>
      <ul>
        <li><a id="toc-Features-and-screenshots" href="Features.html">Features and 
screenshots</a></li>
      ...

I figured out that the <div class="contents"> is generated in _default_contents,
but I don't know where the <span id="SEC_Contents"></span> and <h2 ...> are
generated.  Searching for 'contents' doesn't help as the word used for multiple 
things!
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/

Attachment: js-contents1.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]