Next and Previous arrows for mobile photos
This commit is contained in:
parent
a0d3921d72
commit
a1b07d84e1
2 changed files with 23 additions and 2 deletions
9
app/views/photos/show.mobile.haml
Normal file → Executable file
9
app/views/photos/show.mobile.haml
Normal file → Executable file
|
|
@ -6,3 +6,12 @@
|
||||||
#show_content.photo
|
#show_content.photo
|
||||||
= image_tag @photo.url(:scaled_full)
|
= 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
16
public/stylesheets/sass/mobile.sass
Normal file → Executable file
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
$blue: #3F8FBA
|
$blue: #3F8FBA
|
||||||
|
|
||||||
a:not([role='button'])
|
a:not([role='button']):not(.arrow)
|
||||||
:text
|
:text
|
||||||
:decoration none
|
:decoration none
|
||||||
:font
|
:font
|
||||||
|
|
@ -170,6 +170,19 @@ a
|
||||||
:background
|
:background
|
||||||
:color #000
|
: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
|
ul
|
||||||
:margin 0
|
:margin 0
|
||||||
:padding 0
|
:padding 0
|
||||||
|
|
@ -340,4 +353,3 @@ ul
|
||||||
:background
|
:background
|
||||||
:color #333
|
:color #333
|
||||||
:color #ccc
|
:color #ccc
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue