Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tooltip when hovering over footnote numbers #7

Open
Bisaloo opened this issue Apr 8, 2020 · 11 comments
Open

Add tooltip when hovering over footnote numbers #7

Bisaloo opened this issue Apr 8, 2020 · 11 comments

Comments

@Bisaloo
Copy link
Member

Bisaloo commented Apr 8, 2020

Many rOpenSci blog posts include a lot of footnotes. Currently, to read the footnote text, you have to click on the number, which brings you to the bottom of the page. To go back, you have to click "previous page" on your browser or scroll up but in both cases, you lose where you were in text and it disrupts the reading flow. It would be more convenient if the footnote text appeared in a tooltip when the reader hovers over the footnote number.

I have no idea how idea difficult this would be so feel free to close if that's too much of a hassle.

@maelle
Copy link
Member

maelle commented Apr 8, 2020

Interesting idea!

Just to be sure, to go back to the text you can click on the arrow at the end of the footnote too? Or doesn't this work for you?

@maelle
Copy link
Member

maelle commented Apr 8, 2020

Screenshot from 2020-04-08 10-45-45

Screenshot attached to clarify

@Bisaloo
Copy link
Member Author

Bisaloo commented Apr 8, 2020

Oh yes, that's right. I missed this but I think I like it even less than clicking "previous" on your browser since it doesn't go back to the exact place you were before, and just put the line with the footnote number at the top of the page.

Interesting idea!

To add some context, I think I was expecting something of the sort because I've been used to journals allowing you to get the details of a reference without scrolling by clicking on it, as you can see on this example.

@Bisaloo
Copy link
Member Author

Bisaloo commented Apr 8, 2020

This is pretty much what I had in mind: http://hiphoff.com/creating-hover-over-footnotes-with-bootstrap/

@maelle
Copy link
Member

maelle commented May 13, 2020

Thanks!

@jeroen mentioned we could maybe add footnote links at the Markdown rendering stage (rather than adding JS), I'm investigating how it could work.

Hugo forum topic

@maelle
Copy link
Member

maelle commented May 18, 2020

No answer on Hugo forum yet.

I read about littlefoot in this blog post

@maelle
Copy link
Member

maelle commented May 18, 2020

Maybe @jeroen's idea could work if there were a thing called a Markdown render hook for footnotes like the one there is for headers now gohugoio/hugo#6713 (comment)

@maelle maelle transferred this issue from ropensci-archive/roweb2 Sep 8, 2020
@maelle
Copy link
Member

maelle commented Nov 20, 2020

At the moment, we cannot use bookdown::bs4_book() strategy unless we use some sort of regex on the content which sounds dangerous.

@maelle maelle mentioned this issue Nov 20, 2020
@maelle
Copy link
Member

maelle commented Nov 30, 2020

This PR is interesting gohugoio/hugo#7427 (but I'd still be in favor of using the JS library for now, as I'm not sure the PR will ever be merged)

@maelle
Copy link
Member

maelle commented Dec 8, 2020

The PR above was actually closed gohugoio/hugo#7427 (comment) -- not sure what'll happen or not in Hugo reg footnotes.

Reg not using littlefoot see #97 (comment)

@maelle
Copy link
Member

maelle commented Feb 10, 2023

@jeroen if we add JS for #483 maybe we could use an external library for this too 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants