When I output the main menu this is the html that gets generated:
<ul id="main-menu" class="links inline clearfix">
<li class="menu-218 first active"><a href="/drupal/" class="active">Home</a></li>
<li class="menu-294"><a href="/drupal/node/2">Page</a></li>
<li class="menu-293 last"><a href="/drupal/node/1">page</a></li>
</ul>
However I'd like to completely restructure the menu like this:
<nav id="main-nav" class="animate">
<div class="grid__wrapper">
<div class="grid t--np nrp">
<a class="button animate" href="#" title="Sign up">SIGN UP</a>
<a class="button animate" href="#" title="Login">LOGIN</a>
<a class="main-nav__button animate grid__item xl--1-5 l--1-5 sp s--tbp t--tbp" href="<?php echo $front_page; ?>">HOME</a>
<a class="main-nav__button animate grid__item xl--1-5 l--1-5 sp s--tbp t--tbp" href="#">LINK 1</a>
<a class="main-nav__button animate grid__item xl--1-5 l--1-5 sp s--tbp t--tbp" href="#">LINK 2</a>
<a class="main-nav__button animate grid__item xl--1-5 l--1-5 sp s--tbp t--tbp" href="#">LINK 3</a>
<a class="main-nav__button animate grid__item xl--1-5 l--1-5 sp s--tbp t--tbp" href="#">LINK 4</a>
</div>
</div>
</nav>
How can I change the html output of the menu as well as the links inside?
Ideally I'd like to output any menus as a element and be able to pass classes and an id to each one, the same also goes for the links inside.
Also the first two links in the menu are login and signup buttons which only display at certain screen sizes and have completely different classes to the rest of the menu links. Is this also possible to do?
I have tried altering the theme_menu_tree and theme_menu_link functions but am having no luck as I am somewhat of a beginner in PHP and Drupal.