Page type showing before/after image sliders.
Add this line to your application's Gemfile:
# Gemfile
gem 'pageflow-before-after'
Register the page type:
# config/initializers/pageflow.rb
Pageflow.configure do |config|
config.page_types.register(Pageflow::BeforeAfter.page_type)
end
Include javascripts and stylesheets:
# app/assets/javascripts/pageflow/application.js
//= require "pageflow/before_after"
# app/assets/javascripts/pageflow/editor.js
//= require pageflow/before_after/editor
# app/assets/stylesheets/pageflow/application.scss
@import "pageflow/before_after";
# app/assets/stylesheets/pageflow/themes/default.scss
@import "pageflow/before_after/themes/default";
Execute bundle install
Restart the application server.
If you run into problems while installing the page type, please also refer to the Troubleshooting wiki page in the Pageflow repository. If that doesn't help, consider filing an issue.
Edit the translations directly on the pageflow-before-after locale project.