Permalink
Browse files

Twitter Bootstrap

Added Twitter's Bootstrap with LESS CSS. Still learning but it's very,
very nice!
  • Loading branch information...
1 parent 220d99b commit f2b0236d056fc3315ec5af41ff3799c1a580838b @nbannist committed Mar 22, 2012
Showing with 18,505 additions and 147 deletions.
  1. +2 −0 .gitignore
  2. +15 −4 app.yaml
  3. BIN docutils/parsers/rst/.DS_Store
  4. BIN static/images/bootstrap/glyphicons-halflings-white.png
  5. BIN static/images/bootstrap/glyphicons-halflings.png
  6. +106 −0 static/scripts/js/libs/bootstrap/README.md
  7. +94 −0 static/scripts/js/libs/bootstrap/bootstrap-alert.js
  8. +100 −0 static/scripts/js/libs/bootstrap/bootstrap-button.js
  9. +161 −0 static/scripts/js/libs/bootstrap/bootstrap-carousel.js
  10. +138 −0 static/scripts/js/libs/bootstrap/bootstrap-collapse.js
  11. +92 −0 static/scripts/js/libs/bootstrap/bootstrap-dropdown.js
  12. +210 −0 static/scripts/js/libs/bootstrap/bootstrap-modal.js
  13. +95 −0 static/scripts/js/libs/bootstrap/bootstrap-popover.js
  14. +125 −0 static/scripts/js/libs/bootstrap/bootstrap-scrollspy.js
  15. +130 −0 static/scripts/js/libs/bootstrap/bootstrap-tab.js
  16. +270 −0 static/scripts/js/libs/bootstrap/bootstrap-tooltip.js
  17. +51 −0 static/scripts/js/libs/bootstrap/bootstrap-transition.js
  18. +271 −0 static/scripts/js/libs/bootstrap/bootstrap-typeahead.js
  19. +49 −0 static/scripts/js/libs/bootstrap/tests/index.html
  20. +41 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-alert.js
  21. +77 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-button.js
  22. +25 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-collapse.js
  23. +53 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-dropdown.js
  24. +85 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-modal.js
  25. +93 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-popover.js
  26. +31 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-scrollspy.js
  27. +45 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-tab.js
  28. +62 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-tooltip.js
  29. +13 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-transition.js
  30. +132 −0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-typeahead.js
  31. +9,252 −0 static/scripts/js/libs/bootstrap/tests/vendor/jquery.js
  32. +232 −0 static/scripts/js/libs/bootstrap/tests/vendor/qunit.css
  33. +1,510 −0 static/scripts/js/libs/bootstrap/tests/vendor/qunit.js
  34. 0 static/{ → scripts}/js/libs/dd_belatedpng.js
  35. BIN static/{css/sourcecode → scripts/js/libs/google-code-prettify}/.DS_Store
  36. +2 −0 static/scripts/js/libs/google-code-prettify/lang-apollo.js
  37. +18 −0 static/scripts/js/libs/google-code-prettify/lang-clj.js
  38. +2 −0 static/scripts/js/libs/google-code-prettify/lang-css.js
  39. +1 −0 static/scripts/js/libs/google-code-prettify/lang-go.js
  40. +2 −0 static/scripts/js/libs/google-code-prettify/lang-hs.js
  41. +3 −0 static/scripts/js/libs/google-code-prettify/lang-lisp.js
  42. +2 −0 static/scripts/js/libs/google-code-prettify/lang-lua.js
  43. +2 −0 static/scripts/js/libs/google-code-prettify/lang-ml.js
  44. +4 −0 static/scripts/js/libs/google-code-prettify/lang-n.js
  45. +1 −0 static/scripts/js/libs/google-code-prettify/lang-proto.js
  46. +2 −0 static/scripts/js/libs/google-code-prettify/lang-scala.js
  47. +2 −0 static/scripts/js/libs/google-code-prettify/lang-sql.js
  48. +1 −0 static/scripts/js/libs/google-code-prettify/lang-tex.js
  49. +2 −0 static/scripts/js/libs/google-code-prettify/lang-vb.js
  50. +3 −0 static/scripts/js/libs/google-code-prettify/lang-vhdl.js
  51. +2 −0 static/scripts/js/libs/google-code-prettify/lang-wiki.js
  52. +3 −0 static/scripts/js/libs/google-code-prettify/lang-xq.js
  53. +2 −0 static/scripts/js/libs/google-code-prettify/lang-yaml.js
  54. +28 −0 static/scripts/js/libs/google-code-prettify/prettify.js
  55. 0 static/{ → scripts}/js/libs/jquery-1.4.2.js
  56. 0 static/{ → scripts}/js/libs/jquery-1.4.2.min.js
  57. 0 static/{ → scripts}/js/libs/jquery-1.7.js
  58. 0 static/{ → scripts}/js/libs/jquery-1.7.min.js
  59. +9 −0 static/scripts/js/libs/less-1.3.0.min.js
  60. 0 static/{ → scripts}/js/libs/modernizr-1.6.min.js
  61. 0 static/{ → scripts}/js/mylibs/.gitignore
  62. 0 static/{ → scripts}/js/plugins.js
  63. BIN static/{ → scripts}/js/profiling/charts.swf
  64. 0 static/{ → scripts}/js/profiling/config.js
  65. 0 static/{ → scripts}/js/profiling/yahoo-profiling.css
  66. 0 static/{ → scripts}/js/profiling/yahoo-profiling.min.js
  67. 0 static/{ → scripts}/js/script.js
  68. 0 static/{css → styles/css/old}/1140.css
  69. 0 static/{css → styles/css/old}/handheld.css
  70. 0 static/{css → styles/css/old}/htmlboilerplate.css
  71. 0 static/{css → styles/css/old}/ie.css
  72. 0 static/{css → styles/css/old}/layout.css
  73. 0 static/{css → styles/css/old}/mobile.css
  74. 0 static/{css → styles/css/old}/smallerscreen.css
  75. 0 static/{css → styles/css/old}/sourcecode/README.rst
  76. 0 static/{css → styles/css/old}/sourcecode/autumn.css
  77. 0 static/{css → styles/css/old}/sourcecode/borland.css
  78. 0 static/{css → styles/css/old}/sourcecode/bw.css
  79. 0 static/{css → styles/css/old}/sourcecode/colorful.css
  80. 0 static/{css → styles/css/old}/sourcecode/default.css
  81. 0 static/{css → styles/css/old}/sourcecode/emacs.css
  82. 0 static/{css → styles/css/old}/sourcecode/friendly.css
  83. 0 static/{css → styles/css/old}/sourcecode/fruity.css
  84. 0 static/{css → styles/css/old}/sourcecode/manni.css
  85. 0 static/{css → styles/css/old}/sourcecode/murphy.css
  86. 0 static/{css → styles/css/old}/sourcecode/native.css
  87. 0 static/{css → styles/css/old}/sourcecode/pastie.css
  88. 0 static/{css → styles/css/old}/sourcecode/perldoc.css
  89. 0 static/{css → styles/css/old}/sourcecode/tango.css
  90. 0 static/{css → styles/css/old}/sourcecode/trac.css
  91. 0 static/{css → styles/css/old}/sourcecode/vim.css
  92. 0 static/{css → styles/css/old}/sourcecode/vs.css
  93. 0 static/{css → styles/css/old}/styles.css
  94. 0 static/{css → styles/css/old}/typeimg.css
  95. +1 −0 static/styles/css/prettify.css
  96. BIN static/{css → styles/less/bootstrap}/.DS_Store
  97. +28 −0 static/styles/less/bootstrap/accordion.less
  98. +58 −0 static/styles/less/bootstrap/alerts.less
  99. +36 −0 static/styles/less/bootstrap/badges.less
  100. +65 −0 static/styles/less/bootstrap/bootstrap.less
  101. +24 −0 static/styles/less/bootstrap/breadcrumbs.less
  102. +172 −0 static/styles/less/bootstrap/button-groups.less
  103. +187 −0 static/styles/less/bootstrap/buttons.less
  104. +121 −0 static/styles/less/bootstrap/carousel.less
  105. +18 −0 static/styles/less/bootstrap/close.less
  106. +57 −0 static/styles/less/bootstrap/code.less
  107. +20 −0 static/styles/less/bootstrap/component-animations.less
  108. +148 −0 static/styles/less/bootstrap/dropdowns.less
  109. +555 −0 static/styles/less/bootstrap/forms.less
  110. +5 −0 static/styles/less/bootstrap/grid.less
  111. +22 −0 static/styles/less/bootstrap/hero-unit.less
  112. +38 −0 static/styles/less/bootstrap/labels.less
  113. +17 −0 static/styles/less/bootstrap/layouts.less
  114. +634 −0 static/styles/less/bootstrap/mixins.less
  115. +90 −0 static/styles/less/bootstrap/modals.less
  116. +341 −0 static/styles/less/bootstrap/navbar.less
  117. +363 −0 static/styles/less/bootstrap/navs.less
  118. +36 −0 static/styles/less/bootstrap/pager.less
  119. +56 −0 static/styles/less/bootstrap/pagination.less
  120. +49 −0 static/styles/less/bootstrap/popovers.less
  121. +109 −0 static/styles/less/bootstrap/progress-bars.less
  122. +126 −0 static/styles/less/bootstrap/reset.less
  123. +371 −0 static/styles/less/bootstrap/responsive.less
  124. +29 −0 static/styles/less/bootstrap/scaffolding.less
  125. +158 −0 static/styles/less/bootstrap/sprites.less
  126. +159 −0 static/styles/less/bootstrap/tables.less
  127. +35 −0 static/styles/less/bootstrap/thumbnails.less
  128. +35 −0 static/styles/less/bootstrap/tooltip.less
  129. +234 −0 static/styles/less/bootstrap/type.less
  130. +23 −0 static/styles/less/bootstrap/utilities.less
  131. +201 −0 static/styles/less/bootstrap/variables.less
  132. +27 −0 static/styles/less/bootstrap/wells.less
  133. +97 −0 static/styles/less/styles.less
  134. +54 −91 views/global_master_page.html
  135. +55 −52 views/hello_world.html
