Skip to content

Instantly share code, notes, and snippets.

@fdietz
Forked from ProLoser/alerts.html
Created February 19, 2013 16:02
Show Gist options
  • Save fdietz/4987175 to your computer and use it in GitHub Desktop.
Save fdietz/4987175 to your computer and use it in GitHub Desktop.
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<h1>Buttons</h1>
<button type="button" class="btn btn-primary" ui-jq="button" ui-options="'loading'" data-loading-text="Loading...">Loading state</button>
<button type="button" class="btn btn-primary" ng-class="{active:btnToggle}" ng-click="btnToggle=!btnToggle">Single Toggle</button>
<code>btnToggle: {{!!btnToggle}}</code>
<h1>Collapse</h1>
<p>AngularJS Only:</p>
<div class="accordion" id="accordion1">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" ng-class="{collapsed:!collapseOne}" ng-click="collapseOne=!collapseOne"">
Collapsible Group Item #1
</a>
</div>
<div class="accordion-body" ng-class="{collapse:collapseOne}">
<div class="accordion-inner">
Anim pariatur cliche...
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" ng-class="{collapsed:!collapseTwo}" ng-click="collapseTwo=!collapseTwo">
Collapsible Group Item #2
</a>
</div>
<div class="accordion-body" ng-class="{collapse:collapseTwo}">
<div class="accordion-inner">
Anim pariatur cliche...
</div>
</div>
</div>
</div>
<p>Bootstrap JS:</p>
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
Collapsible Group Item #1
</a>
</div>
<div id="collapseOne" class="accordion-body collapse in">
<div class="accordion-inner">
Anim pariatur cliche...
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
Collapsible Group Item #2
</a>
</div>
<div id="collapseTwo" class="accordion-body collapse">
<div class="accordion-inner">
Anim pariatur cliche...
</div>
</div>
</div>
</div>
<h1>Dropdown</h1>
<div class="dropdown">
<a class="dropdown-toggle" ng-click="showDropdown=!showDropdown">CSS Only + AngularJS</a>
<ul class="dropdown-menu" ui-show="showDropdown" role="menu" aria-labelledby="dLabel">
<li><a>First item</a></li>
<li><a>Second item</a></li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle" ui-jq="dropdown" data-toggle="dropdown" data-target="#" >Bootstrap JS + Passthrough</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li><a>First item</a></li>
<li><a>Second item</a></li>
</ul>
</div>
<!doctype html>
<html ng-app="ui" >
<head>
<meta charset="utf-8">
<title>AngularJS Plunker</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css">
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/docs/assets/js/bootstrap.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular-resource.min.js"></script>
<script src="https://raw.github.com/angular-ui/angular-ui/master/build/angular-ui.js"></script>
<script src="app.js"></script>
</head>
<body>
<h1>Bootstrapify</h1>
<p>A demo of every bootstrap directive using no new JS</p>
<p><a href="https://gist.github.com/4464334">Fork this gist</a></p>
<ng-include src="'dropdown.html'"></ng-include>
<ng-include src="'scrollspy.html'"></ng-include>
<ng-include src="'tabs.html'"></ng-include>
<ng-include src="'tooltips.html'"></ng-include>
<ng-include src="'popovers.html'"></ng-include>
<ng-include src="'alerts.html'"></ng-include>
<ng-include src="'buttons.html'"></ng-include>
<ng-include src="'collapse.html'"></ng-include>
<ng-include src="'carousel.html'"></ng-include>
<ng-include src="'typeahead.html'"></ng-include>
<p></p>
</div>
</body>
</html>
<h1>Popovers</h1>
<a href="#" class="btn btn-large btn-danger" ui-jq="popover" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">Click to toggle popover</a>
<h1>Scrollspy</h1>
<div class="bs-docs-example">
<div id="navbarExample" class="navbar navbar-static">
<div class="navbar-inner">
<div class="container" style="width: auto;">
<a class="brand" href="#">Project Name</a>
<ul class="nav">
<li class=""><a href="#fat">@fat</a></li>
<li class=""><a href="#mdo">@mdo</a></li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class=""><a href="#one">one</a></li>
<li class=""><a href="#two">two</a></li>
<li class="divider"></li>
<li class="active"><a href="#three">three</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div ui-jq="scrollspy" data-target="#navbarExample" data-offset="0" class="scrollspy-example">
<h4 id="fat">@fat</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<h4 id="mdo">@mdo</h4>
<p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>
<h4 id="one">one</h4>
<p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p>
<h4 id="two">two</h4>
<p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p>
<h4 id="three">three</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
</p>
</div>
</div>
/* Put your css in here */
.ui-show {
display: block !important;
}
.scrollspy-example {
height: 200px;
overflow: auto;
}
<h1>Tabs</h1>
<ul class="nav nav-tabs">
<li><a href="#home" ng-click="tab='home'">Home</a></li>
<li><a href="#profile" ng-click="tab='profile'">Profile</a></li>
<li><a href="#messages" ng-click="tab='messages'">Messages</a></li>
<li><a href="#settings" ng-click="tab='settings'">Settings</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" ng-class="{active:tab=='home'}" id="home">Home</div>
<div class="tab-pane" ng-class="{active:tab=='profile'}" id="profile">Profile</div>
<div class="tab-pane" ng-class="{active:tab=='messages'}" id="messages">Messages</div>
<div class="tab-pane" ng-class="{active:tab=='settings'}" id="settings">Settings</div>
</div>
<h1>Tooltips</h1>
<input ng-list ng-model="tooltips" type="text" placeholder="comma,separated,list">
<ul>
<li ng-repeat="item in tooltips" ui-jq="tooltip" data-original-title="{{item}}">{{item}}</li>
</ul>
<h1>Typeahead</h1>
<pre>{{typeahead|json}}</pre>
<input ng-model="typeahead" placeholder="first, second, third" ui-jq="typeahead" ui-options="{source:['first','second','third']}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment