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

Notify Server Backend with Device Type (iPhone or iPad) #1179

Open nin9creative opened 11 years ago

nin9creative commented 11 years ago

It may be useful in certain circumstances for the server side backend to have an indicator telling it what type of device is being used to access the application.

For instance, I'm working on a use case where a user wants to specify a certain in5 generated .hpub for iPhones and a different .hpub for iPads. It would be useful to know when the server is passing back the Shelf.JSON in order to populate the link correctly.

Adding a parameter that gets sent along much like the "environment" variable would be ideal.

Andrew

folletto commented 11 years ago

That is nice. :)

tekdope commented 11 years ago

This is awesome! That would save a lot of work if we could fire a download following the device (iPad/iPhone). +1

MrKistic commented 11 years ago

Agreed. in5 is not nice for making responsive layouts... one for each would make things a whole lot easier!

fcontreras commented 11 years ago

I did something similar for a client, had the code for the latest baker/master here https://github.com/fcontreras/baker/commit/e902b89044fae70ed73778847580520301aff33b

You just need to implement the code that creates or shows the shelf.json to use that param that could be IPAD or IPHONE