View
@@ -0,0 +1,2 @@
+
+static/.DS_Store
View
@@ -22,13 +22,24 @@ handlers:
# JavaScript
- url: /js/(.*\.js)
- static_files: static/js/\1
- upload: static/js/(.*\.js)
+ static_files: static/scripts/js/\1
+ upload: static/scripts/js/(.*\.js)
+
+- url: /js/(.*\.js)
+ static_files: static/scripts/js/libs/google-code-prettify/\1
+ upload: static/scripts/js/libs/google-code-prettify/(.*\.js)
# StyleSheets
+
+ # CSS
- url: /css/(.*\.css)
- static_files: static/css/\1
- upload: static/css/(.*\.css)
+ static_files: static/styles/css/\1
+ upload: static/styles/css/(.*\.css)
+
+ #LESS
+- url: /less/(.*\.less)
+ static_files: static/styles/less/\1
+ upload: static/styles/less/(.*\.less)
# Images
- url: /(.*\.(gif|png|jpg|jpeg))
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,106 @@
+## 2.0 BOOTSTRAP JS PHILOSOPHY
+These are the high-level design rules which guide the development of Bootstrap's plugin apis.
+
+---
+
+### DATA-ATTRIBUTE API
+
+We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
+
+We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
+
+ $('body').off('.data-api')
+
+To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
+
+ $('body').off('.alert.data-api')
+
+---
+
+### PROGRAMATIC API
+
+We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
+
+All public APIs should be single, chainable methods, and return the collection acted upon.
+
+ $(".btn.danger").button("toggle").addClass("fat")
+
+All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
+
+ $("#myModal").modal() // initialized with defaults
+ $("#myModal").modal({ keyboard: false }) // initialized with no keyboard
+ $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
+
+---
+
+### OPTIONS
+
+Options should be sparse and add universal value. We should pick the right defaults.
+
+All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`.
+
+ $.fn.modal.defaults = { … }
+
+An options definition should take the following form:
+
+ *noun*: *adjective* - describes or modifies a quality of an instance
+
+examples:
+
+ backdrop: true
+ keyboard: false
+ placement: 'top'
+
+---
+
+### EVENTS
+
+All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
+
+ show | shown
+ hide | hidden
+
+---
+
+### CONSTRUCTORS
+
+Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way:
+
+
+ $.fn.popover.Constructor
+
+---
+
+### DATA ACCESSOR
+
+Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
+
+ $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
+
+---
+
+### DATA ATTRIBUTES
+
+Data attributes should take the following form:
+
+- data-{{verb}}={{plugin}} - defines main interaction
+- data-target || href^=# - defined on "control" element (if element controls an element other than self)
+- data-{{noun}} - defines class instance options
+
+examples:
+
+ // control other targets
+ data-toggle="modal" data-target="#foo"
+ data-toggle="collapse" data-target="#foo" data-parent="#bar"
+
+ // defined on element they control
+ data-spy="scroll"
+
+ data-dismiss="modal"
+ data-dismiss="alert"
+
+ data-toggle="dropdown"
+
+ data-toggle="button"
+ data-toggle="buttons-checkbox"
+ data-toggle="buttons-radio"
@@ -0,0 +1,94 @@
+/* ==========================================================
+ * bootstrap-alert.js v2.0.2
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var dismiss = '[data-dismiss="alert"]'
+ , Alert = function ( el ) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.prototype = {
+
+ constructor: Alert
+
+ , close: function ( e ) {
+ var $this = $(this)
+ , selector = $this.attr('data-target')
+ , $parent
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+ $parent.trigger('close')
+
+ e && e.preventDefault()
+
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+ $parent
+ .trigger('close')
+ .removeClass('in')
+
+ function removeElement() {
+ $parent
+ .trigger('closed')
+ .remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent.on($.support.transition.end, removeElement) :
+ removeElement()
+ }
+
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.alert = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('alert')
+ if (!data) $this.data('alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.alert.Constructor = Alert
+
+
+ /* ALERT DATA-API
+ * ============== */
+
+ $(function () {
+ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
+ })
+
+}( window.jQuery );
@@ -0,0 +1,100 @@
+/* ============================================================
+ * bootstrap-button.js v2.0.2
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+!function( $ ){
+
+ "use strict"
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+ * ============================== */
+
+ var Button = function ( element, options ) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.button.defaults, options)
+ }
+
+ Button.prototype = {
+
+ constructor: Button
+
+ , setState: function ( state ) {
+ var d = 'disabled'
+ , $el = this.$element
+ , data = $el.data()
+ , val = $el.is('input') ? 'val' : 'html'
+
+ state = state + 'Text'
+ data.resetText || $el.data('resetText', $el[val]())
+
+ $el[val](data[state] || this.options[state])
+
+ // push to event loop to allow forms to submit
+ setTimeout(function () {
+ state == 'loadingText' ?
+ $el.addClass(d).attr(d, d) :
+ $el.removeClass(d).removeAttr(d)
+ }, 0)
+ }
+
+ , toggle: function () {
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
+
+ $parent && $parent
+ .find('.active')
+ .removeClass('active')
+
+ this.$element.toggleClass('active')
+ }
+
+ }
+
+
+ /* BUTTON PLUGIN DEFINITION
+ * ======================== */
+
+ $.fn.button = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('button')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('button', (data = new Button(this, options)))
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ $.fn.button.defaults = {
+ loadingText: 'loading...'
+ }
+
+ $.fn.button.Constructor = Button
+
+
+ /* BUTTON DATA-API
+ * =============== */
+
+ $(function () {
+ $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
+ })
+ })
+
+}( window.jQuery );
Oops, something went wrong. Retry.

0 comments on commit f2b0236

Please sign in to comment.