Implemented feedback and moved JS to a file.
See https://fc.oscp.info/display/beanow/245480
This commit is contained in:
parent
a54e512669
commit
6becf45e73
5 changed files with 19 additions and 9 deletions
15
assets/js/main.js
Normal file
15
assets/js/main.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
jQuery(function($){
|
||||
|
||||
//Mobile menu, hamburger button.
|
||||
$('body').on('click', '.hamburger', function(e){
|
||||
e.preventDefault();
|
||||
$('nav#links').toggleClass('open');
|
||||
});
|
||||
|
||||
//Forces the reset to empty the search field, not reset it to the PHP given value.
|
||||
$('.search-wrapper').on('click', '.reset', function(e){
|
||||
e.preventDefault();
|
||||
$(e.target).closest('.search-wrapper').find('.search-field').val('');
|
||||
});
|
||||
|
||||
});
|
|
@ -133,6 +133,7 @@ nav#links a{
|
|||
}
|
||||
|
||||
nav#links a,
|
||||
.sub-menu-outer a,
|
||||
.profiles a{
|
||||
text-decoration:none;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,3 @@
|
|||
<a href="/help">Help</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('.hamburger').on('click', function(e){
|
||||
e.preventDefault();
|
||||
jQuery('nav#links').toggleClass('open');
|
||||
})
|
||||
</script>
|
|
@ -1,6 +1,6 @@
|
|||
<form action="/search" method="get" class="search-form">
|
||||
<div class="search-wrapper">
|
||||
<input class="search-field" type="text" name="query" placeholder="<?php echo $query ? $query : 'Search your friends'; ?>" tabindex="1" autofocus />
|
||||
<input class="search-field" type="text" name="query" placeholder="Search your friends" tabindex="1" value="<?php echo $query; ?>" />
|
||||
<input class="reset" type="reset" value="" tabindex="3" />
|
||||
<input class="search" type="submit" value="Search" tabindex="2" />
|
||||
</div>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<link href="/assets/style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<?php if(isset($topBar)) echo $topBar; ?>
|
||||
|
|
Loading…
Reference in a new issue