Commit 4737d693 authored by Jacob Thornton's avatar Jacob Thornton

remove quick start section to simplify landing page + start rewriting application js to work ie7

parent 4a7d8de2
...@@ -1986,7 +1986,7 @@ table .span12 { ...@@ -1986,7 +1986,7 @@ table .span12 {
.navbar-search .search-query :-moz-placeholder { .navbar-search .search-query :-moz-placeholder {
color: #eeeeee; color: #eeeeee;
} }
.navbar-search .search-query ::-webkit-input-placeholder { .navbar-search .search-query::-webkit-input-placeholder {
color: #eeeeee; color: #eeeeee;
} }
.navbar-search .search-query:hover { .navbar-search .search-query:hover {
......
$(function(){ // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
// IT'S ALL JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT !function ($) {
// IT'S ALL JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
$(function(){
// Hide the Mobile Safari address bar once loaded
// ==============================================
// Set a timeout... // Disable certain links in docs
// setTimeout(function(){ $('section [href^=#]').click(function (e) {
// // Hide the address bar! e.preventDefault()
// window.scrollTo(0, 1); })
// }, 0);
// table sort example
// ==================
// make code pretty // make code pretty
window.prettyPrint && prettyPrint() window.prettyPrint && prettyPrint()
// table sort example // table sort example
if ($.fn.tablesorter) { if ($.fn.tablesorter) {
$("#sortTableExample").tablesorter( { sortList: [[ 1, 0 ]] } ) $("#sortTableExample").tablesorter({ sortList: [[1,0]] })
$(".tablesorter-example").tablesorter({ sortList: [[1,0]] }) $(".tablesorter-example").tablesorter({ sortList: [[1,0]] })
} }
// add on logic // add-ons
$('.add-on :checkbox').on('click', function () { $('.add-on :checkbox').on('click', function () {
var $this = $(this) var $this = $(this)
, method = $this.attr('checked') ? 'addClass' : 'removeClass' , method = $this.attr('checked') ? 'addClass' : 'removeClass'
$(this).parents('.add-on')[method]('active') $(this).parents('.add-on')[method]('active')
}) })
// Disable certain links in docs
// Please do not carry these styles over to your projects
// it's merely here to prevent button clicks form taking you
// away from your spot on page!!
$('section [href^=#]').click(function (e) {
e.preventDefault()
})
// Copy code blocks in docs
$(".copy-code").on('focus', function () {
var el = this
setTimeout(function () { $(el).select() }, 0)
})
if ($.fn.tooltip) { if ($.fn.tooltip) {
// position static twipsies for components page // position static twipsies for components page
...@@ -76,7 +55,6 @@ $(function(){ ...@@ -76,7 +55,6 @@ $(function(){
} }
} }
// fix sub nav playa // fix sub nav playa
var $win = $(window) var $win = $(window)
, $nav = $('.subnav') , $nav = $('.subnav')
...@@ -101,131 +79,133 @@ $(function(){ ...@@ -101,131 +79,133 @@ $(function(){
}) })
// JS for javascript demos // JS for javascript demos
$(function () { // $(function () {
// tooltip demo // // tooltip demo
$('.tooltip-demo.well').tooltip({ // $('.tooltip-demo.well').tooltip({
selector: "a[rel=tooltip]" // selector: "a[rel=tooltip]"
}) // })
$('.tooltip-test').tooltip({ // $('.tooltip-test').tooltip({
'z-index': 3000 // 'z-index': 3000
}) // })
$('.popover-test').popover({ // $('.popover-test').popover({
'z-index': 3000 // 'z-index': 3000
}) // })
// popover demo // // popover demo
$("a[rel=popover]") // $("a[rel=popover]")
.popover() // .popover()
.click(function(e) { // .click(function(e) {
e.preventDefault() // e.preventDefault()
}) // })
// button state demo // // button state demo
$('#fat-btn') // $('#fat-btn')
.click(function () { // .click(function () {
var btn = $(this) // var btn = $(this)
btn.button('loading') // btn.button('loading')
setTimeout(function () { // setTimeout(function () {
btn.button('reset') // btn.button('reset')
}, 3000) // }, 3000)
}) // })
// carousel demo // // carousel demo
$('#myCarousel').carousel() // $('#myCarousel').carousel()
})
// })
// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
// by the talented Ben Vinegar // // Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
!function($) { // // by the talented Ben Vinegar
$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) { // !function($) {
var url = opts.url; // $.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
// var url = opts.url;
return {
send: function(_, completeCallback) { // return {
var name = 'jQuery_iframe_' + jQuery.now() // send: function(_, completeCallback) {
, iframe, form // var name = 'jQuery_iframe_' + jQuery.now()
// , iframe, form
iframe = $('<iframe>')
.attr('name', name) // iframe = $('<iframe>')
.appendTo('head') // .attr('name', name)
// .appendTo('head')
form = $('<form>')
.attr('method', opts.type) // GET or POST // form = $('<form>')
.attr('action', url) // .attr('method', opts.type) // GET or POST
.attr('target', name) // .attr('action', url)
// .attr('target', name)
$.each(opts.params, function(k, v) {
// $.each(opts.params, function(k, v) {
$('<input>')
.attr('type', 'hidden') // $('<input>')
.attr('name', k) // .attr('type', 'hidden')
.attr('value', typeof v == 'string' ? v : JSON.stringify(v)) // .attr('name', k)
.appendTo(form) // .attr('value', typeof v == 'string' ? v : JSON.stringify(v))
}) // .appendTo(form)
// })
form.appendTo('body').submit()
} // form.appendTo('body').submit()
} // }
}) // }
}(jQuery); // })
// }(jQuery);
// javascript build logic
// // javascript build logic
$(function () {
// $(function () {
var inputsComponent = $("#components.download input")
, inputsPlugin = $("#plugins.download input") // var inputsComponent = $("#components.download input")
, inputsVariables = $("#variables.download input") // , inputsPlugin = $("#plugins.download input")
// , inputsVariables = $("#variables.download input")
// toggle all plugin checkboxes
$('#components.download .toggle-all').on('click', function (e) { // // toggle all plugin checkboxes
e.preventDefault() // $('#components.download .toggle-all').on('click', function (e) {
inputsComponent.attr('checked', !inputsComponent.is(':checked')) // e.preventDefault()
}) // inputsComponent.attr('checked', !inputsComponent.is(':checked'))
// })
$('#plugins.download .toggle-all').on('click', function (e) {
e.preventDefault() // $('#plugins.download .toggle-all').on('click', function (e) {
inputsPlugin.attr('checked', !inputsPlugin.is(':checked')) // e.preventDefault()
}) // inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
// })
$('#variables.download .toggle-all').on('click', function (e) {
e.preventDefault() // $('#variables.download .toggle-all').on('click', function (e) {
inputsVariables.val('') // e.preventDefault()
}) // inputsVariables.val('')
// })
// request built javascript
$('.download-btn').on('click', function () { // // request built javascript
// $('.download-btn').on('click', function () {
var css = $("#components.download input:checked")
.map(function () { return this.value }) // var css = $("#components.download input:checked")
.toArray() // .map(function () { return this.value })
, js = $("#plugins.download input:checked") // .toArray()
.map(function () { return this.value }) // , js = $("#plugins.download input:checked")
.toArray() // .map(function () { return this.value })
, vars = {} // .toArray()
, img = ['glyphicons-halflings-sprite.png', 'glyphicons-halflings-sprite-white.png'] // , vars = {}
// , img = ['glyphicons-halflings-sprite.png', 'glyphicons-halflings-sprite-white.png']
$("#variables.download input")
.each(function () { // $("#variables.download input")
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) // .each(function () {
}) // $(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
// })
$.ajax({
type: 'POST' // $.ajax({
, url: 'http://bootstrap.herokuapp.com' // type: 'POST'
, dataType: 'jsonpi' // , url: 'http://bootstrap.herokuapp.com'
, params: { // , dataType: 'jsonpi'
branch: '2.0-wip' // , params: {
, js: js // branch: '2.0-wip'
, css: css // , js: js
, vars: vars // , css: css
, img: img // , vars: vars
} // , img: img
}) // }
}) // })
// })
})
// })
}(window.jQuery)
\ No newline at end of file
...@@ -212,39 +212,6 @@ ...@@ -212,39 +212,6 @@
</li> </li>
</ul> </ul>
<hr class="soften">
<!-- Quickstart options
================================================== -->
<h1>Get started in no time.</h1>
<p class="marketing-byline">Quickly start using Bootstrap within your workflow and development process.</p>
<div class="getting-started">
<div class="row">
<div class="span4">
<h3>Prostyle with Node</h3>
<p>If you use Node, download the repo, customize Bootstrap, and run make.</p>
<pre class="prettyprint">
$ git clone git@github.com:twitter/bootstrap.git
$ make</pre>
</div>
<div class="span4">
<h3>Hotlink the CSS</h3>
<p>For the quickest and easiest start, just copy this snippet into your code to get the CSS.</p>
<form>
<textarea class="copy-code" rows="1">&lt;link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.min.css"></textarea>
</form>
</div>
<div class="span4">
<h3>Use LESS.js</h3>
<p>A fan of using LESS? No problem, just link to the appropriate .less and .js files:</p>
<form>
<textarea class="copy-code" rows="2">&lt;link rel="stylesheet/less" href="/path/to/bootstrap.less"&gt;
&lt;script src="/path/to/less.js"&gt;&lt;/script&gt;</textarea>
</form>
</div>
</div><!-- /row -->
</div><!-- /getting-started -->
</div><!-- /.marketing --> </div><!-- /.marketing -->
</div><!-- /#overview --> </div><!-- /#overview -->
......
...@@ -147,38 +147,5 @@ ...@@ -147,38 +147,5 @@
</li> </li>
</ul> </ul>
<hr class="soften">
<!-- Quickstart options
================================================== -->
<h1>{{_i}}Get started in no time.{{/i}}</h1>
<p class="marketing-byline">{{_i}}Quickly start using Bootstrap within your workflow and development process.{{/i}}</p>
<div class="getting-started">
<div class="row">
<div class="span4">
<h3>{{_i}}Prostyle with Node{{/i}}</h3>
<p>{{_i}}If you use Node, download the repo, customize Bootstrap, and run make.{{/i}}</p>
<pre class="prettyprint">
$ git clone git@github.com:twitter/bootstrap.git
$ make</pre>
</div>
<div class="span4">
<h3>{{_i}}Hotlink the CSS{{/i}}</h3>
<p>{{_i}}For the quickest and easiest start, just copy this snippet into your code to get the CSS.{{/i}}</p>
<form>
<textarea class="copy-code" rows="1">&lt;link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.min.css"></textarea>
</form>
</div>
<div class="span4">
<h3>{{_i}}Use LESS.js{{/i}}</h3>
<p>{{_i}}A fan of using LESS? No problem, just link to the appropriate .less and .js files:{{/i}}</p>
<form>
<textarea class="copy-code" rows="2">&lt;link rel="stylesheet/less" href="/path/to/bootstrap.less"&gt;
&lt;script src="/path/to/less.js"&gt;&lt;/script&gt;</textarea>
</form>
</div>
</div><!-- /row -->
</div><!-- /getting-started -->
</div><!-- /.marketing --> </div><!-- /.marketing -->
</div><!-- /#overview --> </div><!-- /#overview -->
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment