app/controllers/lookbook/app_controller.rb in lookbook-0.5.0.beta.2 vs app/controllers/lookbook/app_controller.rb in lookbook-0.5.0

- old
+ new

@@ -25,14 +25,12 @@ def show if @example begin set_params @examples = examples_data - @preview_srcdoc = if Lookbook.config.preview_srcdoc - render_examples(examples_data).gsub("\"", """) - end - @panels = panels.filter { |name, panel| panel[:show] } + @drawer_panels = drawer_panels.filter { |name, panel| panel[:show] } + @preview_panels = preview_panels.filter { |name, panel| panel[:show] } rescue *EXCEPTIONS render "error" end else render "not_found" @@ -117,23 +115,37 @@ end end @nav end - def panels + def preview_panels { - source: { - label: "Source", - template: "lookbook/panels/source", - hotkey: "s", + preview: { + label: "Preview", + template: "lookbook/panels/preview", + srcdoc: Lookbook.config.preview_srcdoc ? render_examples(examples_data).gsub("\"", """) : nil, + hotkey: "v", show: true, disabled: false, - copy: true + copy: false }, output: { - label: "Output", + label: "HTML", template: "lookbook/panels/output", hotkey: "o", + show: true, + disabled: false, + copy: true + } + } + end + + def drawer_panels + { + source: { + label: "Source", + template: "lookbook/panels/source", + hotkey: "s", show: true, disabled: false, copy: true }, notes: {