Menus

Nova includes a new and robust way of skinning the entire system without ever touching the core of the application. If you have questions about how to build a theme for Nova, how to modify a theme or you just want to show off your work, this is the place to do it!

darklight Sat Sep 27, 2014 11:26 pm

Menus

How would one give the Main, Personnel, Sim.. so on and Main, News, Contact, Credits... so on links/buttons individual backgrounds? Without affecting each other?

I appreciate that could be complicated.
User avatar

Posts: 9


AgentPhoenix Sun Sep 28, 2014 10:47 am

Re: Menus

You'd probably need to use Javascript and actually search for specific text within the anchor tags and take action from there.
User avatar

Posts: 7577


darklight Mon Sep 29, 2014 12:26 am

Re: Menus

How do I do that?
User avatar

Posts: 9


AgentPhoenix Mon Sep 29, 2014 7:16 am

Re: Menus

The easiest way is probably a 2-step process...

You'd need to build the Javascript with all your menu rules, like so:

Code: Select all
<script>
    $(document).ready(function()
    {
        $(".nav-main ul li a").find("Home").addClass("main-index");
    });
</script>

Then in your stylesheet, you'd do all your styles:

Code: Select all
.menu-main-nav {
    background: transparent url(../images/menu/some-image.jpg) no-repeat top left;
}

You'd repeat that for all of your menu items. You could do the CSS in your Javascript with a call to the css method, but that wouldn't be as clean.

The best way to do that is probably to put all your Javascript into its own file and put it at the root of the Nova site. If you do it that way, adding the functionality into another skin is a matter of pulling in the .js file and adding your CSS rules to the skin.
User avatar

Posts: 7577



Return to Skinning

Who is online

Users browsing this forum: No registered users and 3 guests

cron