{"id":17101165,"url":"https://github.com/doabit/bootstrap-sass-extras","last_synced_at":"2025-04-06T04:11:22.972Z","repository":{"id":7623940,"uuid":"8983188","full_name":"doabit/bootstrap-sass-extras","owner":"doabit","description":"bootstrap-sass extras.","archived":false,"fork":false,"pushed_at":"2023-03-08T19:44:44.000Z","size":159,"stargazers_count":76,"open_issues_count":17,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T03:05:13.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/doabit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-24T08:20:30.000Z","updated_at":"2024-08-18T17:41:37.000Z","dependencies_parsed_at":"2025-01-13T08:07:35.072Z","dependency_job_id":"dc735b04-2bbf-4d9c-9168-7ef312e4789e","html_url":"https://github.com/doabit/bootstrap-sass-extras","commit_stats":{"total_commits":79,"total_committers":15,"mean_commits":5.266666666666667,"dds":0.6329113924050633,"last_synced_commit":"5db21def780a8d14b537ef8db0b3d34da881257a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doabit%2Fbootstrap-sass-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doabit%2Fbootstrap-sass-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doabit%2Fbootstrap-sass-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doabit%2Fbootstrap-sass-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doabit","download_url":"https://codeload.github.com/doabit/bootstrap-sass-extras/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430871,"owners_count":20937874,"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-10-14T15:24:06.957Z","updated_at":"2025-04-06T04:11:22.847Z","avatar_url":"https://github.com/doabit.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bootstrap::Sass::Extras\n\n[bootstrap-sass][1] extras, idea and codes from [twitter-bootstrap-rails][2]\n\n  [1]: https://github.com/thomas-mcdonald/bootstrap-sass\n  [2]: https://github.com/seyhunak/twitter-bootstrap-rails\n\n  [![Build Status](https://travis-ci.org/doabit/bootstrap-sass-extras.png?branch=master)](https://travis-ci.org/doabit/bootstrap-sass-extras)\n\n## Note\n\nFrom version 0.0.6, only support bootstrap 3. If you want to use bootstrap 2, please use version 0.0.5.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'bootstrap-sass-extras'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install bootstrap-sass-extras\n\n## Generating locale, layouts and views\n\nYou can run following generators to get started with Twitter Bootstrap quickly.\n\nGenerate locale\n\n\nUsage:\n\n```ruby\nrails g bootstrap:install\n```\n\nLayout (generates Twitter Bootstrap compatible layout) - (Haml and Slim supported)\n\n\nUsage:\n\n```ruby\nrails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]\n```\n\nExample of a fixed layout:\n\n```ruby\nrails g bootstrap:layout application fixed\n```\n\nExample of a responsive layout:\n\n```ruby\nrails g bootstrap:layout application fluid\n```\n\nThemed (generates Twitter Bootstrap compatible scaffold views.) - (Haml and Slim supported)\n\n\nUsage:\n\n```ruby\nrails g bootstrap:themed [RESOURCE_NAME]\n```\n\nExample:\n\n```ruby\nrails g scaffold Post title:string description:text\nrake db:migrate\nrails g bootstrap:themed Posts\n```\n\nNotice the plural usage of the resource to generate bootstrap:themed.\n\n## Using Helpers\n\n### Viewport Meta Helper\nAdd the viewport meta helper `\u003c%= viewport_meta_tag %\u003e` to your layout\n(built-in with layout generator) to render the required meta tag for Bootstrap:\n\n```html\n\u003cmeta content=\"width=device-width,initial-scale=1.0\" name=\"viewport\" /\u003e\n```\n\nYou can change the content value by passing a hash as an argument:\n\n```erb\n\u003c%= viewport_meta_tag(:maximum_scale =\u003e \"1.0\") %\u003e\n```\n\nRenders:\n\n```html\n\u003cmeta content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0\" name=\"viewport\" /\u003e\n```\n\n### Flash helper\nAdd flash helper `\u003c%= bootstrap_flash %\u003e` to your layout (built-in with layout generator)\n\n### Modal Helper\nYou can create modals easily using the following example. The header, body, and footer all accept content_tag or plain html.\nThe href of the button to launch the modal must match the id of the modal dialog.\n\n```erb\n\u003c%= modal_toggle 'Modal', dialog: '#modal'%\u003e\n\u003c%= modal_dialog :id =\u003e \"modal\",\n         :header =\u003e { :show_close =\u003e true, :title =\u003e 'Modal header' },\n         :body   =\u003e 'This is the body',\n         :footer =\u003e content_tag(:button, 'Save', :class =\u003e 'btn btn-primary')\n%\u003e\n```\n\n### Breadcrumbs Helpers\n\n*Notice* If your application is using [breadcrumbs-on-rails](https://github.com/weppos/breadcrumbs_on_rails) you will have a namespace collision with the add_breadcrumb method.\nYou do not need to use these breadcrumb gems since this gem provides the same functionality out of the box without the additional dependency.\n\n```ruby\nclass ApplicationController\n  add_breadcrumb :index, :root_path\nend\n```\n\n```ruby\nclass ExamplesController \u003c ApplicationController\n  add_breadcrumb :index, :examples_path\n\n  def index\n  end\n\n  def show\n    @example = Example.find params[:id]\n    add_breadcrumb @example.name, example_path(@example)\n    add_breadcrumb :show, example_path(@example)\n  end\nend\n```\n\nFinally, add the `\u003c%= render_breadcrumbs %\u003e` helper to your layout.\n\nYou can wrap the breadcrumbs in an HTML element by using the block form like this:\n\n```erb\n\u003c%= render_breadcrumbs do |breadcrumbs| %\u003e\n  \u003c%= content_tag(:div, breadcrumbs, class: \"container\") %\u003e\n\u003c% end %\u003e\n\n# =\u003e\n# \u003cdiv class=\"container\"\u003e\n#   \u003col class=\"breadcrumb\"\u003e\n#     \u003cli\u003e ... \u003c/li\u003e\n#     \u003cli class=\"active\"\u003e ... \u003c/li\u003e\n#   \u003c/ol\u003e\n# \u003c/div\u003e\n```\n\nYou can also optionally specify which custom view partial you would like to use for rendering the breadcrumbs:\n\n```erb\n\u003c%= render_breadcrumbs partial: 'path/to/custom/breadcrumbs' %\u003e\n```\n\nThere are also a few interface methods available for working with the internal breadcrumbs hashes. The following methods are available in controllers and views.\n\n```ruby\n# Given previously added breadcrumbs:\n\nbreadcrumbs?\n# =\u003e true\n\nbreadcrumb_names\n# =\u003e [\"example\", \"show\"]\n```\n\nThe following method is available to controllers only.\n\n```ruby\nclear_breadcrumbs\n# =\u003e nil\n```\n\n### Nav Helper\n\nTo render the Bootstrap example:\n\n```html\n\u003cul class=\"nav nav-tabs\"\u003e\n  \u003cli role=\"presentation\" class=\"active\"\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n  \u003cli role=\"presentation\"\u003e\u003ca href=\"/profile\"\u003eProfile\u003c/a\u003e\u003c/li\u003e\n  \u003cli role=\"presentation\"\u003e\u003ca href=\"/messages\"\u003eMessages\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n```\n\nIn your views:\n\n```erb\n\u003c%= nav do %\u003e\n  \u003c%= nav_to('Home', root_path) %\u003e\n  \u003c%= nav_to(profile_path) do %\u003e\n    Profile\n  \u003c% end %\u003e\n  \u003c%= nav_to('Messages', controller: users, action: :messages) %\u003e\n  \u003c%= nav_to('Forced active state', some_path, active: true) %\u003e\n\u003c% end %\u003e\n```\n\nThe `tabs` helper declares that a tab component is being used. Alternatively, the `pills` helper can\nbe used in the same manner. Other classes can be specified in the `class` hash argument, the `nav`\nclass need not be specified.\n\nThe `nav_to` helper accepts the same methods that the `link_to` helper accepts, but also \nautomatically applies the `active` class to the active link.\n\n### Glyph Helper\n\n```erb\n\u003c%= glyph(:star) %\u003e\n# =\u003e \u003cspan class=\"glyphicon glyphicon-star\"\u003e\u003c/span\u003e\n\n\u003c%= glyph(:star, :paperclip) %\u003e\n# =\u003e \u003cspan class=\"glyphicon glyphicon-star\"\u003e\u003c/span\u003e\u003cspan class=\"glyphicon glyphicon-paperclip\"\u003e\u003c/span\u003e\n```\n\n### Badge Helper\n\n```erb\n\u003c%= badge(2) %\u003e\n# =\u003e \u003cspan class=\"badge\"\u003e2\u003c/span\u003e\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoabit%2Fbootstrap-sass-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoabit%2Fbootstrap-sass-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoabit%2Fbootstrap-sass-extras/lists"}