Skip to content

Layouts

cgebken edited this page Nov 6, 2020 · 6 revisions

Beyond Canvas comes with different layouts you can use for your app.

These are all available layouts, use cases for the respective layout, and an example view:

Layout Description Use cases Example
public
  • If site_logo is set in the initializer file, the logo is displayed on the top of the card
  • width: 94%; max-width: 531px;
  • Views where the user is not logged in
Example view

Note: Currently, only the public layout is available but the list will be extended in the future.

You can set the layout you'd like to use in the controller itself by adding layout beyond_canvas/<your-preferred-layout>.

Example:

class ApplicationController < ActionController::Base
  layout 'beyond_canvas/public'
end

By default, the beyond_canvas/public layout is set for the ApplicationController. Thus, all controllers inheriting from ApplicationController will use the same layout.