Localfocus integration for Pageflow
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/assets
bin
config/locales
lib/pageflow
spec
vendor/assets/javascripts
.gitignore
.rspec
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
pageflow-localfocus.gemspec

README.md

📊 LocalFocus integration for Pageflow

LocalFocus lets you create and share animated illustrations for a wide range of datasets. Example

What you are reading now is a custom integration with Open Source storytelling tool Pageflow. And it's brought to you by ☢Scrollytelling☣: two Amsterdammers in pyjama with their unstoppable storytelling tank. You're welcome!

Includes LocalFocus API

The official LocalFocus JavaScript Widget SDK is bundled with this plugin.

Version: 1.1
Date: 09-01-2017

We use it to show a spinner while the chart is loading in the background. When everything is ready, the chart appears in place. Smooth operator!

Installation

(Assuming you know your way around a Rails application and a Unix terminal.)

Add this line to your application's Gemfile:

gem 'pageflow-localfocus'

And then execute:

$ bundle

Register the plugin:

# config/initializers/pageflow.rb
Pageflow.configure do |config|
  config.plugin(Pageflow::Localfocus.plugin)
end

Include javascripts and stylesheets:

/* app/assets/javascripts/components.js */
//= require "pageflow/localfocus/components"

/* app/assets/javascripts/pageflow/application.js */
//= require "pageflow/localfocus"

/* app/assets/javascripts/pageflow/editor.js */
//= require pageflow/localfocus/editor
# app/assets/stylesheets/pageflow/application.scss
@import "pageflow/localfocus";

Review our own pull request so see it all in one place.

Now you can enable the feature for those accounts that can have it, and enable page type in the feature settings.

Usage

  1. Login as an editor and open any story in the editor
  2. Add a new page and choose type LocalFocus
  3. In the Widget tab, enter the graph's Direct Link

The graph should appear right away. Happy graphing!

Want to help developing this plugin?

That's cool and help is always needed!

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/scrollytelling/pageflow-localfocus.