From f3e27537c3ca6aabd0584cb514b743d7c0e96529 Mon Sep 17 00:00:00 2001 From: Vyacheslav Loginov Date: Mon, 24 Dec 2012 00:37:59 +0200 Subject: [PATCH] center layout --- app/views/layouts/application.html.haml | 3 +- app/views/samples/index.html.haml | 25 ++++++++------- app/views/samples/show.html.haml | 41 ++++++++++++------------- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0bcd1c5..bf6247f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -6,4 +6,5 @@ = javascript_include_tag "application" = csrf_meta_tags %body - = yield + .center + = yield diff --git a/app/views/samples/index.html.haml b/app/views/samples/index.html.haml index df5c788..c1453a2 100644 --- a/app/views/samples/index.html.haml +++ b/app/views/samples/index.html.haml @@ -1,14 +1,13 @@ -.center - - @samples.each do |sample| - .block - = link_to sample.name, sample, data:{ push: true } - %br - %br - - screenshot = image_tag sample.screenshot.url(:medium) if sample.screenshot - = link_to screenshot, sample - /= link_to 'Edit', edit_sample_path(sample) - /= link_to 'Destroy', sample, :confirm => 'Are you sure?', :method => :delete +- @samples.each do |sample| + .block + = link_to sample.name, sample, data:{ push: true } + %br + %br + - screenshot = image_tag sample.screenshot.url(:medium) if sample.screenshot + = link_to screenshot, sample + /= link_to 'Edit', edit_sample_path(sample) + /= link_to 'Destroy', sample, :confirm => 'Are you sure?', :method => :delete - %br.both - %br - = link_to 'Добавить', new_sample_path, :class => "link" +%br.both +%br += link_to 'Добавить', new_sample_path, :class => "link" diff --git a/app/views/samples/show.html.haml b/app/views/samples/show.html.haml index 3a4fe43..3142b33 100644 --- a/app/views/samples/show.html.haml +++ b/app/views/samples/show.html.haml @@ -1,28 +1,27 @@ -.center - = link_to "Главная", "/", :class => "link" - %br - %br - .wide_block - /%p#notice= notice - - .left - %h2= @sample.name - .right - %br - = link_to 'Edit', edit_sample_path(@sample), :class => "link" += link_to "Главная", "/", :class => "link" +%br +%br +.wide_block + /%p#notice= notice + .left + %h2= @sample.name + .right %br - %br.both + = link_to 'Edit', edit_sample_path(@sample), :class => "link" - %pre= @sample.description - - if @sample.screenshot_file_name? - =link_to image_tag(@sample.screenshot.url :large), @sample.screenshot.url + %br + %br.both - %br - %br + %pre= @sample.description + - if @sample.screenshot_file_name? + =link_to image_tag(@sample.screenshot.url :large), @sample.screenshot.url + + %br + %br - -if @sample.demo? - =link_to "Demo", "/#{@sample.demo}", :class => "link" + -if @sample.demo? + =link_to "Demo", "/#{@sample.demo}", :class => "link" - /= link_to 'Back', samples_path + /= link_to 'Back', samples_path