Skip to content

Commit 45c605c

Browse files
committed
Add swipe instructions
1 parent a74f3c8 commit 45c605c

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

images/swipe.png

4.5 KB
Loading

javascripts/application.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var isMobile = false;
22

3-
if(window.matchMedia && window.matchMedia("(max-device-width: 480px)")){
3+
if(window.matchMedia && window.matchMedia("(max-device-width: 480px)").matches){
44
isMobile = true;
55
}
66

@@ -364,7 +364,13 @@ if($('.lt-ie7, .lt-ie8, .lt-ie9').length == 0){
364364
} else {
365365
new Menu($('#wrapper'), 'html,body');
366366
}
367-
new MobileMenu(document.documentElement)
367+
if(isMobile){
368+
new MobileMenu(document.documentElement)
369+
var header = $('#logo-and-download').clone();
370+
header.find('a').remove();
371+
header.append("<img src='/images/swipe.png' id='swipe' />")
372+
$('#content-wrapper').prepend(header)
373+
}
368374
$('a[href$=#dom_helpers], a[href$=#events]').prepend('<span class="special">&#x2605;</span>');
369375

370376
// google analytics

stylesheets/styles.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,4 +404,12 @@ html.lt-ie7 .github-fork img {
404404
.github-fork {
405405
display: none;
406406
}
407+
#content-wrapper #logo-and-download {
408+
background-image: url(../images/menu_bg.png);
409+
background-repeat: repeat-x;
410+
}
411+
#content-wrapper #swipe {
412+
right: 15px;
413+
left: auto;
414+
}
407415
}

0 commit comments

Comments
 (0)