mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
resolve conflict
This commit is contained in:
commit
1a8fb2dbf7
8
bootstrap-1.3.0.css
vendored
8
bootstrap-1.3.0.css
vendored
@ -6,7 +6,7 @@
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
||||
* Date: Thu Sep 8 22:56:41 PDT 2011
|
||||
* Date: Thu Sep 8 23:02:03 PDT 2011
|
||||
*/
|
||||
/* Reset.less
|
||||
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
|
||||
@ -1604,6 +1604,12 @@ a.menu:after, .dropdown-toggle:after {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.tab-content > *, .pill-content > * {
|
||||
display: none;
|
||||
}
|
||||
.tab-content > .active, .pill-content > .active {
|
||||
display: block;
|
||||
}
|
||||
.breadcrumb {
|
||||
margin: 0 0 18px;
|
||||
padding: 7px 14px;
|
||||
|
2
bootstrap-1.3.0.min.css
vendored
2
bootstrap-1.3.0.min.css
vendored
@ -232,6 +232,8 @@ a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;conten
|
||||
.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;}
|
||||
.pills a{margin:5px 3px 5px 0;padding:0 15px;text-shadow:0 1px 1px #fff;line-height:30px;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{background:#0050a3;color:#fff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);}
|
||||
.pills .active a{background:#0069d6;color:#fff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);}
|
||||
.tab-content>*,.pill-content>*{display:none;}
|
||||
.tab-content>.active,.pill-content>.active{display:block;}
|
||||
.breadcrumb{margin:0 0 18px;padding:7px 14px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #fff;}
|
||||
.breadcrumb .divider{padding:0 5px;color:#bfbfbf;}
|
||||
.breadcrumb .active a{color:#404040;}
|
||||
|
@ -222,6 +222,7 @@ div.topbar-wrapper div.topbar .topbar-inner {
|
||||
position: relative;
|
||||
height: 40px;
|
||||
margin: 5px 0 15px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#bootstrap-js div.topbar-wrapper div.topbar {
|
||||
|
39
docs/assets/js/application-scrollspy.js
Normal file
39
docs/assets/js/application-scrollspy.js
Normal file
@ -0,0 +1,39 @@
|
||||
// scroll spy logic
|
||||
// ================
|
||||
$(function () {
|
||||
|
||||
var activeTarget,
|
||||
position = {},
|
||||
$window = $(window),
|
||||
nav = $('body > .topbar li a'),
|
||||
targets = nav.map(function () {
|
||||
return $(this).attr('href');
|
||||
}),
|
||||
offsets = $.map(targets, function (id) {
|
||||
return $(id).offset().top;
|
||||
});
|
||||
|
||||
function setButton(id) {
|
||||
nav.parent("li").removeClass('active');
|
||||
$(nav[$.inArray(id, targets)]).parent("li").addClass('active');
|
||||
}
|
||||
|
||||
function processScroll(e) {
|
||||
var scrollTop = $window.scrollTop() + 10, i;
|
||||
for (i = offsets.length; i--;) {
|
||||
if (activeTarget != targets[i] && scrollTop >= offsets[i] && (!offsets[i + 1] || scrollTop <= offsets[i + 1])) {
|
||||
activeTarget = targets[i];
|
||||
setButton(activeTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nav.click(function () {
|
||||
processScroll();
|
||||
});
|
||||
|
||||
processScroll();
|
||||
|
||||
$window.scroll(processScroll);
|
||||
|
||||
})
|
@ -1,96 +1,46 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
// Google code prettify
|
||||
// ====================
|
||||
|
||||
prettyPrint();
|
||||
|
||||
|
||||
// scroll spy logic
|
||||
// ================
|
||||
|
||||
var activeTarget,
|
||||
position = {},
|
||||
$window = $(window),
|
||||
nav = $('body > .topbar li a'),
|
||||
targets = nav.map(function () {
|
||||
return $(this).attr('href');
|
||||
}),
|
||||
offsets = $.map(targets, function (id) {
|
||||
return $(id).offset().top;
|
||||
});
|
||||
|
||||
function setButton(id) {
|
||||
nav.parent("li").removeClass('active');
|
||||
$(nav[$.inArray(id, targets)]).parent("li").addClass('active');
|
||||
}
|
||||
|
||||
function processScroll(e) {
|
||||
var scrollTop = $window.scrollTop() + 10, i;
|
||||
for (i = offsets.length; i--;) {
|
||||
if (activeTarget != targets[i] && scrollTop >= offsets[i] && (!offsets[i + 1] || scrollTop <= offsets[i + 1])) {
|
||||
activeTarget = targets[i];
|
||||
setButton(activeTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nav.click(function () {
|
||||
processScroll();
|
||||
});
|
||||
|
||||
processScroll();
|
||||
|
||||
$window.scroll(processScroll);
|
||||
|
||||
|
||||
// Dropdown example for topbar nav
|
||||
// ===============================
|
||||
|
||||
$("body").bind("click", function (e) {
|
||||
$('.dropdown-toggle, .menu').parent("li").removeClass("open");
|
||||
});
|
||||
$(".dropdown-toggle, .menu").click(function (e) {
|
||||
var $li = $(this).parent("li").toggleClass('open');
|
||||
return false;
|
||||
});
|
||||
$(".topbar").dropdown() // catch any dropdowns on the page
|
||||
|
||||
|
||||
// table sort example
|
||||
// ==================
|
||||
|
||||
$("#sortTableExample").tablesorter( {sortList: [[1,0]]} );
|
||||
$("#sortTableExample").tablesorter( { sortList: [[ 1, 0 ]] } )
|
||||
|
||||
|
||||
// add on logic
|
||||
// ============
|
||||
|
||||
$('.add-on :checkbox').click(function() {
|
||||
$('.add-on :checkbox').click(function () {
|
||||
if ($(this).attr('checked')) {
|
||||
$(this).parents('.add-on').addClass('active');
|
||||
$(this).parents('.add-on').addClass('active')
|
||||
} else {
|
||||
$(this).parents('.add-on').removeClass('active');
|
||||
$(this).parents('.add-on').removeClass('active')
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
// Disable certain links in docs
|
||||
// =============================
|
||||
|
||||
$('ul.tabs a, ul.pills a, .pagination a, .well .btn, .actions .btn, .alert-message .btn, a.close').click(function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
$('ul.tabs a, ul.pills a, .pagination a, .well .btn, .actions .btn, .alert-message .btn, a.close').click(function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
// Copy code blocks in docs
|
||||
$(".copy-code").focus(function() {
|
||||
$(".copy-code").focus(function () {
|
||||
var el = this;
|
||||
// push select to event loop for chrome :{o
|
||||
setTimeout(function () { $(el).select(); }, 1);
|
||||
});
|
||||
|
||||
|
||||
// POSITION TWIPSIES
|
||||
// =================
|
||||
// POSITION STATIC TWIPSIES
|
||||
// ========================
|
||||
|
||||
$('.twipsies.well a').each(function () {
|
||||
var type = this.title
|
||||
@ -128,7 +78,6 @@ $(document).ready(function(){
|
||||
}
|
||||
|
||||
$twipsy.css(offset[type])
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
6
docs/assets/js/bootstrap-dropdown.js
vendored
6
docs/assets/js/bootstrap-dropdown.js
vendored
@ -3,8 +3,10 @@
|
||||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var selector = 'a.menu, .dropdown-toggle'
|
||||
|
||||
function clearMenus() {
|
||||
$('a.menu').parent('li').removeClass('open')
|
||||
$(selector).parent('li').removeClass('open')
|
||||
}
|
||||
|
||||
$(function () {
|
||||
@ -13,7 +15,7 @@
|
||||
|
||||
$.fn.dropdown = function ( options ) {
|
||||
return this.each(function () {
|
||||
$(this).delegate('a.menu', 'click', function (e) {
|
||||
$(this).delegate(selector, 'click', function (e) {
|
||||
clearMenus()
|
||||
$(this).parent('li').toggleClass('open')
|
||||
return false
|
||||
|
0
docs/assets/js/bootstrap-scrollspy.js
vendored
Normal file
0
docs/assets/js/bootstrap-scrollspy.js
vendored
Normal file
38
docs/assets/js/bootstrap-tabs.js
vendored
Normal file
38
docs/assets/js/bootstrap-tabs.js
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
(function( $ ){
|
||||
|
||||
function activate ( element, container ) {
|
||||
container.find('.active').removeClass('active')
|
||||
element.addClass('active')
|
||||
}
|
||||
|
||||
function tab( e ) {
|
||||
var $this = $(this)
|
||||
, href = $this.attr('href')
|
||||
, $ul = $(e.liveFired)
|
||||
, $controlled
|
||||
|
||||
if (/^#/.test(href)) {
|
||||
e.preventDefault()
|
||||
|
||||
if ($this.hasClass('active')) {
|
||||
return
|
||||
}
|
||||
|
||||
$controlled = $('#' + $ul.attr('aria-controls'))
|
||||
|
||||
activate($this.parent('li'), $ul)
|
||||
activate($(href, $controlled), $controlled)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TABS/PILLS PLUGIN DEFINITION
|
||||
* ============================ */
|
||||
|
||||
$.fn.tabs = $.fn.pills = function () {
|
||||
return this.each(function () {
|
||||
$(this).delegate('.tabs > li > a, .pills > li > a', 'click', tab)
|
||||
})
|
||||
}
|
||||
|
||||
})( jQuery || ender )
|
@ -20,7 +20,10 @@
|
||||
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
|
||||
<script src="http://autobahn.tablesorter.com/jquery.tablesorter.min.js"></script>
|
||||
<script src="assets/js/google-code-prettify/prettify.js"></script>
|
||||
<script>$(function () { prettyPrint() })</script>
|
||||
<script src="assets/js/bootstrap-dropdown.js"></script>
|
||||
<script src="assets/js/application.js"></script>
|
||||
<script src="assets/js/application-scrollspy.js"></script>
|
||||
|
||||
<!-- Le fav and touch icons -->
|
||||
<link rel="shortcut icon" href="images/favicon.ico">
|
||||
@ -1356,6 +1359,10 @@ Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> verita
|
||||
<td><a href="./javascript.html#dropdowns">bootstrap-dropdown.js</a></td>
|
||||
<td>This plugin is for adding dropdown to the bootstrap nav.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="./javascript.html#tabs">bootstrap-tabs.js</a></td>
|
||||
<td>This plugin adds quick, dynamic tab and pill functionality.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="./javascript.html#twipsy">bootstrap-twipsy.js</a></td>
|
||||
<td>Based on the excellent jQuery.tipsy plugin written by Jason Frame; twipsy is an updated version, which doesn't rely on images, uses css3 for animations, and data-attributes for title storage!</td>
|
||||
|
@ -15,11 +15,13 @@
|
||||
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
|
||||
<script src="assets/js/google-code-prettify/prettify.js"></script>
|
||||
<script>$(function () { prettyPrint() })</script>
|
||||
<script src="assets/js/application-scrollspy.js"></script>
|
||||
<script src="assets/js/bootstrap-modal.js"></script>
|
||||
<script src="assets/js/bootstrap-alerts.js"></script>
|
||||
<script src="assets/js/bootstrap-twipsy.js"></script>
|
||||
<script src="assets/js/bootstrap-popover.js"></script>
|
||||
<script src="assets/js/bootstrap-dropdown.js"></script>
|
||||
<script src="assets/js/bootstrap-tabs.js"></script>
|
||||
|
||||
<!-- Le styles -->
|
||||
<link href="../bootstrap-1.3.0.css" rel="stylesheet">
|
||||
@ -45,6 +47,7 @@
|
||||
<li><a href="#modal">Modals</a></li>
|
||||
<li><a href="#alerts">Alerts</a></li>
|
||||
<li><a href="#dropdown">Dropdown</a></li>
|
||||
<li><a href="#tabs">Tabs</a></li>
|
||||
<li><a href="#twipsy">Twipsy</a></li>
|
||||
<li><a href="#popover">Popover</a></li>
|
||||
</ul>
|
||||
@ -233,6 +236,73 @@ $('#modal-content').modal({
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Tabs
|
||||
================================================== -->
|
||||
|
||||
<section id="tabs">
|
||||
<div class="page-header">
|
||||
<h1>Tabs <small>bootstrap-tabs.js</small></h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span4 columns">
|
||||
<p>This plugin adds quick, dynamic tab and pill functionality.</p>
|
||||
<a href="assets/js/bootstrap-tabs.js" target="_blank" class="btn primary">Download</a>
|
||||
</div>
|
||||
<div class="span12 columns">
|
||||
<h2>Using boostrap-tabs.js</h2>
|
||||
<pre class="prettyprint linenums">$('.tabs').tabs()</pre>
|
||||
<h3>Method</h3>
|
||||
<h4>$().tabs or $().pills</h4>
|
||||
<p>
|
||||
Activates tab and pill functionality for a given container.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Note:</strong> The controlled container is defined by a required <code>aria-controls</code> attribute added to your <code>.tabs</code> or <code>.pills</code>. The <a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-controls">aria-controls</a> attribute must reference an element's id.
|
||||
<pre class="prettyprint linenums">
|
||||
<ul class="tabs" aria-controls="my-pill-content">
|
||||
<li class="active"><a href="#home">Home</a></li>
|
||||
<li><a href="#profile">Profile</a></li>
|
||||
<li><a href="#messages">Messages</a></li>
|
||||
<li><a href="#settings">Settings</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="pill-content" id="my-pill-content">
|
||||
<div class="active" id="home">...</div>
|
||||
<div id="profile">...</div>
|
||||
<div id="messages">...</div>
|
||||
<div id="settings">...</div>
|
||||
</ul></pre>
|
||||
</p>
|
||||
<h3>Demo</h3>
|
||||
<script>
|
||||
$(function () {
|
||||
$('.tabs').tabs()
|
||||
})
|
||||
</script>
|
||||
<ul class="tabs" aria-controls="my-tab-content">
|
||||
<li class="active"><a href="#home">Home</a></li>
|
||||
<li><a href="#profile">Profile</a></li>
|
||||
<li><a href="#messages">Messages</a></li>
|
||||
<li><a href="#settings">Settings</a></li>
|
||||
</ul>
|
||||
<div id="my-tab-content" class="tab-content">
|
||||
<p class="active" id="home">
|
||||
Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.
|
||||
</p>
|
||||
<p id="profile">
|
||||
Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.
|
||||
</p>
|
||||
<p id="messages">
|
||||
Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.
|
||||
</p>
|
||||
<p id="settings">
|
||||
Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Tips
|
||||
================================================== -->
|
||||
|
||||
|
@ -401,6 +401,16 @@ a.menu:after,
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content > *,
|
||||
.pill-content > * {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content > .active,
|
||||
.pill-content > .active {
|
||||
display:block;
|
||||
}
|
||||
|
||||
|
||||
// BREADCRUMBS
|
||||
// -----------
|
||||
|
Loading…
Reference in New Issue
Block a user