All Projects → muryoimpl → buoys

muryoimpl / buoys

Licence: MIT license
A Ruby on Rails breadcrumb plugin.

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Logos
282 projects
Haml
164 projects
Slim
82 projects

Projects that are alternatives of or similar to buoys

Wordpress Seo
Yoast SEO for WordPress
Stars: ✭ 1,301 (+4718.52%)
Mutual labels:  breadcrumbs
Structured Data Json Ld
Collection of structured data snippets in Google preferred JSON-LD format.
Stars: ✭ 157 (+481.48%)
Mutual labels:  breadcrumbs
breadcrumbs
Breadcrumbs for Laravel, made easy.
Stars: ✭ 46 (+70.37%)
Mutual labels:  breadcrumbs
Magento 2 Seo
Magento 2 SEO extension will do perfectly for your better SEO. This is a bundle of outstanding features that are auto-active when you install it from Mageplaza without any code modifications. It is also friendly with your store if you need to insert meta keywords and meta descriptions for your product.
Stars: ✭ 99 (+266.67%)
Mutual labels:  breadcrumbs
Raygun4js
JavaScript provider for Raygun
Stars: ✭ 124 (+359.26%)
Mutual labels:  breadcrumbs
Breadcrumbs
Laravel Breadcrumbs - An easy way to add breadcrumbs to your @Laravel app.
Stars: ✭ 169 (+525.93%)
Mutual labels:  breadcrumbs
Ng2 Breadcrumbs
A breadcrumb service for the Angular 7 router
Stars: ✭ 61 (+125.93%)
Mutual labels:  breadcrumbs
ember-breadcrumb-trail
Minimalistic but very flexible breadcrumb management solution for Ember applications.
Stars: ✭ 13 (-51.85%)
Mutual labels:  breadcrumbs
Vue Breadcrumbs
Breadcrumbs for Vue.js
Stars: ✭ 148 (+448.15%)
Mutual labels:  breadcrumbs
laravel5-breadcrumbs
Laravel 5 integration for our breadcrumbs package
Stars: ✭ 34 (+25.93%)
Mutual labels:  breadcrumbs
Xng Breadcrumb
A lightweight, configurable and reactive breadcrumbs for Angular 2+
Stars: ✭ 106 (+292.59%)
Mutual labels:  breadcrumbs
React Breadcrumbs Dynamic
🏡 > breadcrumbs > extremely flexible > and > easy to use
Stars: ✭ 116 (+329.63%)
Mutual labels:  breadcrumbs
Krumbsview
🍞 The ultimate breadcrumbs view for Android!
Stars: ✭ 170 (+529.63%)
Mutual labels:  breadcrumbs
Bootstrap Breadcrumbs
Django template tags for easy breadcrumbs using twitter bootstrap css classes or custom template
Stars: ✭ 91 (+237.04%)
Mutual labels:  breadcrumbs
laravel-adminlte-boilerplate
Laravel 5.6+ AdminLTE
Stars: ✭ 45 (+66.67%)
Mutual labels:  breadcrumbs
Vue 2 Breadcrumbs
Vue breadcrumbs
Stars: ✭ 76 (+181.48%)
Mutual labels:  breadcrumbs
Bugsnag Cocoa
Bugsnag crash reporting for iOS, macOS and tvOS apps
Stars: ✭ 167 (+518.52%)
Mutual labels:  breadcrumbs
jekyll-breadcrumbs
Creates breadcrumbs for Jekyll 3.x, includes features like SEO optimization, optional breadcrumb item and more
Stars: ✭ 50 (+85.19%)
Mutual labels:  breadcrumbs
breadcrumb-bundle
Symfony bundle for easy breadcrumbs management
Stars: ✭ 26 (-3.7%)
Mutual labels:  breadcrumbs
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 (+722.22%)
Mutual labels:  breadcrumbs

Build Status

Buoys

Buoys is a Ruby on Rails breadcrumb plugin like gretel.

Motivation

I like gretel and respect its idea, but I want to create simpler breadcrumb library like gretel using I18n.

Installation

In your Gemfile

gem 'buoys'

And run:

$ bundle install

Example

Start by generating configuration and example files.

$ bin/rails g buoys:install
  create  config/locale/buoys.en.yml
  create  config/buoys/breadcrumbs.rb
  create  app/views/breadcrumbs/_buoys.html.erb

You can use --template haml and --template slim options.

$ bin/rails g buoys:install --template haml
  create  config/locale/buoys.en.yml
  create  config/buoys/breadcrumbs.rb
  create  app/views/breadcrumbs/_buoys.html.haml

Then, in config/buoys/breadcrumbs.rb

buoy :stories do
  link 'Stories', stories_path
end

# 'crumb' is the alias of 'buoy'
# ex)
crumb :stories do
  link 'Stories', stories_path
end

# link's first argument, it is used as I18n key and defalt value.
# The key is searched in the scope of 'buoys.breadcrumbs'.
# ex)
buoy :story do |story|
  link :story, story_path(story)
  # same as `link I18n.t('story', scope: 'buoys.breadcrumbs', default: 'story'), story_path(story)`
end

# You can also override Buoys configuration
# ex)
buoy :story_tasks do |story|
  link :story_tasks, story_tasks_path
  pre_buoy :story, story, {link_current: true}
end

# You can use 'pre_buoy' as parent. 'parent' is the alias of pre_buoy`.
# ex)
buoy :story_tasks do |story|
  link :story_tasks, story_tasks_path
  parent :story, story
end

Then, set the current buoy(breadcrumb) at the top of view file (like app/views/stories/index.html.erb).

<% buoy :stories %>

Then, in app/views/layouts/application.html.erb.

<%= render partial: 'breadcrumbs/buoys' %>

Then, You can build and change breadcrumb app/views/breadcrumbs/_buoys.html.erb

<% if buoys.any? %>
  <ul>
    <% buoys.each do |link| %>
      <li>
        <%# if 'link.current?' is true, link.options includes {class: 'current'}. %>
        <%= link_to link.url, link.options do %>
          <span><%= link.text %></span>
        <% end %>
        <% if !link.current? %>
          <span> &gt;</span>
        <% end %>
      </li>
    <% end %>
  </ul>
<% end %>

Options

option description default
:link_current whether current buoy(breadcrumb) should be linked to false
:current_class CSS class for current link. if you set nil, it is not set CSS class 'active'

You can override default configuration like below.

# config/initializers/buoys.rb

Buoys.configure do |config|
  config.current_class = 'current'
end

Copyright (c) 2016 muryoimpl Released under the MIT license

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].