angularjs button in bootstrap navigation bar - html

I really like the current style of the navigation bar in twitter Bootstrap v3.3.6 and I'm wondering how to wrap angularJS buttons inside them?
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#/"> Jenny Tech </a>
</div>
<ul class="nav navbar-nav navbar-right">
<!--<button ng-click="Home()">Home</button>-->
<li><i class="fa fa-home"></i> Home</li>
<li><i class="fa fa-shield"></i> About</li>
<li><i class="fa fa-comment"></i> Contact</li>
</ul>
</div>
</nav>
Putting in <button ng-click="Home()">Home</button> simply puts a button that is in a different style and size in the upper right part of the nav bar.
Would appreciate some help on this.

try this May be it will help:
<button type="button" class="btn btn-primary" ng-click="Home()">Home</button>

Related

How to keep this button open once it's been clicked

I'm currently creating a navigation menu and I want my sub sections such as "typography" to stay open in the menu once they have been clicked and the new page has been loaded.
How would I best best to complete this task
Here is my HTML code for the navigation menu.
<div class="sidenav">
<a class="current3" href="index.html">Home</a>
Journal
<button class="dropdown-btn">Davids Work
<i class="fa fa-caret-down" aria-hidden="true"></i>
</button>
<div class="dropdown-container">
<a class="dropdowntext2" href="three-designed-objects-homepage.html">Designed Objects</a>
<!--
Link 2
Link 3
-->
</div>
<button class="dropdown-btn">Priscas Work
<i class="fa fa-caret-down" aria-hidden="true"></i>
</button>
<div class="dropdown-container">
<a class="dropdowntext2" href="Typography-arrangement.html">Typography</a>
<a class="dropdowntext2" href="lithome.html">Literature</a>
<!-- Link 3 -->
</div>
<a class="submenu"href="oldwebsites.html">Archived Websites</a>
<a class="nav-menu" href="about.html">About</a>
<button class="openBtn" onclick="openSearch()">Search</button>
</div>

To change the default bootstrap css values with less

I'm doing a site with HTML5 andbootstrap-lessnothing works normally but I needed to change some colors in the navbar menu and I know I can do this throughvariables.less inside this file I navigate to the menus where I copy all the code related to the menu that I want to edit and paste in my .less file but it does not work I do not want to have to use! important to change the menu being that I know I can do this by only variables in the less that comes in the bootsrap this is theless code of the menu
LESS:
#navbar-default-color: #fff;
#navbar-default-bg: #f8f8f8;
#navbar-default-border: darken(#navbar-default-bg, 6.5%);
//* Navbar links*/
#navbar-default-link-color: #fff;
#navbar-default-link-hover-color: #fff;
#navbar-default-link-hover-bg: transparent;
#navbar-default-link-active-color: #fff;
#navbar-default-link-active-bg: darken(#navbar-default-bg, 6.5%);
#navbar-default-link-disabled-color: #fff;
#navbar-default-link-disabled-bg: transparent;
/* Navbar brand label*/
#navbar-default-brand-color: #navbar-default-link-color;
#navbar-default-brand-hover-color: darken(#navbar-default-brand-color, 10%);
#navbar-default-brand-hover-bg: transparent;
/* Navbar toggle*/
#navbar-default-toggle-hover-bg: #fff;
#navbar-default-toggle-icon-bar-bg: #fff;
#navbar-default-toggle-border-color: #fff;
even though I change the values it does not change on my site notice that I left everything white to do a test and my site does not change:
this is my menu:
<nav class="navbar navbar-default">
<div class="container text-center">
<div class="row">
<div class="box-menu">
<div class="col-md-3">
<img src="assets/images/logo-santa-clara-eco.png" class="img-responsive" alt="Santa Clara EcoResort" />
</div>
<div class="col-md-6 hidden-xs hidden-sm">
<ul class="list-unstyled list-inline contact-info">
<li class="list"><i class="fa fa-map-marker" aria-hidden="true"></i>Rod SP 215 Km 197 - Dourado - SP</li>
<li class="list"><i class="fa fa-phone" aria-hidden="true"></i>+55 (16) 3345 4004</li>
<li class="list"><i class="fa fa-envelope" aria-hidden="true"></i>Contato</li>
</ul>
</div>
<div class="col-md-3 hidden-xs hidden-sm">
<img src="assets/images/logo_top.png" class="img-responsive logos-inline" alt="Tripadvisor L'OCITANE ABR" />
</div>
</div>
</div>
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav list-nav-menu">
<li><i class="fa fa-home" aria-hidden="true"></i></li>
<li>resort</li>
<li><a href="http://santaclaraecoresort.com.br/acomodacoes.php" id="question" >acomodações</a></li>
<li>gastronomia</li>
<li>atividades</li>
<li>SPA </li>
<li>eventos</li>
<li>monitoria</li>
<li>pacotes</li>
<li>programação</li>
<li class="dropdown">
Contato <b class="caret"></b>
<ul class="dropdown-menu">
<li>Localização</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right list-inline social-networks hidden-xs hidden-sm">
<li><i class="fa fa-facebook" aria-hidden="true"></i></li>
<li><i class="fa fa-instagram" aria-hidden="true"></i></li>
<li><i class="fa fa-youtube" aria-hidden="true"></i></li>
<li><i class="fa fa-tripadvisor" aria-hidden="true"></i></li>
</ul>
</div>
</div>
</div>
</nav>
I'm importing everything normal bootstrap``css andjs together with jquery and I'm doing# import right away
<link rel="stylesheet" href="assets/vendor/bootstrap/dist/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="assets/vendor/bootstrap/dist/js/bootstrap.min.js"></script>
my app.less file with the import:
#import "../vendor/bootstrap/less/bootstrap.less";
#import "app.css";
image of my variables with the colors I need to change, I copied the variables from the variables.less file and added it to myapp.less I changed the colors they appear on the console but they do not overwrite.
my less file with the color changes (remembering that this is a copy of thevariables.less file)

