Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

Styling of an Index entry in the text? #328

Closed finanalyst closed 8 months ago

finanalyst commented 9 months ago

In the sources there are many targets in the text that are marked with (eg) X<Term|Some glossary entry>. The text Term serves as an anchor for an index. These are rendered into (eg) <a href="...." class="index-entry">Term</a>. Currently, there is no styling of the anchor text in the documentation. I think it would be useful to have some minimal styling, such as faint highlighting, or making the font slightly bolder, or a bigger font.

Also, I think that this information could be included in the search data. Then when the anchor is selected, it would be clear where in the browser page the search has moved to.

A styling change would only need a minor change to the CSS because the anchor tab already has a class name.

@coke @Raku/core thoughts?

finanalyst commented 9 months ago

Also, I was thinking that we could provide a hover-over feature that might copy the anchor to the clipboard so that the anchor can be used elsewhere.

finanalyst commented 8 months ago

@coke @2colours I've added some styling to where X<> markup is in the text (this does not apply to X<> in headers). The mouse over gives the index items. This does not appear useful for the final user I think, but seeing where an indexed item is in the text does seem useful.

An example is in operators term <>

I'll create a PR for doc-website if I get positive response.

finanalyst commented 8 months ago

closing as completed. In docs-dev, will move to docs at next update