bootstrap-ruby / bootstrap-navbar Goto Github PK
View Code? Open in Web Editor NEWHelpers to generate a Twitter Bootstrap navbar
Home Page: http://bootstrap-ruby.github.io/bootstrap-navbar/
License: MIT License
Helpers to generate a Twitter Bootstrap navbar
Home Page: http://bootstrap-ruby.github.io/bootstrap-navbar/
License: MIT License
Apparently, if I am on a page called "leads_templates", at that moment both the "leads templates" menu item and the "leads" menu item are marked as active... although only the "leads templates" menu item has a link to "leads_templates".
It would be great if someone can update the doc like the doc for bootstrap 3. Thanks!
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", '/'
As an answer to my question on SO explains, the bootstrap docs are actually wrong, and when the nav
element has the navbar-fixed-top
class, there must be a div.container
directly inside the nav.navbar
.
This gem doesn't have this implemented which causes the problem mentioned in the SO question, and perhaps others.
Thanks.
In the latest Bootstrap 4 version (v4-beta) the active
class for the nav_item should not be set to the li
tag. Instead it should be on the a
tag having the class nav-link
. See https://getbootstrap.com/docs/4.0/components/navs/#pills-with-dropdowns
This is the relevant part of the code.
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 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.
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
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!
How to remove navbar-default & navbar-inverse class from navbar? Use case: bootstrap material design navbar custom color. Thanks
Is it possible to put a navbar item or text outside of the collapse section of the navbar? In this file it is done, and it does not look like it is possible to do the same with this gem.
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?
bootstrap-navbar/lib/bootstrap-navbar/helpers/bootstrap4.rb
Lines 50 to 68 in ac38235
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?
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 ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.