~sircmpwn/writefreesoftware.org

1

Navigation-bar unreadable without JavaScript

Details
Message ID
<CUN0XI0G59AI.276DS12WJHXZL@andrewyu>
DKIM signature
missing
Download raw message
Hi!

I've noticed that the compose theme's navigation bar becomes
unstructured and unusable without JavaScript.

When JavaScript is enabled, each page is displayed in the navigation
bar, and sections (#anchors) of each page are displayed if and only if
that page is in focus.

With JavaScript disabled, there is no significant visual distinction
between pages and sections. The font size looks a bit different, and
there's a few pixels of a padding difference, but spotting for these
differences is a huge pain. Furthermore, only clicking on page titles
work. If I'm on one page but I click on the sidebar's link to a
particular section in another page, it sends me to the section anchor of
that page on my current page, which of course doesn't work.

I have almost no experience in Hugo and CSS, so I won't be able to work
this out, but I have a feeling that this is doable.

--
Best regards,

Runxi Yu (she/they)
https://andrewyu.org/
Details
Message ID
<7f6b56ca-c335-426b-7549-92576c436726@freakspot.net>
In-Reply-To
<CUN0XI0G59AI.276DS12WJHXZL@andrewyu> (view parent)
DKIM signature
missing
Download raw message
Regarding the CSS issue only...

Something like this could be added to assets/sass/_custom.scss

nav#TableOfContents {
     ul {
         li {
             padding-left: 1em;
         }
     }
}

However, that would also change things for people that use JavaScript. I 
guess you could put that style in a <noscript> tag or do that only with 
CSS. In any case, the problem is the Compose theme and the best solution 
might be sending a patch to the developer of Compose.

You could also add something like this to the custom head template of 
WriteFreeSoftware.org:

<noscript>
   <style>
     nav#TableOfContents ul li {
         padding-left: 1em;
     }
   </style>
</noscript>
Reply to thread Export thread (mbox)