How Do I Change This Bootstrap to work on Joomla the way I need?

I want to have this bootstrap menu I'm creating and will use for many shows on our website to be a plain nav-tabs menu with the Social and info links on the right side. But I can't figure out the code. I'm wondering if someone can help us with the code and change it so it uses the nav-tabs instead of the normal nav & looks clean instead of the gray block it's in currently...
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
</a>
<a class="brand" href="#">Name Of Show</a>
<div class="nav-collapse">
<ul class="nav">
<li>Cast</li>
<li>Episodes</li>
</ul>
</li>
</ul>
<ul class="nav pull-right">
<div class="btn-group">
<a class="btn btn-default" style="color:#3b5998;margin-top:-2px;" href="#">
<i class="fa fa-facebook fa-2x" title="Facebook"></i>
</a>
<a class="btn btn-default" style="color:#00aced;margin-top:-2px;" href="#">
<i class="fa fa-twitter fa-2x" title="Twitter"></i>
</a>
<button type="button" style="height:39px;margin-top:-2px;" class="btn btn-inverse">TV-14</button>
<button type="button" style="height:39px;margin-top:-2px;" class="btn btn-default disabled">1 Season | HD | 2011</button>
</div>
</ul>
</div><!-- /.nav-collapse -->
</div>
</div><!-- /navbar-inner -->
</div>
Thank you in advance to anyone who helps me with this. I've been stuck for days...
With Protostar Template (one of default templates in Joomla!) you could use the nav-tabs instead of nav-pills or others Bootstrap classes opening the administration panel > module > menu > advanced > Menu Class Suffix; and inside the field write simply nav-tabs after a space.
If you want substitute the entire HTML code of menu you have to build a new Joomla! module or try to modify the php files here: joomla root/modules/mod_menu/tmpl

Bootstrap Centering Content within a Div

