Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-navigation-materialize

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-navigation-materialize

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Simple Navigation for Bootstrap

This gem adds a renderer for Simple Navigation to output markup compatible with materialize.

Getting Started

For Rails >= 3, simply add this gem to your Gemfile:

gem 'simple-navigation-materialize'

and run

bundle install

Follow the configuration instructions on the Simple Navigation wiki for initial configuration.

To use the Materialize renderer, specify it in your view:

render_navigation :renderer => :materialize

See below for a more complete example.

Additional Functionality

Icons

In addition you may specify an :icon attribute on your navigation items, either as an array or string, containing materialize icon names, to add an icon to the item.

Dropdowns

If you wish to use dropdowns in your navbar, don't forget to set expand_all: true on your render_navigation.

Examples

To create a navigation menu, you might do something like this:

SimpleNavigation::Configuration.run do |navigation|  
  navigation.items do |primary|
    primary.item :music, 'Music', musics_path
    primary.item :dvds, 'Dvds', dvds_path, :split => true do |dvds|
      dvds.item :action, 'Action', dvds_action_path
      dvds.item :drama, 'Drama', dvds_drama_path
    end
    primary.item :books, 'Books', :icon => 'book' do |books|
      books.item :fiction, 'Fiction', books_fiction_path
      books.item :history, 'History', books_history_path
    end
  end
end

Further Reading

Contributions

FAQs

Package last updated on 28 Jan 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc