From a1b07d84e11f867d7581315a6fe6ffcfa41fb676 Mon Sep 17 00:00:00 2001 From: Ritchie Wilson Date: Mon, 28 Mar 2011 16:04:29 -0400 Subject: [PATCH] Next and Previous arrows for mobile photos --- app/views/photos/show.mobile.haml | 9 +++++++++ public/stylesheets/sass/mobile.sass | 16 ++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) mode change 100644 => 100755 app/views/photos/show.mobile.haml mode change 100644 => 100755 public/stylesheets/sass/mobile.sass diff --git a/app/views/photos/show.mobile.haml b/app/views/photos/show.mobile.haml old mode 100644 new mode 100755 index c373911c9..4aebfea69 --- a/app/views/photos/show.mobile.haml +++ b/app/views/photos/show.mobile.haml @@ -6,3 +6,12 @@ #show_content.photo = image_tag @photo.url(:scaled_full) + -if @additional_photos && @additional_photos.length > 1 + #photo_controls + %table + %tr + %td + =link_to "←", @prev_photo, :rel => 'prefetch', :class => 'arrow' + %td{:width => '100%'} + %td + =link_to "→", @next_photo, :rel => 'prefetch', :class => 'arrow' diff --git a/public/stylesheets/sass/mobile.sass b/public/stylesheets/sass/mobile.sass old mode 100644 new mode 100755 index 06e94078a..fd133abbf --- a/public/stylesheets/sass/mobile.sass +++ b/public/stylesheets/sass/mobile.sass @@ -7,7 +7,7 @@ $blue: #3F8FBA -a:not([role='button']) +a:not([role='button']):not(.arrow) :text :decoration none :font @@ -170,6 +170,19 @@ a :background :color #000 +#photo_controls + :margin + :bottom -42px + +.arrow + :color white !important + :font + :size 26pt + :text + :shadow 0 1px 2px #333 + :decoration none + :padding 0 + ul :margin 0 :padding 0 @@ -340,4 +353,3 @@ ul :background :color #333 :color #ccc -