Raku / doc-website

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

Style paragraph text that has been indexed to highlight it #330

Closed finanalyst closed 8 months ago

finanalyst commented 8 months ago
finanalyst commented 8 months ago

I have found it strange when selecting a search item that is indexed, or a link to an indexed item, to get thrown into a page without it being obvious why there. By highlighting the indexed text, it is then visually obvious why the link has been made.

But very useful when looking for unfulfilled links (a source link is targeting an indexed item, but the browser did not find it).

coke commented 8 months ago

Can you give me a page with an example with &without so I can see the diff?

finanalyst commented 8 months ago

@coke See image below. Same page in docs.raku.org and in new-raku.finanalyst.org (window on top). The 'quote-words' term has X<> markup around it. The question I have is about the content of the tooltip when you hover over the highlighted term. On new-raku, I have implemented a before with the meta portion of the X<DISPLAY|META>. I could instead try to get the link in the tool-tip, so the hovering and right-clicking allows you to copy the link. This behaviour might be more useful, but I haven't worked out how to do it. image

coke commented 8 months ago

I was very confused until I realized both of your links send me to docs.raku.org.

coke commented 8 months ago

I don't think the tooltip is adding any benefit in these cases. The display styling is fine.

finanalyst commented 8 months ago

@coke my bad with the links. I'll remove the tooltip, and create a PR.

finanalyst commented 8 months ago

this PR needs to be rebased to main. It's getting too complicated here. I'm deleting this branch and creating a new one.

coke commented 8 months ago

You can rebase the existing branch and force push when dealing with PRs. If you're the only working on a branch, the force push is OK, IMO.