GithubHelp home page GithubHelp logo

Comments (3)

fchasen avatar fchasen commented on May 13, 2024

I think the best way to do something like this is still to use css like the following.
http://tympanus.net/codrops/2012/12/11/fullscreen-pageflip-layout/

I would use a fixed position epub like:

var Book = ePub({ fixedLayout : true });

and write a hook to split the content up into divs and inject the pageflip css.

The main issues I see with going this route is that the pageNext() function would be broken, as the chapter would appear to a 1 page long.

Any thoughts on how to allow overriding this would be appreciated, but to just try it out you could create your own page turning function and just call book.nextPage() when your ready to switch chapters.

from epub.js.

lpccoder avatar lpccoder commented on May 13, 2024

I have made a test to check if BookBlock could be used in an epub online reader.
I create a new index4e.htm file at (https://github.com/lpccoder/BookBlock/blob/master/index4e.html) after forking the BookBlock project. Also modified the demo4.css file to demo4e.css to avoid centering the text (https://github.com/lpccoder/BookBlock/blob/master/css/demo4e.css)
As you can see in the code I'm trying to control pagination using the jquery scrollTop function. It's a beta (good pagination requires more coding)
Why you use iframe to paginate the epub chapters?
Maybe I'm trying to paginate using divs when with iframe will be the correct way.
Where can I find the code that handles the pagination in epub.js?

from epub.js.

fchasen avatar fchasen commented on May 13, 2024

Going to close this for now - still no ideal way split book content up into divs, would require writing a new renderer. Happy to see it reopened in the future.

from epub.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.