Git Product home page Git Product logo

kanso-topbar's Introduction

Kanso Top-Bar

This package provides resources for the standard navigation and session management bar used in manage core Kanso apps. Using a standard topbar means your users will be instantly familiar with how to login and navigate back to their dashboard.

Resources

Attachments

  • kanso-topbar/topbar.css
  • kanso-topbar/dashboard_icon.png

Modules

  • kanso-topbar

Usage

Add 'kanso-topbar' to your kanso.json file.

{
    ...
    "dependencies": {
        "kanso-topbar": null
    }
}

Install the new package with kanso install. Then, if you are using rewrites, make sure you have a rewrite set up for the attachments provided by this module:

// rewrites.js
modules.exports = {
    ...
    {from: '/kanso-topbar/*', to: 'kanso-topbar/*'}
};

Add the kanso-topbar stylesheet to your HTML:

<link rel="stylesheet" type="text/css" href="kanso-topbar/topbar.css" />

You also need to add an element with the id 'kanso-topbar', which will be populated with the topbar elements. Here, you should also add the name of your application and optionally any app-specific navigation to show in the topbar:

<div id="kanso-topbar">
    <div class="appname">My App</div>
    <ul>
        <li><a href="#">First nav item</a></li>
        <li><a href="#">Second nav item</a></li>
    </ul>
</div>

Finally, make sure you call the kanso-topbar init function using jQuery document ready, or by adding a script tag at the bottom of the page. This should go after you've included modules.js:

require('kanso-topbar').init();

If you're using the Duality framework, you may wish to add this to an init event handler instead.

Add menu items

You can add menu items to the top bar by adding a <ul>

kanso-topbar's People

Stargazers

Brian Winfrey avatar

Watchers

Brian Winfrey avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.