Skip to content

Commit

Permalink
center layout
Browse files Browse the repository at this point in the history
  • Loading branch information
barthezslavik committed Dec 23, 2012
1 parent 058391e commit f3e2753
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.haml
Expand Up @@ -6,4 +6,5 @@
= javascript_include_tag "application" = javascript_include_tag "application"
= csrf_meta_tags = csrf_meta_tags
%body %body
= yield .center
= yield
25 changes: 12 additions & 13 deletions app/views/samples/index.html.haml
@@ -1,14 +1,13 @@
.center - @samples.each do |sample|
- @samples.each do |sample| .block
.block = link_to sample.name, sample, data:{ push: true }
= link_to sample.name, sample, data:{ push: true } %br
%br %br
%br - screenshot = image_tag sample.screenshot.url(:medium) if sample.screenshot
- screenshot = image_tag sample.screenshot.url(:medium) if sample.screenshot = link_to screenshot, sample
= link_to screenshot, sample /= link_to 'Edit', edit_sample_path(sample)
/= link_to 'Edit', edit_sample_path(sample) /= link_to 'Destroy', sample, :confirm => 'Are you sure?', :method => :delete
/= link_to 'Destroy', sample, :confirm => 'Are you sure?', :method => :delete
%br.both %br.both
%br %br
= link_to 'Добавить', new_sample_path, :class => "link" = link_to 'Добавить', new_sample_path, :class => "link"
41 changes: 20 additions & 21 deletions app/views/samples/show.html.haml
@@ -1,28 +1,27 @@
.center = link_to "Главная", "/", :class => "link"
= link_to "Главная", "/", :class => "link" %br
%br %br
%br .wide_block
.wide_block /%p#notice= notice
/%p#notice= notice
.left
%h2= @sample.name
.right
%br
= link_to 'Edit', edit_sample_path(@sample), :class => "link"
.left
%h2= @sample.name
.right
%br %br
%br.both = link_to 'Edit', edit_sample_path(@sample), :class => "link"


%pre= @sample.description %br
- if @sample.screenshot_file_name? %br.both
=link_to image_tag(@sample.screenshot.url :large), @sample.screenshot.url


%br %pre= @sample.description
%br - if @sample.screenshot_file_name?
=link_to image_tag(@sample.screenshot.url :large), @sample.screenshot.url

%br
%br


-if @sample.demo? -if @sample.demo?
=link_to "Demo", "/#{@sample.demo}", :class => "link" =link_to "Demo", "/#{@sample.demo}", :class => "link"




/= link_to 'Back', samples_path /= link_to 'Back', samples_path

0 comments on commit f3e2753

Please sign in to comment.