Simbul / baker

The HTML5 ebook framework to publish interactive books & magazines on iPad & iPhone using simply open web standards
http://bakerframework.com
1.53k stars 378 forks source link

index.html / page JavaScript communication #350

Open jannejava opened 12 years ago

jannejava commented 12 years ago

(was: index.html highlights current page?)

Is it possible to highlight the current page in the nav-menu somehow?

I read there is no way to communicate via Javascript between the page and nav, but is there a an other way?

folletto commented 12 years ago

You could use JavaScript and localStorage to achieve that, but I'm not sure it could work and it's still quite a hack. But this is a good feature request, I marked it as "Feature".

Thanks. :)

jannejava commented 12 years ago

Thanks for prompt reply!

I will look in to localStorage.

If current page and index.html could communciate for example via Javascript it would be possible, as well as center the index.html to the current page.

folletto commented 12 years ago
  1. Centering on the page is something we are not going to do, but you can create a transparent page with centered elements in it. :)
  2. Yes, you're correct. This issue now is tracking the development of that feature. :)
jannejava commented 12 years ago
  1. Sorry I am not following here. :-) For example, if you are on page 45 in the app, double tap and open nav/index.html for the first time you only see thumbnails for pages 1 to maybee 10 and it's not clear where you really are in the "book". Can I solve this with a transparent page?

Anyway it's a great project. :-) As I said highlighting current page will be a very nice feature.

folletto commented 12 years ago

I'm sorry, I misunderstood "as well as center the index.html to the current page", I thought you were talking about "centering visually the content of the index" instead of having as you have now a bar that covers the whole width of the page.

Nothing to add then. :)

mbayona commented 12 years ago

Jannejava, were you able resolve this issue...? I just posted a similar question.

jannejava commented 12 years ago

No I didn't have time to investigate this further. The developers seems to have this feature in their plans...

3 apr 2012 kl. 04:33 skrev mbayona:

Jannejava, were you able resolve this issue...? I just posted a similar question.


Reply to this email directly or view it on GitHub: https://github.com/Simbul/baker/issues/350#issuecomment-4893241

folletto commented 11 years ago

Given the request from Issue #502, the features this bridge should implement are:

  1. Giving to the JavaScript in index the informations about which page is currently loaded.
  2. Give the ability to programmatically open/close the index.
  3. Give a communication channel of some kind between the two (i.e. to start/stop a music).