All Projects → ma2gedev → breadcrumble

ma2gedev / breadcrumble

Licence: MIT License
A breadcrumbs plugin for Ruby on Rails.

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to breadcrumble

breadcrumbs
Breadcrumbs for Laravel, made easy.
Stars: ✭ 46 (+17.95%)
Mutual labels:  breadcrumbs
menus
Laravel Enso main menu manager, for easy management of the application menus straight from the interface, whether that means adding, removing or reordering them
Stars: ✭ 15 (-61.54%)
Mutual labels:  breadcrumbs
DNTBreadCrumb.Core
DNTBreadCrumb.Core Creates custom bread crumb definitions, based on Twitter Bootstrap 3.x features for ASP.NET Core applications.
Stars: ✭ 32 (-17.95%)
Mutual labels:  breadcrumbs
breadcrumb-bundle
Symfony bundle for easy breadcrumbs management
Stars: ✭ 26 (-33.33%)
Mutual labels:  breadcrumbs
buoys
A Ruby on Rails breadcrumb plugin.
Stars: ✭ 27 (-30.77%)
Mutual labels:  breadcrumbs
a11y breadcrumbs
Accessible breadcrumb pattern
Stars: ✭ 44 (+12.82%)
Mutual labels:  breadcrumb-navigation
Honeybits
A PoC tool designed to enhance the effectiveness of your traps by spreading breadcrumbs & honeytokens across your systems to lure the attacker toward your honeypots
Stars: ✭ 222 (+469.23%)
Mutual labels:  breadcrumbs
gatsby-simple-blog
an easily configurable gatsby-starter-blog with overreacted looking and tags, breadcrumbs, disqus, i18n, eslint, algolia supported
Stars: ✭ 48 (+23.08%)
Mutual labels:  breadcrumbs
laravel-breadcrumbs
Simple breadcrumbs package for your Laravel project.
Stars: ✭ 23 (-41.03%)
Mutual labels:  breadcrumbs
joplin-note-tabs
Allows to open several notes at once in tabs and pin them.
Stars: ✭ 150 (+284.62%)
Mutual labels:  breadcrumbs
ember-breadcrumb-trail
Minimalistic but very flexible breadcrumb management solution for Ember applications.
Stars: ✭ 13 (-66.67%)
Mutual labels:  breadcrumbs
jekyll-breadcrumbs
Creates breadcrumbs for Jekyll 3.x, includes features like SEO optimization, optional breadcrumb item and more
Stars: ✭ 50 (+28.21%)
Mutual labels:  breadcrumbs
laravel-breadcrumbs
Laravel Breadcrumbs - A simple Laravel-style way to create breadcrumbs.
Stars: ✭ 554 (+1320.51%)
Mutual labels:  breadcrumbs
laravel-adminlte-boilerplate
Laravel 5.6+ AdminLTE
Stars: ✭ 45 (+15.38%)
Mutual labels:  breadcrumbs
SemanticBreadcrumbLinks
Provides in-page navigation by building breadcrumb links from an attributive property filter.
Stars: ✭ 15 (-61.54%)
Mutual labels:  breadcrumbs
laravel5-breadcrumbs
Laravel 5 integration for our breadcrumbs package
Stars: ✭ 34 (-12.82%)
Mutual labels:  breadcrumbs
nextjs-breadcrumbs
A dynamic, highly customizable breadcrumbs component for Next.js
Stars: ✭ 70 (+79.49%)
Mutual labels:  breadcrumbs
raygun4ruby
The Ruby & Ruby on Rails provider for Raygun
Stars: ✭ 37 (-5.13%)
Mutual labels:  breadcrumbs
vue-crumbs
a simple and useful breadcrumb for Vue2.js
Stars: ✭ 16 (-58.97%)
Mutual labels:  breadcrumbs
use-react-router-breadcrumbs
tiny, flexible, hook for rendering route breadcrumbs with react-router v6
Stars: ✭ 170 (+335.9%)
Mutual labels:  breadcrumbs

Breadcrumble

Gem Version Build Status Code Climate Coverage Status Inline docs

Breadcrumble Logo logo designed by @524shoutz_nika

Breadcrumble is a simple breadcrumb navigation plugin for latest Ruby on Rails.

Support rich snippets mark up using microdata format as default.

And also support multiple breadcrumb trails.

See also about rich snippets -> https://developers.google.com/search/docs/data-types/breadcrumb

Installation

Add this line to your application's Gemfile:

gem 'breadcrumble'

And then execute:

$ bundle

Or install it yourself as:

$ gem install breadcrumble

Usage

Controller

In your controller, call add_breadcrumb to push a new crumb on the breadcrumb stack.

class SampleController

  add_breadcrumb("home", home_url)
  add_breadcrumb(-> context { context.title }, -> context { context.sample_path })

  def index
    add_breadcrumb("index", controller: 'sample', action: 'index')
    add_breadcrumb("show", show_path(123))
    add_breadcrumbs(["book", "/book"], ["page", "/book/page"])
  end

end

Second arugment passed url_for method for convenient use, except specify nil.

You can use Proc object for arguments, the library calls proc with controller context as argument.

If you would like to use multiple breadcrumb, call add_breadcrumb_to method with breadcrumb trail index.

class SampleController

  add_breadcrumb_to("level 1", "level 1 url", 0) # same as -> add_breadcrumb("level 1", "level 1 url")
  add_breadcrumb_to("level 2", "level 2 url", 1)

  def index
    add_breadcrumb_to("level 1 second item", "level 1 second url", 0)
    add_breadcrumb_to("level 2 second item", "level 2 second url", 1)
end

View

In your view, you can render the breadcrumb navigation with the render_breadcrumbs helper.

<body>
  <%= render_breadcrumbs %>
</body>

You can render multiple breadcrumb by render_breadcrumb_trails helper.

<body>
  <%= render_breadcrumb_trails %>
</body>

Customizing layout

Breadcrumble generates default partial template for your app.

Generate template. Run the follwoing.

$ rails g breadcrumble:views

then edit the partials in your app's app/views/breadcrumble/ directory.

Theme

You can choose template themes in a single application. Create a directory with theme name in your app's app/views/breadcrumble/ and create custom template files.

$ rails g breadcrumble:views
$ cd app/views/breadcrumble
$ mkdir my_custom_theme
$ cp _*.erb my_custom_theme/

And then calling render_breadcrumbs or render_breadcrumb_trails method with theme option.

<%= render_breadcrumbs(theme: 'my_custom_theme') %>
<%= render_breadcrumb_trails(theme: 'my_custom_theme') %>

Live Demo

http://breadcrumble.herokuapp.com/

Development

test with specified Rails version

like the following:

$ bundle install --gemfile=gemfiles/6.1.gemfile
$ BUNDLE_GEMFILE=gemfiles/6.1.gemfile bundle exec rake

Contributing

Easy way

It's easy to contribute. You only push the star button!

The other way

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].