Coder Social home page Coder Social logo

chrisrowtcliff / ionic-epubjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from askilondz/ionic-epubjs

0.0 1.0 0.0 13.4 MB

Ionic app using Epub.js

Home Page: https://janpio.github.io/ionic-epubjs/

TypeScript 0.52% HTML 98.67% CSS 0.78% JavaScript 0.03%

ionic-epubjs's Introduction

ionic-epubjs

Sample project of how to use Epub.js in an Ionic app.

How Epub.js is integrated

As just natively importing Epub.js after installing it via npm unfortunately doesn't work, I copied over the build directory of the npm package of epubjs from /node_modules/epubjs to /src/assets/epubjs and included epubjs.min.js in index.html. That way the ePub object is globally available and can be used in Typescript after declaring it with declare var ePub: any;.

Functionality

  • Open books
    • Load and render locally available books from /assets/books
    • Switch between different books
  • Reading UI
    • Tap through pages by using "next" and "previous" buttons
    • Swipe pages to go to next or previous page
    • Tap the page to toggle a reading mode with no UI
    • Display page number the reader is currently on
    • Display total number of pages in book
    • Display chapter title the reader is currently in
  • Table of Contents
    • Show the table of contents of a book
    • Tap chapter to go there
  • Settings
    • Change font size
    • Change background color (and with it text color)
    • UI automatically adapts the toolbar color depending on the chosen background and text color
    • Change font family

Development

  1. Clone the repo
  2. Run npm install
  3. Run ionic cordova prepare
  4. Run ionic serve or ionic cordova run android|ios

Information + Resources

Related projects

  • There is a Ionic v1 based "Ionic Reader" that also uses Epub.js. It claims to "fix iOS flickering" and also has additional features "Last location, Go to location, Bookmarks, Highlights"

ionic-epubjs's People

Contributors

janpio avatar askilondz avatar

Watchers

Chris Rowtcliff avatar

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.