{"id":20829775,"url":"https://github.com/pdf/simple-navigation-bootstrap","last_synced_at":"2025-03-17T12:10:37.115Z","repository":{"id":2749188,"uuid":"3745589","full_name":"pdf/simple-navigation-bootstrap","owner":"pdf","description":"MAINTAINER WANTED: simple-navigation-bootstrap is a simple-navigation renderer for twitter-bootstrap navigation and dropdowns.","archived":false,"fork":false,"pushed_at":"2021-10-10T19:02:06.000Z","size":23,"stargazers_count":50,"open_issues_count":5,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-05T03:12:48.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-17T04:56:55.000Z","updated_at":"2023-11-10T08:15:48.000Z","dependencies_parsed_at":"2022-08-18T18:11:46.842Z","dependency_job_id":null,"html_url":"https://github.com/pdf/simple-navigation-bootstrap","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fsimple-navigation-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fsimple-navigation-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fsimple-navigation-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fsimple-navigation-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdf","download_url":"https://codeload.github.com/pdf/simple-navigation-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031033,"owners_count":20386534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T23:21:59.196Z","updated_at":"2025-03-17T12:10:37.081Z","avatar_url":"https://github.com/pdf.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Navigation for Bootstrap\nThis gem adds a renderer for [Simple Navigation](http://github.com/andi/simple-navigation) to output markup compatible \nwith [Twitter Bootstrap](http://twitter.github.com/bootstrap/).\n\n_MAINTAINER WANTED_: Whilst this likely works as is, I don't do much Rails work these days, so I'd be happy to hand this over to someone if they'd like to take over maintenance\n\n## Getting Started\nFor Rails \u003e= 3, simply add this gem to your `Gemfile`:\n```ruby\ngem 'simple-navigation-bootstrap'\n```\nand run\n```\nbundle install\n```\nFollow the [configuration instructions](https://github.com/andi/simple-navigation/wiki/Configuration) on the Simple Navigation wiki for initial configuration.\n\nTo use the Bootstrap renderer, specify it in your view:\n```ruby\nrender_navigation :expand_all =\u003e true, :renderer =\u003e :bootstrap\n```\n\nAnd the minimal navigation config you need is:\n```ruby\nSimpleNavigation::Configuration.run do |navigation|  \n  navigation.items do |primary|\n    primary.dom_class = 'nav'\n  end\nend\n```\n\nSee below for a more complete example.\n\n## Additional Functionality\n### Icons\nIn addition to generating Bootstrap-comptible list markup, you may specify \nan `:icon` attribute on your navigation items, either as an array \nor string, containing Bootstrap [icon classes](http://twitter.github.com/bootstrap/base-css.html#icons), to add an icon to the item.\n\n### Split navigation\nFor items with sub-navigation, you may specify `:split =\u003e true` on an item to\nenable a split dropdown.  Split dropdowns allow using an url on the primary\nnavigation item, as well as having a dropdown containing sub-navigation.  If\nyou plan on using this feature, in your `application.css` or equivalent you\nmust require the `bootstrap_navbar_split_dropdowns` stylesheet after\nrequiring Bootstrap.\n\nFor example:\n```css\n/*\n*= require bootstrap_and_overrides\n*= require bootstrap_navbar_split_dropdowns\n*/\n```\n\nYou may also enable split navigation for all children by setting the `split`\nattribute of the container to `true` (defaults to `false`).\n\n### Dropdowns\nIf you wish to disable dropdown attributes for some reason (eg -you don't use the\nJavaScript, or have custom handling), you may specify `:dropdown =\u003e false` on an\nitem, or set the `dropdown` attribute on the container to `false` (defaults to\n`true`).\n\n## Examples\nTo create a navigation menu, you might do something like this:\n```ruby\nSimpleNavigation::Configuration.run do |navigation|  \n  navigation.items do |primary|\n    primary.item :music, 'Music', musics_path\n    primary.item :dvds, 'Dvds', dvds_path, :split =\u003e true do |dvds|\n      dvds.item :action, 'Action', dvds_action_path\n      dvds.item :drama, 'Drama', dvds_drama_path\n    end\n    primary.item :books, 'Books', :icon =\u003e ['icon-book', 'icon-white'] do |books|\n      books.item :fiction, 'Fiction', books_fiction_path\n      books.item :history, 'History', books_history_path\n    end\n    primary.dom_class = 'nav'\n    primary.dropdown = true\n    primary.split = false\n  end\nend\n```\n\n## Caveats\nRequires Bootstrap version \u003e= 2.1.0\n\n## Further Reading\n* [Twitter Bootstrap Documentation](http://twitter.github.com/bootstrap/)\n* [Simple Navigation Wiki](https://github.com/andi/simple-navigation/wiki/)\n\n## TODO\nSo far, only nav markup and dropdowns are supported, may also implement \nbuttons and nav lists in the future. And tests, there are currently no\ntests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdf%2Fsimple-navigation-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdf%2Fsimple-navigation-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdf%2Fsimple-navigation-bootstrap/lists"}