Basically I want my drop down boxes to be horizontally aligned in the center of the <div>. Currently they are in a column and inside a <div> which has displayed them vertically, by default and has pushed the content to the left of the <div>.
I'm using the latest version of bootstrap and only have CSS to pad the header and to set it as transparent!
<div class=" navbar transparent navbar-default navbar-fixed-top" role="navigation"> <!--HEADER-->
<div class="container-fluid header"> <!--CONTAINER- Needs to be inset slightly-->
<div class="row">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!--First NavBar Colum - Logo is Located Here-->
<div class=" navbar-collapse collapse">
<div class="col-sm-4 ">
</div>
<!--Second NavBar Colum - Centered Horizontal Navigation Links are Located Here-->
<div class="col-sm-4 ">
<ul class="nav navbar-nav navbar-left">
<ul class="dropdown">
<i class="fa fa-circle-o"></i>
PLAY
<ul class="dropdown-menu">
<li class="divider"></li>
<li>Public Teatimes</li>
<li>Member Teatimes</li>
<li>Course Tour</li>
<li>Rates and Ratings</li>
<li>Outings</li>
</ul>
</ul>
<ul class="dropdown">
<i class="fa fa-circle-o"></i>
CLUB
<ul class="dropdown-menu">
<li class="divider"></li>
<li>Membership</li>
<li>Calender</li>
<li>Lessons and Shop</li>
<li>Bar and Food</li>
</ul>
</ul>
<ul>
<i class="fa fa-circle-o"></i>
CONTACT
</ul>
</ul>
</div>
<!--Third NavBar Colum - Social Media Icons are Located Here-->
<div class="col-sm-4">
<i class="fa fa-facebook-square fa-3x"></i>
<i class="fa fa-twitter-square fa-3x"></i>
<i class="fa fa-instagram fa-3x"></i>
</div>
</div> <!--/ .nav-collapse-->
</div>
</div>
</div>
In .navbar-nav, .navbar-left there is float:left . SO, you have remove that first float:none. Then on parent col-sm-4 you can add .text-center.
Try something like this
.navbar-nav{
width:250px;
margin:0 auto;
float:none;
text-align:center;
}
And remove float from <li> if you use.
#media (min-width: 768px)
.navbar-nav {
text-align: center;}

Bootstrap 3 off-canvas how to

So i just don't get it.
I've looked for some good examples for off canvas in bootstrap 3 but i just don't get it. I have already set up my navigation but dun know how this off canvas works.
When i use a mobile device i want my toggled navigation to slide in from the right to the left over the whole browser screen with an "X" on the upper left corner to close this one again. So it's like : User clicks on the toggled Navigation -> Navigtion slides in from the right to the left over the whole screen -> Navigation is listed there -> click on an menu point and close the navigation with sliding out from left to right.
Anyone got any ideas ???? Really need help
My Navigation looks like this atm :
<header>
<div class="container-header hidden-xs">
<!-- Navigation -->
<div class="first-nav">
<form class="navbar-search">
<input type="text" class="search-query span3" placeholder="search">
</form>
<ul class="social-buttons" id="home">
<li><i class="fa fa-youtube fa-lg"></i></li>
<li><i class="fa fa-twitter fa-lg"></i></li>
<li><i class="fa fa-xing fa-lg"></i></li>
<li><i class="fa fa-rss fa-lg"></i></li>
</ul>
<a class="navbar-lang" href="#" title="English">Eng</a>
</div>
</div>
<div id="nav">
<div class="navbar navbar-default navbar-static" role="navigation">
<div class="second-nav">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="nav-logo">
<img src="images/Logo_nav.png" alt="DnD">
</div>
<div class="navbar-collapse collapse">
<ul class="mainnav nav navbar-nav">
<li>Home</li>
<li>Leistungen</li>
<li>Über uns</li>
<li>Team</li>
<li class="dropdown">
Aktuelles<b class="caret"></b>
<ul class="dropdown-menu">
<li>Alle Artikel</li>
</ul>
</li>
<li>Kunden</li>
<li class="dropdown">
Jobs<b class="caret"></b>
<ul class="dropdown-menu">
<li>Alle Jobs</li>
</ul>
</li>
<li>Kontakt</li>
</ul>
</div>
</div>
</div>
</div>
</header>
Correct me if I am wrong, but something like below should work:
#media screen and (max-width: 767px) {
.row-offcanvas-right.active {
right: calc(100% + 30px); /*30px to get row margin back (-15px + (-15px))*/
}
}