-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
HTML: Paragraphs to use unique numbered id #12
Comments
It's not exactly the scheme your suggested (global index instead of chapter-paragraph), is that ok? |
Well, it should be a little trickier to display the correct chapter in the "one chapter at once" view, as the I will have to decide the chapter number from the paragraph number (I'll have to climb in the DOM!) but I think I could deal with. Just do know when... |
Actually I already modified the javascript (maybe not in a very clean way) to do that so that book.html#internal-ref displays the correct chapter: https://github.com/lise-henry/crowbook/blob/master/templates/script.js#L29 |
At first glance, it seems fine. We may bind the function to an event so we will not have to manage this later. Currently, I do know if there is an event for url hash change only. |
Well, there is one in HTML5: http://stackoverflow.com/questions/680785/on-window-location-hash-change#answer-681030 |
I was thinking about what I should need to make the HTML output of Crowbook to remember the last vertical position when the user leaves the page and restore it when he comes back, even if the window has another size. It can be done purely with JavaScript, but there a part that would be better done when Crowbook output the HTML, and that's my request.
I would like you to add a unique id to each paragraph. Numbering is not required, but it should be easier for you. I suggest something like
cXXpYY
whereXX
is the chapter number, andYY
the paragraph number.So we'll have something like:
Currently, I do not know when I will have enough time to write the JavaScript part, so I made this request first, in the hope to make this feature implementation progress faster.
The text was updated successfully, but these errors were encountered: