Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

init

  • Loading branch information...
commit 02c229c4c8903b56d7dae8e67e3a2bb99a66279a 0 parents
Seyhun Akyürek authored
Showing with 3,618 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +5 −0 Gemfile
  3. +133 −0 README.md
  4. +3 −0  Rakefile
  5. +10 −0 lib/twitter-bootstrap-rails.rb
  6. +9 −0 lib/twitter-bootstrap-rails.rb~
  7. +2 −0  lib/twitter/bootstrap/bootstrap.rb~
  8. +15 −0 lib/twitter/bootstrap/rails/engine.rb
  9. +15 −0 lib/twitter/bootstrap/rails/engine.rb~
  10. +8 −0 lib/twitter/bootstrap/rails/version.rb
  11. +29 −0 twitter-bootstrap-rails.gemspec
  12. +7 −0 vendor/assets/javascripts/bootstrap.js
  13. +15 −0 vendor/assets/javascripts/bootstrap.js~
  14. +104 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-alerts.js
  15. +50 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js
  16. +238 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js
  17. +77 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js
  18. +105 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js
  19. +62 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-tabs.js
  20. +307 −0 vendor/assets/javascripts/twitter/bootstrap/bootstrap-twipsy.js
  21. +1 −0  vendor/assets/stylesheets/twitter/bootstrap.css.less
  22. +2 −0  vendor/assets/stylesheets/twitter/bootstrap.css.less~
  23. +1 −0  vendor/toolkit/twitter/bootstrap.less
  24. 0  vendor/toolkit/twitter/bootstrap.less~
  25. +27 −0 vendor/toolkit/twitter/bootstrap/bootstrap.less
  26. +466 −0 vendor/toolkit/twitter/bootstrap/forms.less
  27. +218 −0 vendor/toolkit/twitter/bootstrap/mixins.less
  28. +1,007 −0 vendor/toolkit/twitter/bootstrap/patterns.less
  29. +142 −0 vendor/toolkit/twitter/bootstrap/reset.less
  30. +136 −0 vendor/toolkit/twitter/bootstrap/scaffolding.less
  31. +171 −0 vendor/toolkit/twitter/bootstrap/tables.less
  32. +188 −0 vendor/toolkit/twitter/bootstrap/type.less
  33. +61 −0 vendor/toolkit/twitter/bootstrap/variables.less
4 .gitignore
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
5 Gemfile
@@ -0,0 +1,5 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in twitter-bootstrap-rails.gemspec
+gemspec
+gem 'less-rails', :path => ENV['LESS_RAILS_PATH'] if ENV['LESS_RAILS_PATH']
133 README.md
@@ -0,0 +1,133 @@
+# Twitter Bootstrap for Rails 3.1 Asset Pipeline
+Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
+It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
+
+
+twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline
+
+
+## Installing Gem
+
+Include Bootstrap in Gemfile;
+
+ gem 'twitter-bootstrap-rails'
+
+or you can install from latest build;
+
+ gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'
+
+You can run bundle from command line
+
+ bundle install
+
+
+## Using with Less
+
+Bootstrap was built with Preboot, an open-source pack of mixins and variables to be used in conjunction with Less,
+a CSS preprocessor for faster and easier web development.
+
+## Using stylesheets with Less
+
+You have to require Bootstrap LESS (bootstrap.less) in your application.css
+
+ /*
+ *= require bootstrap
+ */
+
+ /* Your stylesheets goes here... */
+
+
+Now, you can override LESS files provided by Twitter Bootstrap
+
+ @import "bootstrap";
+
+ // Baseline grid
+ @basefont: 13px;
+ @baseline: 18px;
+
+
+## Using javascripts
+
+You have to require Bootstrap JS (bootstrap.js) in your application.js
+
+ //= require bootstrap
+
+ $(document).ready(function(){
+ /* Your javascripts goes here... */
+ });
+
+
+## Using with coffeescript
+
+Using Twitter Bootstrap with the CoffeeScript is easy.
+Just create a application.js.coffee file to /app/assets/javascripts/ folder and put lines below.
+
+ $ ->
+ $("body > .topbar").scrollSpy()
+ $ ->
+ $(".tabs").tabs()
+ $ ->
+ $("a[rel=twipsy]").twipsy live: true
+ $ ->
+ $("a[rel=popover]").popover offset: 10
+ $ ->
+ $(".topbar-wrapper").dropdown()
+ $ ->
+ $(".alert-message").alert()
+ $ ->
+ domModal = $(".modal").modal(
+ backdrop: true
+ closeOnEscape: true
+ )
+ $(".open-modal").click ->
+ domModal.toggle()
+
+
+## Using Static CSS, JS (w/o Less)
+
+twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest static CSS, JS files.
+
+ You can install from latest build (from branch);
+
+ gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"
+
+
+## Changelog
+<ul>
+ <li>Version 0.0.5 deprecated</li>
+ <li>Asset files updated to latest and removed version numbers</li>
+ <li>Implemented Less::Rails Railtie to use with LESS</li>
+ <li>Fixed railtie to only initialize Less when installed</li>
+ <li>Created new branch for the static version of Bootstrap (w/o Less) - check static branch</li>
+ <li>Added path to support heroku deploy</li>
+</ul>
+
+## Credits
+Seyhun Akyürek - seyhunak [at] gmail com
+
+[Follow me on Twitter](http://twitter.com/seyhunak "Twitter")
+
+
+## Contributors & Patches
+<ul>
+ <li>Daniel Morris</li>
+ <li>Bradly Feeley</li>
+ <li>Guilherme Moreira</li>
+ <li>Alex Behar</li>
+ <li>Brandon Keene</li>
+ <li>Anthony Corcutt</li>
+</ul>
+
+
+## Thanks
+Twitter Bootstrap
+http://twitter.github.com/bootstrap
+
+
+## License
+Copyright (c) 2011 Seyhun Akyürek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
3  Rakefile
@@ -0,0 +1,3 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
+
10 lib/twitter-bootstrap-rails.rb
@@ -0,0 +1,10 @@
+require 'less-rails'
+require "twitter/bootstrap/rails/version"
+require "twitter/bootstrap/rails/engine"
+
+module Twitter
+ module Bootstrap
+ module Rails
+ end
+ end
+end
9 lib/twitter-bootstrap-rails.rb~
@@ -0,0 +1,9 @@
+module Twitter
+ module Bootstrap
+ module Rails
+ end
+ end
+end
+require 'less-rails'
+require "twitter/bootstrap/rails/version"
+require "twitter/bootstrap/rails/engine"
2  lib/twitter/bootstrap/bootstrap.rb~
@@ -0,0 +1,2 @@
+require "twitter/bootstrap/rails/version"
+require "twitter/bootstrap/rails/engine"
15 lib/twitter/bootstrap/rails/engine.rb
@@ -0,0 +1,15 @@
+module Twitter
+ module Bootstrap
+ module Rails
+ class Engine < ::Rails::Engine
+
+ initializer 'twitter-bootstrap-rails.setup',
+ :after => 'less-rails.after.load_config_initializers',
+ :group => :all do |app|
+ app.config.less.paths << File.join(config.root, 'vendor', 'toolkit')
+ end
+
+ end
+ end
+ end
+end
15 lib/twitter/bootstrap/rails/engine.rb~
@@ -0,0 +1,15 @@
+module Twitter
+ module Bootstrap
+ module Rails
+ class Engine < ::Rails::Engine
+ config.after_initialize do |app|
+ # Only run when less is installed
+ if app.config.try(:less)
+ app.config.less.paths << "#{config.root}vendor/stylesheets/bootstrap"
+ app.config.less.paths << "#{config.root}vendor/assets/stylesheets/bootstrap"
+ end
+ end
+ end
+ end
+ end
+end
8 lib/twitter/bootstrap/rails/version.rb
@@ -0,0 +1,8 @@
+module Twitter
+ module Bootstrap
+ module Rails
+ VERSION = "1.3.0"
+ end
+ end
+end
+
29 twitter-bootstrap-rails.gemspec
@@ -0,0 +1,29 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "twitter/bootstrap/rails/version"
+
+Gem::Specification.new do |s|
+ s.name = "twitter-bootstrap-rails"
+ s.version = Twitter::Bootstrap::Rails::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Seyhun Akyurek"]
+ s.email = ["seyhunak@gmail.com"]
+ s.homepage = "https://github.com/seyhunak/twitter-bootstrap-rails"
+ s.summary = %q{Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline}
+ s.description = %q{twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline}
+
+ s.rubyforge_project = "twitter-bootstrap-rails"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib","vendor"]
+
+ s.add_runtime_dependency 'less'
+ s.add_runtime_dependency "less-rails", "~> 2.0.1"
+ s.add_runtime_dependency 'railties'
+ s.add_runtime_dependency 'actionpack'
+ s.add_development_dependency "bundler"
+ s.add_development_dependency 'rails', '~> 3.1.1'
+end
+
7 vendor/assets/javascripts/bootstrap.js
@@ -0,0 +1,7 @@
+//= require twitter/bootstrap/bootstrap-alerts
+//= require twitter/bootstrap/bootstrap-dropdown
+//= require twitter/bootstrap/bootstrap-modal
+//= require twitter/bootstrap/bootstrap-twipsy
+//= require twitter/bootstrap/bootstrap-popover
+//= require twitter/bootstrap/bootstrap-scrollspy
+//= require twitter/bootstrap/bootstrap-tabs
15 vendor/assets/javascripts/bootstrap.js~
@@ -0,0 +1,15 @@
+//= require bootstrap-alerts
+//= require bootstrap-dropdown
+//= require bootstrap-modal
+//= require bootstrap-twipsy
+//= require bootstrap-popover
+//= require bootstrap-scrollspy
+//= require bootstrap-tabs
+
+//= require twitter/bootstrap/bootstrap-alerts
+//= require twitter/bootstrap/bootstrap-dropdown
+//= require twitter/bootstrap/bootstrap-modal
+//= require twitter/bootstrap/twipsy
+//= require twitter/bootstrap/popover
+//= require twitter/bootstrap/scrollspy
+//= require twitter/bootstrap/tabs
104 vendor/assets/javascripts/twitter/bootstrap/bootstrap-alerts.js
@@ -0,0 +1,104 @@
+/* ==========================================================
+ * bootstrap-alerts.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2011 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( $ ){
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var Alert = function ( content, selector ) {
+ this.$element = $(content)
+ .delegate(selector || '.close', 'click', this.close)
+ }
+
+ Alert.prototype = {
+
+ close: function (e) {
+ var $element = $(this).parent('.alert-message')
+
+ e && e.preventDefault()
+ $element.removeClass('in')
+
+ function removeElement () {
+ $element.remove()
+ }
+
+ $.support.transition && $element.hasClass('fade') ?
+ $element.bind(transitionEnd, removeElement) :
+ removeElement()
+ }
+
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.alert = function ( options ) {
+
+ if ( options === true ) {
+ return this.data('alert')
+ }
+
+ return this.each(function () {
+ var $this = $(this)
+
+ if ( typeof options == 'string' ) {
+ return $this.data('alert')[options]()
+ }
+
+ $(this).data('alert', new Alert( this ))
+
+ })
+ }
+
+ $(document).ready(function () {
+ new Alert($('body'), '.alert-message[data-alert] .close')
+ })
+
+}( window.jQuery || window.ender );
50 vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js
@@ -0,0 +1,50 @@
+/* ============================================================
+ * bootstrap-dropdown.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#dropdown
+ * ============================================================
+ * Copyright 2011 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( $ ){
+
+ var d = 'a.menu, .dropdown-toggle'
+
+ function clearMenus() {
+ $(d).parent('li').removeClass('open')
+ }
+
+ $(function () {
+ $('html').bind("click", clearMenus)
+ $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
+ })
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.dropdown = function ( selector ) {
+ return this.each(function () {
+ $(this).delegate(selector || d, 'click', function (e) {
+ var li = $(this).parent('li')
+ , isActive = li.hasClass('open')
+
+ clearMenus()
+ !isActive && li.toggleClass('open')
+ return false
+ })
+ })
+ }
+
+}( window.jQuery || window.ender );
238 vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js
@@ -0,0 +1,238 @@
+/* =========================================================
+ * bootstrap-modal.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#modal
+ * =========================================================
+ * Copyright 2011 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( $ ){
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+
+ /* MODAL PUBLIC CLASS DEFINITION
+ * ============================= */
+
+ var Modal = function ( content, options ) {
+ this.settings = $.extend({}, $.fn.modal.defaults)
+ this.$element = $(content)
+ .delegate('.close', 'click.modal', $.proxy(this.hide, this))
+
+ if ( options ) {
+ $.extend( this.settings, options )
+
+ if ( options.show ) {
+ this.show()
+ }
+ }
+
+ return this
+ }
+
+ Modal.prototype = {
+
+ toggle: function () {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
+
+ , show: function () {
+ var that = this
+ this.isShown = true
+ this.$element.trigger('show')
+
+ escape.call(this)
+ backdrop.call(this, function () {
+ that.$element
+ .appendTo(document.body)
+ .show()
+
+ if ($.support.transition && that.$element.hasClass('fade')) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element
+ .addClass('in')
+ .trigger('shown')
+ })
+
+ return this
+ }
+
+ , hide: function (e) {
+ e && e.preventDefault()
+
+ var that = this
+ this.isShown = false
+
+ escape.call(this)
+
+ this.$element
+ .trigger('hide')
+ .removeClass('in')
+
+ function removeElement () {
+ that.$element
+ .hide()
+ .trigger('hidden')
+
+ backdrop.call(that)
+ }
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$element.one(transitionEnd, removeElement) :
+ removeElement()
+
+ return this
+ }
+
+ }
+
+
+ /* MODAL PRIVATE METHODS
+ * ===================== */
+
+ function backdrop ( callback ) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
+ if ( this.isShown && this.settings.backdrop ) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ .appendTo(document.body)
+
+ if ( this.settings.backdrop != 'static' ) {
+ this.$backdrop.click($.proxy(this.hide, this))
+ }
+
+ if ( doAnimate ) {
+ this.$backdrop[0].offsetWidth // force reflow
+ }
+
+ this.$backdrop.addClass('in')
+
+ doAnimate ?
+ this.$backdrop.one(transitionEnd, callback) :
+ callback()
+
+ } else if ( !this.isShown && this.$backdrop ) {
+ this.$backdrop.removeClass('in')
+
+ function removeElement() {
+ that.$backdrop.remove()
+ that.$backdrop = null
+ }
+
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one(transitionEnd, removeElement) :
+ removeElement()
+ } else if ( callback ) {
+ callback()
+ }
+ }
+
+ function escape() {
+ var that = this
+ if ( this.isShown && this.settings.keyboard ) {
+ $(document).bind('keyup.modal', function ( e ) {
+ if ( e.which == 27 ) {
+ that.hide()
+ }
+ })
+ } else if ( !this.isShown ) {
+ $(document).unbind('keyup.modal')
+ }
+ }
+
+
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.modal = function ( options ) {
+ var modal = this.data('modal')
+
+ if (!modal) {
+
+ if (typeof options == 'string') {
+ options = {
+ show: /show|toggle/.test(options)
+ }
+ }
+
+ return this.each(function () {
+ $(this).data('modal', new Modal(this, options))
+ })
+ }
+
+ if ( options === true ) {
+ return modal
+ }
+
+ if ( typeof options == 'string' ) {
+ modal[options]()
+ } else if ( modal ) {
+ modal.toggle()
+ }
+
+ return this
+ }
+
+ $.fn.modal.Modal = Modal
+
+ $.fn.modal.defaults = {
+ backdrop: false
+ , keyboard: false
+ , show: true
+ }
+
+
+ /* MODAL DATA- IMPLEMENTATION
+ * ========================== */
+
+ $(document).ready(function () {
+ $('body').delegate('[data-controls-modal]', 'click', function (e) {
+ e.preventDefault()
+ var $this = $(this).data('show', true)
+ $('#' + $this.attr('data-controls-modal')).modal( $this.data() )
+ })
+ })
+
+}( window.jQuery || window.ender );
77 vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js
@@ -0,0 +1,77 @@
+/* ===========================================================
+ * bootstrap-popover.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#popover
+ * ===========================================================
+ * Copyright 2011 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( $ ) {
+
+ var Popover = function ( element, options ) {
+ this.$element = $(element)
+ this.options = options
+ this.enabled = true
+ this.fixTitle()
+ }
+
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
+ ========================================= */
+
+ Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
+
+ setContent: function () {
+ var $tip = this.tip()
+ $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
+ $tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
+ $tip[0].className = 'popover'
+ }
+
+ , getContent: function () {
+ var content
+ , $e = this.$element
+ , o = this.options
+
+ if (typeof this.options.content == 'string') {
+ content = $e.attr(o.content)
+ } else if (typeof this.options.content == 'function') {
+ content = this.options.content.call(this.$element[0])
+ }
+ return content
+ }
+
+ , tip: function() {
+ if (!this.$tip) {
+ this.$tip = $('<div class="popover" />')
+ .html('<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>')
+ }
+ return this.$tip
+ }
+
+ })
+
+
+ /* POPOVER PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.popover = function (options) {
+ if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
+ $.fn.twipsy.initWith.call(this, options, Popover, 'popover')
+ return this
+ }
+
+ $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
+
+}( window.jQuery || window.ender );
105 vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js
@@ -0,0 +1,105 @@
+/* =============================================================
+ * bootstrap-scrollspy.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2011 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 ( $ ) {
+
+ var $window = $(window)
+
+ function ScrollSpy( topbar, selector ) {
+ var processScroll = $.proxy(this.processScroll, this)
+ this.$topbar = $(topbar)
+ this.selector = selector || 'li > a'
+ this.refresh()
+ this.$topbar.delegate(this.selector, 'click', processScroll)
+ $window.scroll(processScroll)
+ this.processScroll()
+ }
+
+ ScrollSpy.prototype = {
+
+ refresh: function () {
+ this.targets = this.$topbar.find(this.selector).map(function () {
+ var href = $(this).attr('href')
+ return /^#\w/.test(href) && $(href).length ? href : null
+ })
+
+ this.offsets = $.map(this.targets, function (id) {
+ return $(id).offset().top
+ })
+ }
+
+ , processScroll: function () {
+ var scrollTop = $window.scrollTop() + 10
+ , offsets = this.offsets
+ , targets = this.targets
+ , activeTarget = this.activeTarget
+ , i
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activateButton( targets[i] )
+ }
+ }
+
+ , activateButton: function (target) {
+ this.activeTarget = target
+
+ this.$topbar
+ .find(this.selector).parent('.active')
+ .removeClass('active')
+
+ this.$topbar
+ .find(this.selector + '[href="' + target + '"]')
+ .parent('li')
+ .addClass('active')
+ }
+
+ }
+
+ /* SCROLLSPY PLUGIN DEFINITION
+ * =========================== */
+
+ $.fn.scrollSpy = function( options ) {
+ var scrollspy = this.data('scrollspy')
+
+ if (!scrollspy) {
+ return this.each(function () {
+ $(this).data('scrollspy', new ScrollSpy( this, options ))
+ })
+ }
+
+ if ( options === true ) {
+ return scrollspy
+ }
+
+ if ( typeof options == 'string' ) {
+ scrollspy[options]()
+ }
+
+ return this
+ }
+
+ $(document).ready(function () {
+ $('body').scrollSpy('[data-scrollspy] li > a')
+ })
+
+}( window.jQuery || window.ender );
62 vendor/assets/javascripts/twitter/bootstrap/bootstrap-tabs.js
@@ -0,0 +1,62 @@
+/* ========================================================
+ * bootstrap-tabs.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2011 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( $ ){
+
+ function activate ( element, container ) {
+ container.find('.active').removeClass('active')
+ element.addClass('active')
+ }
+
+ function tab( e ) {
+ var $this = $(this)
+ , href = $this.attr('href')
+ , $ul = $this.closest('ul')
+ , $controlled
+
+ if (/^#\w+/.test(href)) {
+ e.preventDefault()
+
+ if ($this.hasClass('active')) {
+ return
+ }
+
+ $href = $(href)
+
+ activate($this.parent('li'), $ul)
+ activate($href, $href.parent())
+ }
+ }
+
+
+ /* TABS/PILLS PLUGIN DEFINITION
+ * ============================ */
+
+ $.fn.tabs = $.fn.pills = function ( selector ) {
+ return this.each(function () {
+ $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
+ })
+ }
+
+ $(document).ready(function () {
+ $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
+ })
+
+}( window.jQuery || window.ender );
307 vendor/assets/javascripts/twitter/bootstrap/bootstrap-twipsy.js
@@ -0,0 +1,307 @@
+/* ==========================================================
+ * bootstrap-twipsy.js v1.3.0
+ * http://twitter.github.com/bootstrap/javascript.html#twipsy
+ * Adapted from the original jQuery.tipsy by Jason Frame
+ * ==========================================================
+ * Copyright 2011 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( $ ) {
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+
+ /* TWIPSY PUBLIC CLASS DEFINITION
+ * ============================== */
+
+ var Twipsy = function ( element, options ) {
+ this.$element = $(element)
+ this.options = options
+ this.enabled = true
+ this.fixTitle()
+ }
+
+ Twipsy.prototype = {
+
+ show: function() {
+ var pos
+ , actualWidth
+ , actualHeight
+ , placement
+ , $tip
+ , tp
+
+ if (this.getTitle() && this.enabled) {
+ $tip = this.tip()
+ this.setContent()
+
+ if (this.options.animate) {
+ $tip.addClass('fade')
+ }
+
+ $tip
+ .remove()
+ .css({ top: 0, left: 0, display: 'block' })
+ .prependTo(document.body)
+
+ pos = $.extend({}, this.$element.offset(), {
+ width: this.$element[0].offsetWidth
+ , height: this.$element[0].offsetHeight
+ })
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+ placement = _.maybeCall(this.options.placement, this.$element[0])
+
+ switch (placement) {
+ case 'below':
+ tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'above':
+ tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'left':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}
+ break
+ case 'right':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}
+ break
+ }
+
+ $tip
+ .css(tp)
+ .addClass(placement)
+ .addClass('in')
+ }
+ }
+
+ , setContent: function () {
+ var $tip = this.tip()
+ $tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
+ $tip[0].className = 'twipsy'
+ }
+
+ , hide: function() {
+ var that = this
+ , $tip = this.tip()
+
+ $tip.removeClass('in')
+
+ function removeElement () {
+ $tip.remove()
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip.bind(transitionEnd, removeElement) :
+ removeElement()
+ }
+
+ , fixTitle: function() {
+ var $e = this.$element
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
+ }
+ }
+
+ , getTitle: function() {
+ var title
+ , $e = this.$element
+ , o = this.options
+
+ this.fixTitle()
+
+ if (typeof o.title == 'string') {
+ title = $e.attr(o.title == 'title' ? 'data-original-title' : o.title)
+ } else if (typeof o.title == 'function') {
+ title = o.title.call($e[0])
+ }
+
+ title = ('' + title).replace(/(^\s*|\s*$)/, "")
+
+ return title || o.fallback
+ }
+
+ , tip: function() {
+ if (!this.$tip) {
+ this.$tip = $('<div class="twipsy" />').html('<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>')
+ }
+ return this.$tip
+ }
+
+ , validate: function() {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ , enable: function() {
+ this.enabled = true
+ }
+
+ , disable: function() {
+ this.enabled = false
+ }
+
+ , toggleEnabled: function() {
+ this.enabled = !this.enabled
+ }
+
+ }
+
+
+ /* TWIPSY PRIVATE METHODS
+ * ====================== */
+
+ var _ = {
+
+ maybeCall: function ( thing, ctx ) {
+ return (typeof thing == 'function') ? (thing.call(ctx)) : thing
+ }
+
+ }
+
+
+ /* TWIPSY PLUGIN DEFINITION
+ * ======================== */
+
+ $.fn.twipsy = function (options) {
+ $.fn.twipsy.initWith.call(this, options, Twipsy, 'twipsy')
+ return this
+ }
+
+ $.fn.twipsy.initWith = function (options, Constructor, name) {
+ var twipsy
+ , binder
+ , eventIn
+ , eventOut
+
+ if (options === true) {
+ return this.data(name)
+ } else if (typeof options == 'string') {
+ twipsy = this.data(name)
+ if (twipsy) {
+ twipsy[options]()
+ }
+ return this
+ }
+
+ options = $.extend({}, $.fn[name].defaults, options)
+
+ function get(ele) {
+ var twipsy = $.data(ele, name)
+
+ if (!twipsy) {
+ twipsy = new Constructor(ele, $.fn.twipsy.elementOptions(ele, options))
+ $.data(ele, name, twipsy)
+ }
+
+ return twipsy
+ }
+
+ function enter() {
+ var twipsy = get(this)
+ twipsy.hoverState = 'in'
+
+ if (options.delayIn == 0) {
+ twipsy.show()
+ } else {
+ twipsy.fixTitle()
+ setTimeout(function() {
+ if (twipsy.hoverState == 'in') {
+ twipsy.show()
+ }
+ }, options.delayIn)
+ }
+ }
+
+ function leave() {
+ var twipsy = get(this)
+ twipsy.hoverState = 'out'
+ if (options.delayOut == 0) {
+ twipsy.hide()
+ } else {
+ setTimeout(function() {
+ if (twipsy.hoverState == 'out') {
+ twipsy.hide()
+ }
+ }, options.delayOut)
+ }
+ }
+
+ if (!options.live) {
+ this.each(function() {
+ get(this)
+ })
+ }
+
+ if (options.trigger != 'manual') {
+ binder = options.live ? 'live' : 'bind'
+ eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'
+ this[binder](eventIn, enter)[binder](eventOut, leave)
+ }
+
+ return this
+ }
+
+ $.fn.twipsy.Twipsy = Twipsy
+
+ $.fn.twipsy.defaults = {
+ animate: true
+ , delayIn: 0
+ , delayOut: 0
+ , fallback: ''
+ , placement: 'above'
+ , html: false
+ , live: false
+ , offset: 0
+ , title: 'title'
+ , trigger: 'hover'
+ }
+
+ $.fn.twipsy.elementOptions = function(ele, options) {
+ return $.metadata ? $.extend({}, options, $(ele).metadata()) : options
+ }
+
+}( window.jQuery || window.ender );
1  vendor/assets/stylesheets/twitter/bootstrap.css.less
@@ -0,0 +1 @@
+@import "twitter/bootstrap/bootstrap";

With twitter-bootstrap-rails 2.0 replace by this line:
@import "bootstrap/bootstrap.less";
Otherwise a uninitialized constant Less::Rails::ImportProcessor::FileNotFound throw

Seyhun Akyürek Owner
seyhunak added a note

Which Ruby and Rails versions are you using?. I'm not getting any error (Stack, Ruby 1.9.3, Rails 3.2.1) but I'll take a look at it.

Same as your stack on Linux/Ubuntu via RVM. I'll recheck this evening. Maybe I've omitted bundle exec to start my rails server in dev mode ...

Here the fix, in my Gemfile I need to specify a group to twitter-bootstrap-railsgem, like this :
gem 'twitter-bootstrap-rails', :group => :assets
Maybe you can add this instruction in your README ?

Seyhun Akyürek Owner
seyhunak added a note

Ok. Updated README file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2  vendor/assets/stylesheets/twitter/bootstrap.css.less~
@@ -0,0 +1,2 @@
+@import "bootstrap/bootstrap";
+
1  vendor/toolkit/twitter/bootstrap.less
@@ -0,0 +1 @@
+@import "bootstrap/bootstrap.less";
0  vendor/toolkit/twitter/bootstrap.less~
No changes.
27 vendor/toolkit/twitter/bootstrap/bootstrap.less
@@ -0,0 +1,27 @@
+/*!
+ * Bootstrap @VERSION
+ *
+ * Copyright 2011 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ * Date: @DATE
+ */
+
+// CSS Reset
+@import "reset.less";
+
+// Core variables and mixins
+@import "variables.less"; // Modify this for custom colors, font-sizes, etc
+@import "mixins.less";
+
+// Grid system and page structure
+@import "scaffolding.less";
+
+// Styled patterns and elements
+@import "type.less";
+@import "forms.less";
+@import "tables.less";
+@import "patterns.less";
+
466 vendor/toolkit/twitter/bootstrap/forms.less
@@ -0,0 +1,466 @@
+/* Forms.less
+ * Base styles for various input types, form layouts, and states
+ * ------------------------------------------------------------- */
+
+
+// FORM STYLES
+// -----------
+
+form {
+ margin-bottom: @baseline;
+}
+
+// Groups of fields with labels on top (legends)
+fieldset {
+ margin-bottom: @baseline;
+ padding-top: @baseline;
+ legend {
+ display: block;
+ padding-left: 150px;
+ font-size: @basefont * 1.5;
+ line-height: 1;
+ color: @grayDark;
+ *padding: 0 0 5px 145px; /* IE6-7 */
+ *line-height: 1.5; /* IE6-7 */
+ }
+}
+
+// Parent element that clears floats and wraps labels and fields together
+form .clearfix {
+ margin-bottom: @baseline;
+ .clearfix()
+}
+
+// Set font for forms
+label,
+input,
+select,
+textarea {
+ #font > .sans-serif(normal,13px,normal);
+}
+
+// Float labels left
+label {
+ padding-top: 6px;
+ font-size: @basefont;
+ line-height: @baseline;
+ float: left;
+ width: 130px;
+ text-align: right;
+ color: @grayDark;
+}
+
+// Shift over the inside div to align all label's relevant content
+form .input {
+ margin-left: 150px;
+}
+
+// Checkboxs and radio buttons
+input[type=checkbox],
+input[type=radio] {
+ cursor: pointer;
+}
+
+// Inputs, Textareas, Selects
+input,
+textarea,
+select,
+.uneditable-input {
+ display: inline-block;
+ width: 210px;
+ height: @baseline;
+ padding: 4px;
+ font-size: @basefont;
+ line-height: @baseline;
+ color: @gray;
+ border: 1px solid #ccc;
+ .border-radius(3px);
+}
+
+/* mini reset for non-html5 file types */
+input[type=checkbox],
+input[type=radio] {
+ width: auto;
+ height: auto;
+ padding: 0;
+ margin: 3px 0;
+ *margin-top: 0; /* IE6-7 */
+ line-height: normal;
+ border: none;
+}
+
+input[type=file] {
+ background-color: @white;
+ padding: initial;
+ border: initial;
+ line-height: initial;
+ .box-shadow(none);
+}
+
+input[type=button],
+input[type=reset],
+input[type=submit] {
+ width: auto;
+ height: auto;
+}
+
+select,
+input[type=file] {
+ height: @baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size
+ line-height: @baseline * 1.5;
+ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
+}
+
+// Make multiple select elements height not fixed
+select[multiple] {
+ height: inherit;
+}
+
+textarea {
+ height: auto;
+}
+
+// For text that needs to appear as an input but should not be an input
+.uneditable-input {
+ background-color: @white;
+ display: block;
+ border-color: #eee;
+ .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
+ cursor: not-allowed;
+}
+
+// Placeholder text gets special styles; can't be bundled together though for some reason
+:-moz-placeholder {
+ color: @grayLight;
+}
+::-webkit-input-placeholder {
+ color: @grayLight;
+}
+
+// Focus states
+input,
+textarea {
+ @transition: border linear .2s, box-shadow linear .2s;
+ .transition(@transition);
+ .box-shadow(inset 0 1px 3px rgba(0,0,0,.1));
+}
+input:focus,
+textarea:focus {
+ outline: 0;
+ border-color: rgba(82,168,236,.8);
+ @shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
+ .box-shadow(@shadow);
+}
+input[type=file]:focus,
+input[type=checkbox]:focus,
+select:focus {
+ .box-shadow(none); // override for file inputs
+ outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline
+}
+
+// Error styles
+form div.clearfix.error {
+ background: lighten(@red, 57%);
+ padding: 10px 0;
+ margin: -10px 0 10px;
+ .border-radius(4px);
+ @error-text: desaturate(lighten(@red, 25%), 25%);
+ > label,
+ span.help-inline,
+ span.help-block {
+ color: @red;
+ }
+ input,
+ textarea {
+ border-color: @error-text;
+ .box-shadow(0 0 3px rgba(171,41,32,.25));
+ &:focus {
+ border-color: darken(@error-text, 10%);
+ .box-shadow(0 0 6px rgba(171,41,32,.5));
+ }
+ }
+ .input-prepend,
+ .input-append {
+ span.add-on {
+ background: lighten(@red, 50%);
+ border-color: @error-text;
+ color: darken(@error-text, 10%);
+ }
+ }
+}
+
+// Form element sizes
+// TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes
+.input-mini,
+input.mini,
+textarea.mini,
+select.mini {
+ width: 60px;
+}
+.input-small,
+input.small,
+textarea.small,
+select.small {
+ width: 90px;
+}
+.input-medium,
+input.medium,
+textarea.medium,
+select.medium {
+ width: 150px;
+}
+.input-large,
+input.large,
+textarea.large,
+select.large {
+ width: 210px;
+}
+.input-xlarge,
+input.xlarge,
+textarea.xlarge,
+select.xlarge {
+ width: 270px;
+}
+.input-xxlarge,
+input.xxlarge,
+textarea.xxlarge,
+select.xxlarge {
+ width: 530px;
+}
+textarea.xxlarge {
+ overflow-y: auto;
+}
+
+// Grid style input sizes
+// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
+.formColumns(@columnSpan: 1) {
+ display: inline-block;
+ float: none;
+ width: ((@gridColumnWidth - 10) * @columnSpan) + ((@gridColumnWidth - 10) * (@columnSpan - 1));
+ margin-left: 0;
+}
+input,
+textarea,
+select {
+ // Default columns
+ &.span1 { .formColumns(1); }
+ &.span2 { .formColumns(2); }
+ &.span3 { .formColumns(3); }
+ &.span4 { .formColumns(4); }
+ &.span5 { .formColumns(5); }
+ &.span6 { .formColumns(6); }
+ &.span7 { .formColumns(7); }
+ &.span8 { .formColumns(8); }
+ &.span9 { .formColumns(9); }
+ &.span10 { .formColumns(10); }
+ &.span11 { .formColumns(11); }
+ &.span12 { .formColumns(12); }
+ &.span13 { .formColumns(13); }
+ &.span14 { .formColumns(14); }
+ &.span15 { .formColumns(15); }
+ &.span16 { .formColumns(16); }
+}
+
+// Disabled and read-only inputs
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+ background-color: #f5f5f5;
+ border-color: #ddd;
+ cursor: not-allowed;
+}
+
+// Actions (the buttons)
+.actions {
+ background: #f5f5f5;
+ margin-top: @baseline;
+ margin-bottom: @baseline;
+ padding: (@baseline - 1) 20px @baseline 150px;
+ border-top: 1px solid #ddd;
+ .border-radius(0 0 3px 3px);
+ .secondary-action {
+ float: right;
+ a {
+ line-height: 30px;
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+ }
+}
+
+// Help Text
+.help-inline,
+.help-block {
+ font-size: @basefont - 2;
+ line-height: @baseline;
+ color: @grayLight;
+}
+.help-inline {
+ padding-left: 5px;
+ *position: relative; /* IE6-7 */
+ *top: -5px; /* IE6-7 */
+}
+
+// Big blocks of help text
+.help-block {
+ display: block;
+ max-width: 600px;
+}
+
+// Inline Fields (input fields that appear as inline objects
+.inline-inputs {
+ color: @gray;
+ span, input {
+ display: inline-block;
+ }
+ input.mini {
+ width: 60px;
+ }
+ input.small {
+ width: 90px;
+ }
+ span {
+ padding: 0 2px 0 1px;
+ }
+}
+
+// Allow us to put symbols and text within the input field for a cleaner look
+.input-prepend,
+.input-append {
+ input {
+ .border-radius(0 3px 3px 0);
+ }
+ .add-on {
+ position: relative;
+ background: #f5f5f5;
+ border: 1px solid #ccc;
+ z-index: 2;
+ float: left;
+ display: block;
+ width: auto;
+ min-width: 16px;
+ height: 18px;
+ padding: 4px 4px 4px 5px;
+ margin-right: -1px;
+ font-weight: normal;
+ line-height: 18px;
+ color: @grayLight;
+ text-align: center;
+ text-shadow: 0 1px 0 @white;
+ .border-radius(3px 0 0 3px);
+ }
+ .active {
+ background: lighten(@green, 30);
+ border-color: @green;
+ }
+}
+.input-prepend {
+ .add-on {
+ *margin-top: 1px; /* IE6-7 */
+ }
+}
+.input-append {
+ input {
+ float: left;
+ .border-radius(3px 0 0 3px);
+ }
+ .add-on {
+ .border-radius(0 3px 3px 0);
+ margin-right: 0;
+ margin-left: -1px;
+ }
+}
+
+// Stacked options for forms (radio buttons or checkboxes)
+.inputs-list {
+ margin: 0 0 5px;
+ width: 100%;
+ li {
+ display: block;
+ padding: 0;
+ width: 100%;
+ }
+ label {
+ display: block;
+ float: none;
+ width: auto;
+ padding: 0;
+ line-height: @baseline;
+ text-align: left;
+ white-space: normal;
+ strong {
+ color: @gray;
+ }
+ small {
+ font-size: @basefont - 2;
+ font-weight: normal;
+ }
+ }
+ .inputs-list {
+ margin-left: 25px;
+ margin-bottom: 10px;
+ padding-top: 0;
+ }
+ &:first-child {
+ padding-top: 6px;
+ }
+ li + li {
+ padding-top: 2px;
+ }
+ input[type=radio],
+ input[type=checkbox] {
+ margin-bottom: 0;
+ }
+}
+
+// Stacked forms
+.form-stacked {
+ padding-left: 20px;
+ fieldset {
+ padding-top: @baseline / 2;
+ }
+ legend {
+ padding-left: 0;
+ }
+ label {
+ display: block;
+ float: none;
+ width: auto;
+ font-weight: bold;
+ text-align: left;
+ line-height: 20px;
+ padding-top: 0;
+ }
+ .clearfix {
+ margin-bottom: @baseline / 2;
+ div.input {
+ margin-left: 0;
+ }
+ }
+ .inputs-list {
+ margin-bottom: 0;
+ li {
+ padding-top: 0;
+ label {
+ font-weight: normal;
+ padding-top: 0;
+ }
+ }
+ }
+ div.clearfix.error {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ padding-left: 10px;
+ margin-top: 0;
+ margin-left: -10px;
+ }
+ .actions {
+ margin-left: -20px;
+ padding-left: 20px;
+ }
+}
+
218 vendor/toolkit/twitter/bootstrap/mixins.less
@@ -0,0 +1,218 @@
+/* Variables.less
+ * Snippets of reusable CSS to develop faster and keep code readable
+ * ----------------------------------------------------------------- */
+
+
+// Clearfix for clearing floats like a boss h5bp.com/q
+.clearfix() {
+ zoom: 1;
+ &:before,
+ &:after {
+ display: table;
+ content: "";
+ zoom: 1;
+ *display: inline;
+ }
+ &:after {
+ clear: both;
+ }
+}
+
+// Center-align a block level element
+.center-block() {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+// Sizing shortcuts
+.size(@height: 5px, @width: 5px) {
+ height: @height;
+ width: @width;
+}
+.square(@size: 5px) {
+ .size(@size, @size);
+}
+
+// Input placeholder text
+.placeholder(@color: @grayLight) {
+ :-moz-placeholder {
+ color: @color;
+ }
+ ::-webkit-input-placeholder {
+ color: @color;
+ }
+}
+
+// Font Stacks
+#font {
+ .shorthand(@weight: normal, @size: 14px, @lineHeight: 20px) {
+ font-size: @size;
+ font-weight: @weight;
+ line-height: @lineHeight;
+ }
+ .sans-serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: @size;
+ font-weight: @weight;
+ line-height: @lineHeight;
+ }
+ .serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
+ font-family: "Georgia", Times New Roman, Times, serif;
+ font-size: @size;
+ font-weight: @weight;
+ line-height: @lineHeight;
+ }
+ .monospace(@weight: normal, @size: 12px, @lineHeight: 20px) {
+ font-family: "Monaco", Courier New, monospace;
+ font-size: @size;
+ font-weight: @weight;
+ line-height: @lineHeight;
+ }
+}
+
+// Grid System
+.fixed-container() {
+ width: @siteWidth;
+ margin-left: auto;
+ margin-right: auto;
+ .clearfix();
+}
+.columns(@columnSpan: 1) {
+ width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1));
+}
+.offset(@columnOffset: 1) {
+ margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @extraSpace;
+}
+// Necessary grid styles for every column to make them appear next to each other horizontally
+.gridColumn() {
+ display: inline;
+ float: left;
+ margin-left: @gridGutterWidth;
+}
+// makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something
+.makeColumn(@columnSpan: 1) {
+ .gridColumn();
+ .columns(@columnSpan);
+}
+
+// Border Radius
+.border-radius(@radius: 5px) {
+ -webkit-border-radius: @radius;
+ -moz-border-radius: @radius;
+ border-radius: @radius;
+}
+
+// Drop shadows
+.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
+ -webkit-box-shadow: @shadow;
+ -moz-box-shadow: @shadow;
+ box-shadow: @shadow;
+}
+
+// Transitions
+.transition(@transition) {
+ -webkit-transition: @transition;
+ -moz-transition: @transition;
+ -ms-transition: @transition;
+ -o-transition: @transition;
+ transition: @transition;
+}
+
+// Background clipping
+.background-clip(@clip) {
+ -webkit-background-clip: @clip;
+ -moz-background-clip: @clip;
+ background-clip: @clip;
+}
+
+// CSS3 Content Columns
+.content-columns(@columnCount, @columnGap: 20px) {
+ -webkit-column-count: @columnCount;
+ -moz-column-count: @columnCount;
+ column-count: @columnCount;
+ -webkit-column-gap: @columnGap;
+ -moz-column-gap: @columnGap;
+ column-gap: @columnGap;
+}
+
+// Add an alphatransparency value to any background or border color (via Elyse Holladay)
+#translucent {
+ .background(@color: @white, @alpha: 1) {
+ background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
+ }
+ .border(@color: @white, @alpha: 1) {
+ border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
+ background-clip: padding-box;
+ }
+}
+
+// Gradient Bar Colors for buttons and allerts
+.gradientBar(@primaryColor, @secondaryColor) {
+ #gradient > .vertical(@primaryColor, @secondaryColor);
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
+ border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
+}
+
+// Gradients
+#gradient {
+ .horizontal (@startColor: #555, @endColor: #333) {
+ background-color: @endColor;
+ background-repeat: repeat-x;
+ background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror
+ background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
+ background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
+ background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
+ background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
+ background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
+ background-image: linear-gradient(left, @startColor, @endColor); // Le standard
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
+ }
+ .vertical (@startColor: #555, @endColor: #333) {
+ background-color: @endColor;
+ background-repeat: repeat-x;
+ background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
+ background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
+ background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
+ background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
+ background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
+ background-image: linear-gradient(top, @startColor, @endColor); // The standard
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
+ }
+ .directional (@startColor: #555, @endColor: #333, @deg: 45deg) {
+ background-color: @endColor;
+ background-repeat: repeat-x;
+ background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
+ background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10
+ background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
+ background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
+ background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
+ }
+ .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
+ background-color: @endColor;
+ background-repeat: no-repeat;
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
+ background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
+ background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
+ background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor);
+ background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
+ background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback
+ }
+}
+
+// Reset filters for IE
+.reset-filter() {
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
+}
+
+// Opacity
+.opacity(@opacity: 100) {
+ filter: e(%("alpha(opacity=%d)", @opacity));
+ -khtml-opacity: @opacity / 100;
+ -moz-opacity: @opacity / 100;
+ opacity: @opacity / 100;
+}
+
1,007 vendor/toolkit/twitter/bootstrap/patterns.less
@@ -0,0 +1,1007 @@
+/* Patterns.less
+ * Repeatable UI elements outside the base styles provided from the scaffolding
+ * ---------------------------------------------------------------------------- */
+
+
+// TOPBAR
+// ------
+
+// Topbar for Branding and Nav
+.topbar {
+ height: 40px;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 10000;
+ overflow: visible;
+
+ // Links get text shadow
+ a {
+ color: @grayLight;
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
+ }
+
+ // Hover and active states
+ // h3 for backwards compatibility
+ h3 a:hover,
+ .brand a:hover,
+ ul .active > a {
+ background-color: #333;
+ background-color: rgba(255,255,255,.05);
+ color: @white;
+ text-decoration: none;
+ }
+
+ // Website name
+ // h3 left for backwards compatibility
+ h3 {
+ position: relative;
+ }
+ h3 a,
+ .brand {
+ float: left;
+ display: block;
+ padding: 8px 20px 12px;
+ margin-left: -20px; // negative indent to left-align the text down the page
+ color: @white;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
+ }
+
+ // Plain text in topbar
+ p {
+ margin: 0;
+ line-height: 40px;
+ a:hover {
+ background-color: transparent;
+ color: @white;
+ }
+ }
+
+ // Search Form
+ form {
+ float: left;
+ margin: 5px 0 0 0;
+ position: relative;
+ .opacity(100);
+ }
+ // Todo: remove from v2.0 when ready, added for legacy
+ form.pull-right {
+ float: right;
+ }
+ input {
+ background-color: #444;
+ background-color: rgba(255,255,255,.3);
+ #font > .sans-serif(13px, normal, 1);
+ padding: 4px 9px;
+ color: @white;
+ color: rgba(255,255,255,.75);
+ border: 1px solid #111;
+ .border-radius(4px);
+ @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25);
+ .box-shadow(@shadow);
+ .transition(none);
+
+ // Placeholder text gets special styles; can't be bundled together though for some reason
+ &:-moz-placeholder {
+ color: @grayLighter;
+ }
+ &::-webkit-input-placeholder {
+ color: @grayLighter;
+ }
+ // Hover states
+ &:hover {
+ background-color: @grayLight;
+ background-color: rgba(255,255,255,.5);
+ color: @white;
+ }
+ // Focus states (we use .focused since IE8 and down doesn't support :focus)
+ &:focus,
+ &.focused {
+ outline: 0;
+ background-color: @white;
+ color: @grayDark;
+ text-shadow: 0 1px 0 @white;
+ border: 0;
+ padding: 5px 10px;
+ .box-shadow(0 0 3px rgba(0,0,0,.15));
+ }
+ }
+}
+
+// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present
+// For backwards compatibility, include .topbar .fill
+.topbar-inner,
+.topbar .fill {
+ background-color: #222;
+ #gradient > .vertical(#333, #222);
+ @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
+ .box-shadow(@shadow);
+}
+
+
+// NAVIGATION
+// ----------
+
+// Topbar Nav
+// ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity
+// For backwards compatibility, leave in .topbar div > ul
+.topbar div > ul,
+.nav {
+ display: block;
+ float: left;
+ margin: 0 10px 0 0;
+ position: relative;
+ left: 0;
+ > li {
+ display: block;
+ float: left;
+ }
+ a {
+ display: block;
+ float: none;
+ padding: 10px 10px 11px;
+ line-height: 19px;
+ text-decoration: none;
+ &:hover {
+ color: @white;
+ text-decoration: none;
+ }
+ }
+ .active > a {
+ background-color: #222;
+ background-color: rgba(0,0,0,.5);
+ }
+
+ // Secondary (floated right) nav in topbar
+ &.secondary-nav {
+ float: right;
+ margin-left: 10px;
+ margin-right: 0;
+ // backwards compatibility
+ .menu-dropdown,
+ .dropdown-menu {
+ right: 0;
+ border: 0;
+ }
+ }
+ // Dropdowns within the .nav
+ // a.menu:hover and li.open .menu for backwards compatibility
+ a.menu:hover,
+ li.open .menu,
+ .dropdown-toggle:hover,
+ .dropdown.open .dropdown-toggle {
+ background: #444;
+ background: rgba(255,255,255,.05);
+ }
+ // .menu-dropdown for backwards compatibility
+ .menu-dropdown,
+ .dropdown-menu {
+ background-color: #333;
+ // a.menu for backwards compatibility
+ a.menu,
+ .dropdown-toggle {
+ color: @white;
+ &.open {
+ background: #444;
+ background: rgba(255,255,255,.05);
+ }
+ }
+ li a {
+ color: #999;
+ text-shadow: 0 1px 0 rgba(0,0,0,.5);
+ &:hover {
+ #gradient > .vertical(#292929,#191919);
+ color: @white;
+ }
+ }
+ .active a {
+ color: @white;
+ }
+ .divider {
+ background-color: #222;
+ border-color: #444;
+ }
+ }
+}
+
+// For backwards compatibility with new dropdowns, redeclare dropdown link padding
+.topbar ul .menu-dropdown li a,
+.topbar ul .dropdown-menu li a {
+ padding: 4px 15px;
+}
+
+// Dropdown Menus
+// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
+// li.menu for backwards compatibility
+li.menu,
+.dropdown {
+ position: relative;
+}
+// The link that is clicked to toggle the dropdown
+// a.menu for backwards compatibility
+a.menu:after,
+.dropdown-toggle:after {
+ width: 0;
+ height: 0;
+ display: inline-block;
+ content: "&darr;";
+ text-indent: -99999px;
+ vertical-align: top;
+ margin-top: 8px;
+ margin-left: 4px;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid @white;
+ .opacity(50);
+}
+// The dropdown menu (ul)
+// .menu-dropdown for backwards compatibility
+.menu-dropdown,
+.dropdown-menu {
+ background-color: @white;
+ float: left;
+ display: none; // None by default, but block on "open" of the menu
+ position: absolute;
+ top: 40px;
+ z-index: 900;
+ min-width: 160px;
+ max-width: 220px;
+ _width: 160px;
+ margin-left: 0; // override default ul styles
+ margin-right: 0;
+ padding: 6px 0;
+ zoom: 1; // do we need this?
+ border-color: #999;
+ border-color: rgba(0,0,0,.2);
+ border-style: solid;
+ border-width: 0 1px 1px;
+ .border-radius(0 0 6px 6px);
+ .box-shadow(0 2px 4px rgba(0,0,0,.2));
+ .background-clip(padding-box);
+
+ // Unfloat any li's to make them stack
+ li {
+ float: none;
+ display: block;
+ background-color: none;
+ }
+ // Dividers (basically an hr) within the dropdown
+ .divider {
+ height: 1px;
+ margin: 5px 0;
+ overflow: hidden;
+ background-color: #eee;
+ border-bottom: 1px solid @white;
+ }
+}
+
+.topbar .dropdown-menu, .dropdown-menu {
+ // Links within the dropdown menu
+ a {
+ display: block;
+ padding: 4px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: @gray;
+ text-shadow: 0 1px 0 @white;
+ // Hover state
+ &:hover {
+ #gradient > .vertical(#eeeeee, #dddddd);
+ color: @grayDark;
+ text-decoration: none;
+ @shadow: inset 0 1px 0 rgba(0,0,0,.025), inset 0 -1px rgba(0,0,0,.025);
+ .box-shadow(@shadow);
+ }
+ }
+}
+
+// Open state for the dropdown
+// .open for backwards compatibility
+.open,
+.dropdown.open {
+ // .menu for backwards compatibility
+ .menu,
+ .dropdown-toggle {
+ color: @white;
+ background: #ccc;
+ background: rgba(0,0,0,.3);
+ }
+ // .menu-dropdown for backwards compatibility
+ .menu-dropdown,
+ .dropdown-menu {
+ display: block;
+ }
+}
+
+
+// Tabs and Pills
+.tabs,
+.pills {
+ margin: 0 0 20px;
+ padding: 0;
+ list-style: none;
+ .clearfix();
+ > li {
+ float: left;
+ > a {
+ display: block;
+ }
+ }
+}
+
+// Basic Tabs
+.tabs {
+ float: left;
+ width: 100%;
+ border-bottom: 1px solid #ddd;
+ > li {
+ position: relative; // For the dropdowns mostly
+ top: 1px;
+ > a {
+ padding: 0 15px;
+ margin-right: 2px;
+ line-height: @baseline * 2;
+ border: 1px solid transparent;
+ .border-radius(4px 4px 0 0);
+ &:hover {
+ text-decoration: none;
+ background-color: #eee;
+ border-color: #eee #eee #ddd;
+ }
+ }
+ &.active > a {
+ color: @gray;
+ background-color: @white;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+ }
+ }
+ // first one for backwards compatibility
+ .menu-dropdown,
+ .dropdown-menu {
+ top: 35px;
+ border-width: 1px;
+ .border-radius(0 6px 6px 6px);
+ }
+ // first one for backwards compatibility
+ a.menu:after,
+ .dropdown-toggle:after {
+ border-top-color: #999;
+ margin-top: 15px;
+ margin-left: 5px;
+ }
+ // first one for backwards compatibility
+ li.open.menu .menu,
+ .open.dropdown .dropdown-toggle {
+ border-color: #999;
+ }
+ // first one for backwards compatibility
+ li.open a.menu:after,
+ .dropdown.open .dropdown-toggle:after {
+ border-top-color: #555;
+ }
+}
+.tab-content {
+ clear: both;
+}
+
+// Basic pill nav
+.pills {
+ a {
+ margin: 5px 3px 5px 0;
+ padding: 0 15px;
+ text-shadow: 0 1px 1px @white;
+ line-height: 30px;
+ .border-radius(15px);
+ &:hover {
+ background: @linkColorHover;
+ color: @white;
+ text-decoration: none;
+ text-shadow: 0 1px 1px rgba(0,0,0,.25);
+ }
+ }
+ .active a {
+ background: @linkColor;
+ color: @white;
+ text-shadow: 0 1px 1px rgba(0,0,0,.25);
+ }
+}
+
+.tab-content > *,
+.pill-content > * {
+ display: none;
+}
+
+.tab-content > .active,
+.pill-content > .active {
+ display:block;
+}
+
+
+// BREADCRUMBS
+// -----------
+
+.breadcrumb {
+ margin: 0 0 @baseline;
+ padding: 7px 14px;
+ #gradient > .vertical(#ffffff, #f5f5f5);
+ border: 1px solid #ddd;
+ .border-radius(3px);
+ .box-shadow(inset 0 1px 0 @white);
+ li {
+ display: inline;
+ text-shadow: 0 1px 0 @white;
+ }
+ .divider {
+ padding: 0 5px;
+ color: @grayLight;
+ }
+ a {
+ }
+ .active a {
+ color: @grayDark;
+ }
+}
+
+
+// PAGE HEADERS
+// ------------
+
+.hero-unit {
+ background-color: #f5f5f5;
+ margin-bottom: 30px;
+ padding: 60px;
+ .border-radius(6px);
+ h1 {
+ margin-bottom: 0;
+ font-size: 60px;
+ line-height: 1;
+ letter-spacing: -1px;
+ }
+ p {
+ font-size: 18px;
+ font-weight: 200;
+ line-height: @baseline * 1.5;
+ }
+}
+footer {
+ margin-top: @baseline - 1;
+ padding-top: @baseline - 1;
+ border-top: 1px solid #eee;
+}
+
+
+// PAGE HEADERS
+// ------------
+
+.page-header {
+ margin-bottom: @baseline - 1;
+ border-bottom: 1px solid #ddd;
+ .box-shadow(0 1px 0 rgba(255,255,255,.5));
+ h1 {
+ margin-bottom: (@baseline / 2) - 1px;
+ }
+}
+
+
+// BUTTON STYLES
+// -------------
+
+// Shared colors for buttons and alerts
+.btn,
+.alert-message {
+ // Set text color
+ &.danger,
+ &.danger:hover,
+ &.error,
+ &.error:hover,
+ &.success,
+ &.success:hover,
+ &.info,
+ &.info:hover {
+ color: @white
+ }
+ // Danger and error appear as red
+ &.danger,
+ &.error {
+ .gradientBar(#ee5f5b, #c43c35);
+ }
+ // Success appears as green
+ &.success {
+ .gradientBar(#62c462, #57a957);
+ }
+ // Info appears as a neutral blue
+ &.info {
+ .gradientBar(#5bc0de, #339bb9);
+ }
+}
+
+// Base .btn styles
+.btn {
+ // Button Base
+ cursor: pointer;
+ display: inline-block;
+ #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
+ padding: 5px 14px 6px;
+ text-shadow: 0 1px 1px rgba(255,255,255,.75);
+ color: #333;
+ font-size: @basefont;
+ line-height: normal;
+ border: 1px solid #ccc;
+ border-bottom-color: #bbb;
+ .border-radius(4px);
+ @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+ .box-shadow(@shadow);
+
+ &:hover {
+ background-position: 0 -15px;
+ color: #333;
+ text-decoration: none;
+ }
+
+ // Focus state for keyboard and accessibility
+ &:focus {
+ outline: 1px dotted #666;
+ }
+
+ // Primary Button Type
+ &.primary {
+ color: @white;
+ .gradientBar(@blue, @blueDark)
+ }
+
+ // Transitions
+ .transition(.1s linear all);
+
+ // Active and Disabled states
+ &:active {
+ @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
+ .box-shadow(@shadow);
+ }
+ &.disabled {
+ cursor: default;
+ background-image: none;
+ .reset-filter();
+ .opacity(65);
+ .box-shadow(none);
+ }
+ &[disabled] {
+ // disabled pseudo can't be included with .disabled
+ // def because IE8 and below will drop it ;_;
+ cursor: default;
+ background-image: none;
+ .reset-filter();
+ .opacity(65);
+ .box-shadow(none);
+ }
+
+ // Button Sizes
+ &.large {
+ font-size: @basefont + 2px;
+ line-height: normal;
+ padding: 9px 14px 9px;
+ .border-radius(6px);
+ }
+ &.small {
+ padding: 7px 9px 7px;
+ font-size: @basefont - 2px;
+ }
+}
+// Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons
+:root .alert-message,
+:root .btn {
+ border-radius: 0 \0;
+}
+
+// Help Firefox not be a jerk about adding extra padding to buttons
+button.btn,
+input[type=submit].btn {
+ &::-moz-focus-inner {
+ padding: 0;