Responsively embed DocumentCloud pages
JavaScript CSS Ruby HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config Fold logger.js into toolbelt.js, improve comments Mar 5, 2016
dist
examples
src
.bowerrc
.gitignore
CHANGELOG
Gemfile
Gemfile.lock
Guardfile
LICENSE
README.md
WILLCHANGELOG.md
bower.json Update Backbone to 1.3.3 Oct 3, 2016
index.html

README.md

DocumentCloud Page Embed

A responsive, embeddable JavaScript library which displays pages from documents on DocumentCloud (or any other API-compatible location). Follow the development on our example page.

Why?

  1. DocumentCloud's existing document-viewer doesn't play terribly well with mobile devices. It was originally written in 2006, and while it's done a terrific job, it's not well-suited for a mobile-first world.
  2. There are a number of use cases where it's useful to display only a single page from a document and where the rich metadata of the full document (such as DocumentCloud notes or document title/contributor information) would complement the single pages of supporting material.
  3. DocumentCloud plans to incrementally build a responsive viewer from smaller constituent components, and a full page with notes is the next step up from our smaller individual note embeds.

Browser Compatibility

  • Unenhanced markup (effectively, noscript) is compatible with everything unless being served on an HTTPS page, in which case it requires an SNI-compatible browser (aka anything besides IE on XP).
  • Enhanced markup is compatible with IE8+ on Vista+ and all the other usual suspects.

Participating

You should open an issue for suggestions or ideas you'd like to tell us about!

Installation/setup

  • Install Bower and Bundler
  • Install JavaScript dependencies with bower install
  • Install gem dependencies with bundle install

Development

We use Guard to watch and build the project, so on the daily you'll want to cd to the repo directory and run bundle exec guard. Outputs will be built to /dist/.

License

Copyright (c) 2015 DocumentCloud, Investigative Reporters & Editors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.