source/_navigation.html.erb in refills-0.0.2 vs source/_navigation.html.erb in refills-0.1.0
- old
+ new
@@ -1,59 +1,44 @@
-<header class="navigation">
- <div class="menu-wrapper">
+<header class="navigation" role="banner">
+ <div class="navigation-wrapper">
<a href="javascript:void(0)" class="logo">
- <img src="https://raw.github.com/Magnus-G/Random/master/placeholder_logo_1.png" alt="">
+ <img src="https://raw.githubusercontent.com/thoughtbot/refills/master/source/images/placeholder_logo_1.png" alt="Logo Image">
</a>
- <p class="navigation-menu-button" id="js-mobile-menu">MENU</p>
- <div class="nav">
- <ul id="navigation-menu">
+ <a href="javascript:void(0)" class="navigation-menu-button" id="js-mobile-menu">MENU</a>
+ <nav role="navigation">
+ <ul id="js-navigation-menu" class="navigation-menu show">
<li class="nav-link"><a href="javascript:void(0)">Products</a></li>
<li class="nav-link"><a href="javascript:void(0)">About Us</a></li>
<li class="nav-link"><a href="javascript:void(0)">Contact</a></li>
<li class="nav-link more"><a href="javascript:void(0)">More</a>
<ul class="submenu">
<li><a href="javascript:void(0)">Submenu Item</a></li>
<li><a href="javascript:void(0)">Another Item</a></li>
+ <li class="more"><a href="javascript:void(0)">Item with submenu</a>
+ <ul class="submenu">
+ <li><a href="javascript:void(0)">Sub-submenu Item</a></li>
+ <li><a href="javascript:void(0)">Another Item</a></li>
+ </ul>
+ </li>
+ <li class="more"><a href="javascript:void(0)">Another submenu</a>
+ <ul class="submenu">
+ <li><a href="javascript:void(0)">Sub-submenu</a></li>
+ <li><a href="javascript:void(0)">An Item</a></li>
+ </ul>
+ </li>
</ul>
</li>
-
</ul>
- </div>
+ </nav>
<div class="navigation-tools">
<div class="search-bar">
- <div class="search-and-submit">
+ <form role="search">
<input type="search" placeholder="Enter Search" />
<button type="submit">
- <img src="https://raw.githubusercontent.com/Magnus-G/Random/master/search-icon.png" alt="">
+ <img src="https://raw.githubusercontent.com/thoughtbot/refills/master/source/images/search-icon.png" alt="Search Icon">
</button>
- </div>
+ </form>
</div>
<a href="javascript:void(0)" class="sign-up">Sign Up</a>
</div>
</div>
</header>
-
-<script>
- $(function() {
- var menu = $('#navigation-menu');
- var menuToggle = $('#js-mobile-menu');
- var signUp = $('.sign-up');
-
- $(menuToggle).on('click', function(e) {
- e.preventDefault();
- menu.slideToggle(function(){
- if(menu.is(':hidden')) {
- menu.removeAttr('style');
- }
- });
- });
-
- // underline under the active nav item
- $(".nav .nav-link").click(function() {
- $(".nav .nav-link").each(function() {
- $(this).removeClass("active-nav-item");
- });
- $(this).addClass("active-nav-item");
- $(".nav .more").removeClass("active-nav-item");
- });
- });
-</script>