Responsively embed DocumentCloud pages.
JavaScript CSS Ruby HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config Update to use npm. Let's see if this works Jul 3, 2018
dist Replace Gotham with standard font stack Feb 28, 2017
examples
src Update to use npm. Let's see if this works Jul 3, 2018
.bowerrc
.gitignore Update to use npm. Let's see if this works Jul 3, 2018
CHANGELOG Update changelog and version number Nov 20, 2015
Gemfile Add readline gem in dev to satisfy Guard Dec 19, 2016
Gemfile.lock Update Gemfile.lock Feb 28, 2017
Guardfile
LICENSE Add MIT license Nov 12, 2015
README.md Add MIT license Nov 12, 2015
WILLCHANGELOG.md Update WILLCHANGELOG Mar 5, 2016
bower.json Update Backbone to 1.3.3 Oct 3, 2016
index.html Restructure directories Oct 29, 2015
package.json Update underscore to latest version Jul 5, 2018

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.