Next and Previous arrows for mobile photos

This commit is contained in:
Ritchie Wilson 2011-03-28 16:04:29 -04:00
parent a0d3921d72
commit a1b07d84e1
2 changed files with 23 additions and 2 deletions

9
app/views/photos/show.mobile.haml Normal file → Executable file
View file

@ -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'

16
public/stylesheets/sass/mobile.sass Normal file → Executable file
View file

@ -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