Sha256: dd4e1b73467ee37da24f36c607380ad4f19451e0c3bac209822a11f56d8b5466

Contents?: true

Size: 901 Bytes

Versions: 30

Compression:

Stored size: 901 Bytes

Contents

# frozen_string_literal: true

require_dependency "playbook/application_controller"
require "yaml"

module Playbook
  class PagesController < ApplicationController
    before_action :set_kit, only: %i[kit_show_rails kit_show_react]

    def home; end

    def utilities; end

    def tokens; end

    def kits
      params[:type] ||= "rails"
      @type = params[:type]
    end

    def principles; end

    def fullscreen
      render layout: "layouts/playbook/fullscreen"
    end

    def grid
      render layout: "layouts/playbook/grid"
    end

    def kit_show_rails
      render template: "playbook/pages/kit_show"
    end

    def kit_show_react
      render template: "playbook/pages/kit_show"
    end

  private

    def set_kit
      menu = MENU["kits"]
      if menu.include?(params[:name])
        @kit = params[:name]
      else
        redirect_to root_path
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
playbook_ui-4.1.2 app/controllers/playbook/pages_controller.rb
playbook_ui-4.1.1 app/controllers/playbook/pages_controller.rb
playbook_ui-4.1.0 app/controllers/playbook/pages_controller.rb
playbook_ui-4.0.1 app/controllers/playbook/pages_controller.rb
playbook_ui-4.0.0 app/controllers/playbook/pages_controller.rb
playbook_ui-3.5.0 app/controllers/playbook/pages_controller.rb
playbook_ui-3.4.0 app/controllers/playbook/pages_controller.rb
playbook_ui-3.3.0 app/controllers/playbook/pages_controller.rb
playbook_ui-3.2.0 app/controllers/playbook/pages_controller.rb
playbook_ui-3.1.0 app/controllers/playbook/pages_controller.rb
playbook_ui-3.0.1 app/controllers/playbook/pages_controller.rb
playbook_ui-3.0.0 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.9 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.8 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.7 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.6 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.5 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.4 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.3 app/controllers/playbook/pages_controller.rb
playbook_ui-2.9.2 app/controllers/playbook/pages_controller.rb