Git Product home page Git Product logo

ibooks-social-widget's Introduction

iBooks Social Widget

This is a small HTML widget designed to make it easy to post to Twitter, Facebook, and Google+ from an iBook. It can be embedded in iBooks created with iBooks Author. The iBooks Social Widget is based on Trevor Burnham's iBooks HTML Widget Boilerplate

Why?

Because the Tweet button, Like button, and Google +1 button don't work in an iBook out of the box. An iBook HTML widget will not load external JavaScript or an iframe, so the methods for sharing things on Twitter, Facebook, and Google+ that work for web sites won't work for an iBook. The iBooks Social Widget approach is based on sharing bookmarklets that submit what will be shared to special Twitter, Facebook, or Google+ URLs.

The recommended approach for creating an HTML widget for iBooks Author is currently to create a Dashboard widget in Dashcode. This adds a lot of distracting cruft, and things that work fine in Dashcode have a tendency to stop working in iBooks. In short, it's better to treat an iBooks widget as a web page rather than as a Dashboard widget.

Usage

  1. Download or clone this repository.

  2. Update the TODOs in main.html to share the content you want on Twitter, Facebook, and Google+.

  3. (Optional) Change the look & feel of things in style.css.

  4. Rename the entire directory to end in .wdgt: ibooks-social-widget => ibooks-social-widget.wdgt

  5. Drag the .wdgt file into iBooks Author.

Preview image

Notice that when you drag the .wdgt into iBooks Author, you just get a small preview image. iBooks doesn't load anything from your HTML widget other than Default.png until the user taps it. To show a different image, replace Default.png

Widget dimensions

Open up Info.plist to set the appropriate width and height for your widget. When opened on the iPad, the widget will be scaled to fit the screen but will maintain the correct width/height proportion. Also note that 1px in your markup refers to 1px according to the Info.plist dimensions, not the actual pixels on the device screen.

License

http://trevorburnham.mit-license.org/ The included 3-clause BSD license (BSD_LICENSE.txt)

Contributors

Trevor Burnham Arthur Klepchukov

ibooks-social-widget's People

Contributors

avk avatar

Stargazers

Khurram Waqas Malik avatar

Watchers

James Cloos avatar Khurram Waqas Malik 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.