Giter VIP home page Giter VIP logo

quaint-nav's Introduction

quaint-nav

Macros to populate and dump navigation bars. This does not come with any styling, so it is mostly useful for use by other plugins like quaint-look-nice or quaint-bootstrap3.

Install

quaint --setup nav

Macros

nav

Use the nav name :: elements macro to register text and links to the navigation bar with the given name. If one of the entries contains a sub-list, it will appear as a dropdown.

nav main ::
  * Nav element
  * Link @@ somewhere.html
  * Dropdown
    * ABC
    * XYZ @@ xyz

By default, if no name is given, the elements will be added to the main nav.

If the body is equal to the directive dump!, the navbar will be inserted in the document:

nav main :: dump!

Options

nav-class-prefix

Default: "nav-"

This prefix is used on the class names of the generated nav tags. For instance, if the prefix is nav-, then dumping the main nav would produce a nav with class nav-main.

dropdown-class

Default: "dropdown"

Class given to the li elements that are dropdowns

dropdown-menu-class

Default: "dropdown-menu"

Class given to the ul dropdowns.

suppress-empty-nav

Default: false

If true, dumping a nav with no elements will not insert anything.

wrap-dropdown

This is a function that takes the label of a dropdown and returns a new label, but might e.g. add a caret after it.

Default: wraps the element with a div

wrap-element

Function that takes a navbar entry and returns a replacement if appropriate. This is used for instance by quaint-bootstrap3 to wrap text nodes with the navbar-text class.

Default: wraps plain text with div.

quaint-nav's People

Contributors

breuleux avatar

Watchers

 avatar  avatar  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.