Add fancy keybinds for navigating the pages click free.
This commit is contained in:
parent
b2287b8c10
commit
b0b201467f
3 changed files with 45 additions and 5 deletions
|
@ -6,6 +6,8 @@
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="/css/html5reset-1.6.1.css" />
|
<link rel="stylesheet" type="text/css" media="all" href="/css/html5reset-1.6.1.css" />
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="/css/style.css" />
|
<link rel="stylesheet" type="text/css" media="all" href="/css/style.css" />
|
||||||
|
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
@ -15,16 +17,34 @@
|
||||||
<header>
|
<header>
|
||||||
<div id="title"><h1><a href="http://www.nca-guild.com">No Chicks Allowed</a></h1></div>
|
<div id="title"><h1><a href="http://www.nca-guild.com">No Chicks Allowed</a></h1></div>
|
||||||
<div id="links">
|
<div id="links">
|
||||||
<a href="/upload">Upload</a> |
|
<a href="/upload" id="upload"><span class="underline">U</span>pload</a> |
|
||||||
<a href="/gallery">Gallery</a> |
|
<a href="/gallery" id="gallery"><span class="underline">G</span>allery</a> |
|
||||||
<a href="/latest">Latest</a> |
|
<a href="/latest" id="latest"><span class="underline">L</span>atest</a> |
|
||||||
<a href="/random">Random</a>
|
<a href="/random" id="random"><span class="underline">R</span>andom</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<?php echo $contents; ?>
|
<?php echo $contents; ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).keydown(function(e) {
|
||||||
|
var key = e.keyCode || e.which;
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
|
switch(key) {
|
||||||
|
case 82:
|
||||||
|
document.location.href = $('#random').attr('href');
|
||||||
|
break;
|
||||||
|
case 71:
|
||||||
|
document.location.href = $('#gallery').attr('href');
|
||||||
|
break;
|
||||||
|
case 76:
|
||||||
|
document.location.href = $('#latest').attr('href');
|
||||||
|
break;
|
||||||
|
case 85:
|
||||||
|
document.location.href = $('#upload').attr('href');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<script src="js/jquery.filedrop.js"></script>
|
<script src="js/jquery.filedrop.js"></script>
|
||||||
<script src="js/upload.js"></script>
|
<script src="js/upload.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,9 +1,25 @@
|
||||||
<?php if($prev != 0) { ?>
|
<?php if($prev != 0) { ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).keydown(function(e) {
|
||||||
|
var key = e.keyCode || e.which;
|
||||||
|
if(key == 37) {
|
||||||
|
document.location.href = $('#left>a').attr('href');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<div id="left">
|
<div id="left">
|
||||||
<a href="<?php echo base_url($prev); ?>" class="navigation"></a>
|
<a href="<?php echo base_url($prev); ?>" class="navigation"></a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if($next != 0) { ?>
|
<?php if($next != 0) { ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).keydown(function(e) {
|
||||||
|
var key = e.keyCode || e.which;
|
||||||
|
if(key == 39) {
|
||||||
|
document.location.href = $('#right>a').attr('href');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<div id="right">
|
<div id="right">
|
||||||
<a href="<?php echo base_url($next); ?>" class="navigation"></a>
|
<a href="<?php echo base_url($next); ?>" class="navigation"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -352,4 +352,8 @@ h1{
|
||||||
|
|
||||||
#links a {
|
#links a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.underline {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
Loading…
Reference in a new issue