Socket
Book a DemoInstallSign in
Socket

foundation-navigation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foundation-navigation

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Foundation Navigation

Gem Version Build Status Dependency Status Code Climate

Installation

Add this line to your application's Gemfile:

gem 'foundation-navigation'

And then execute:

$ bundle

Or install it yourself as:

$ gem install foundation-navigation

Usage

Topbar

See http://foundation.zurb.com/docs/components/top-bar.html

Example

This Haml snippet

= topbar(title: 'Expo') do
  - left do
    - dropdown 'Community', 'http://www.zurb.com/expo/community'  do
      - menu_item 'Forrst', 'http://www.forrst.com'
      - menu_item 'Soapbox', 'http://www.zurb.com/soapbox'
  - right do
    - menu_item 'Courses', '#'
    - dropdown 'Library' do
      - menu_item 'Pattern Tap', 'http://patterntap.com'
      - menu_item 'Word', 'http://www.zurb.com/word'
      - menu_item 'Responsive', 'http://www.zurb.com/responsive'

generates the following top-bar

Sample Top Bar

Methods

topbar

= topbar

or with specific options

= topbar title: 'Example', title_link: 'http://www.example.com', sticky: true

Options:

  • title: Page Title (Default: empty)
  • title_link: Link on Title (Default: #)
  • contain_to_grid: Wraps top-bar in contain-to-grid div (Default: false)
  • fixed: Wraps top-bar in fixed div (Default: false)
  • sticky: Wraps top-bar in sticky div (Default: false)

menu_group/left/right

Helpers to nest menu-item groups and arrange them within the topbar.

= topbar do
  - menu_group do             # <ul>...</ul>
  # or
  - left do                   # <ul class='left'>...</ul>
    ...
  - right do                  # <ul class='right'>...</ul>
    ...

divider

Adds a divider element

= topbar do
  - menu_group do             # <ul>...</ul>
    - divider                 # <li class="divider"></li>
    ...
    - divider                 # <li class="divider"></li>

dropdown

Groups nested elements and renders them as dropdown box

= topbar do
  - left do
    - dropdown 'caption' do
      ...

generates the following markup

...
<ul>
  <li class="has-dropdown not-click">
    <a href="#">caption</a>
  </li>
</ul>
<ul class="dropdown">
  ...
</ul>

Options:

  • Dropdown caption
  • Dropdown link (on the caption, default: '#')

menu_item

Renders a single link and can be nested in a menu_group or a dropdown.

= topbar do
  ...
    - menu_item 'Title', '/link'  # <a href='/link'>Title</a>

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 10 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.