Giter VIP home page Giter VIP logo

bootstrap-navbar's People

Contributors

ahastudio avatar jesperronn avatar manuelmeurer avatar pabse avatar philippevienne avatar pichutan avatar simmerz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bootstrap-navbar's Issues

collapsed responsive menu is buggy

Problem: The link "home" is displayed on the same line as the brand link.
Expectation: Link "home" goes in the line below the brand link.

Thanks for your effords so far. the plug-in is very handy. I use it with middleman.

== nav_bar fixed: :top, responsive: true do
  == brand_link 'My great app'
  == menu_group class: 'foo', id: 'menu' do
    == menu_item "Home", '/'
    == menu_item "About Us", '/'

menu

Error trying to load gem middleman-bootstrap-navbar

I am using middleman static website generation gem to develop a website. I want to include the bootstrap navbar into index file so i installed middleman-bootstrap-navbar gem.

Here is my config.rb

configure :development do
  activate :livereload
  activate :bootstrap_navbar
  ready do
  sprockets.import_asset 'bootstrap.js'
end
configure :build do
 end

Here is my gemfile

# Middleman Gems
gem 'middleman', '>= 4.0.0'

# Live-reloading plugin
gem 'middleman-livereload'

gem 'middleman-compass', '>= 4.0.0'

# Navigation
gem 'middleman-bootstrap-navbar'
gem "sass"
gem "bootstrap-sass", "~> 3.3.6", :require => false 
gem 'sass-rails', '>=3.2'
gem "jquery-middleman" #Don't forget to run 'bundle install'
gem 'sprockets-rails', '~>3.0.0'

Here is my all.js

//= require jquery  
//= require bootstrap-sprockets
//= require tree .

Here is my site.css.sass

@import "bootstrap-sprockets";
@import "normalize";
@import "bootstrap";
@charset "utf-8";

I Run bundle install after installing all necessary gems and restarted my server at LiveReload ip bundle exec middleman. I got this error afterwards:

screenshot of the error in mysysgit

please help.

PS: Sorry I couldnt paste the error code here. That feature is not enabled in mysysgit bash.

Bootstrap 3.1.0

Bootstrap 3.1.0 is out, and bootstrap-sass is updated accordingly. 3.1.0 is not on the list of supported versions, so currently any program using this gem cannot start up.

external site considered "active" - navbar_item issue

I followed the guide and create my nav. A link to an external website is given active class - Live demo link is surely not an active page. ;)

bootstrap-navbar should either refrain from considering full URLs as active, or should let me explicitly mark the navbar_item as external, e.g.

navbar_item 'Live demo', 'https://demo.virtkick.io/', external: true

Here's my code:

= navbar static: :top do
  = navbar_header brand: 'VirtKick', brand_link: '/'
  = navbar_collapse do
    = navbar_group class: 'foo', id: 'menu' do
      = navbar_item 'Home', '/'
      = navbar_item 'News', '/news.html'
      = navbar_item 'Community', '/community.html'
      = navbar_item 'Get started', '/get-started.html'
      = navbar_item 'https://demo.virtkick.io/' do
        Live demo
        %span.glyphicon.glyphicon-play

vk

Bootstrap 5 Support broken

Hello,

there's an issue in the bootstrap 5 helper.

Please exchange

<ul#{wrapper_attributes}> #{capture(&block) if block_given?} </div>

to
**<ul#{wrapper_attributes}> #{capture(&block) if block_given?} </ul>**

in the navbar_dropdown function.
Thank you!

undefined method `capture'

I'm trying to integrate this with Sinatra (1.4.8) on Ruby 2.5.1, but when just calling navbar I get the above error. Is there an outstanding dependency for this function?

navbar_item link with DELETE method

def navbar_item(text, url = nil, list_item_options = nil, link_options = nil, &block)
text, url, list_item_options, link_options = capture(&block), text, url, list_item_options if block_given?
url ||= '#'
list_item_options = list_item_options ? list_item_options.dup : {}
link_options = link_options ? link_options.dup : {}
list_item_options[:class] = [list_item_options[:class], 'nav-item'].compact.join(' ')
link_options[:class] = [link_options[:class], 'nav-link'].compact
link_options[:class] << 'active' if current_url_or_sub_url?(url)
link_options[:class] = link_options[:class].join(' ')
list_item_attributes = attributes_for_tag(list_item_options)
link_attributes = attributes_for_tag(link_options)
prepare_html <<-HTML.chomp!
<li#{list_item_attributes}>
<a href="#{url}"#{link_attributes}>
#{text}
</a>
</li>
HTML
end

navbar_item accepts link_options keyword arguments, so to make a link that sends out a DELETE request, I had to do the following:

navbar_item "Log Out", destroy_user_session_path, nil, "data-method" => "delete"

However, specifying link option "data-method" seems like a hack to me. It also depends on rails-ujs to work.

Is there a better way to implement this?

Bootstrap 4: navbar_dropdown not correct

I recently discovered that the navbar_dropdown helper for Bootstrap4 is not working as desired.
The syntax changed a bit.

I will open a PR as soon as possible ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.