📊 LocalFocus integration for Pageflow
What you are reading now
is a custom integration with Open Source storytelling tool Pageflow. And it's brought to you by ☢Scrollytelling☣:
Includes LocalFocus API
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!
(Assuming you know your way around a Rails application and a Unix terminal.)
Add this line to your application's Gemfile:
And then execute:
Register the plugin:
# config/initializers/pageflow.rb Pageflow.configure do |config| config.plugin(Pageflow::Localfocus.plugin) end
# 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.
- Login as an editor and open any story in the editor
- Add a new page and choose type LocalFocus
- 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.
Bug reports and pull requests are welcome on GitHub at https://github.com/scrollytelling/pageflow-localfocus.