├── fedorasummerofhardware
├── scripts
│ ├── __init__.py
│ └── initializedb.py
├── static
│ ├── img
│ │ ├── logo.png
│ │ ├── fedora.png
│ │ ├── logo-olpc.png
│ │ ├── starburst.png
│ │ ├── logo-raspi.png
│ │ ├── photo-olpc.png
│ │ ├── photo-raspi.png
│ │ └── photo-arduino.png
│ ├── fonts
│ │ ├── chewy-webfont.woff
│ │ ├── chewy-webfont.woff.1
│ │ ├── Comfortaa_Regular-webfont.ttf
│ │ └── Comfortaa_Regular-webfont.woff
│ ├── less
│ │ ├── grid.less
│ │ ├── utilities.less
│ │ ├── component-animations.less
│ │ ├── layouts.less
│ │ ├── hero-unit.less
│ │ ├── breadcrumbs.less
│ │ ├── wells.less
│ │ ├── scaffolding.less
│ │ ├── close.less
│ │ ├── pager.less
│ │ ├── accordion.less
│ │ ├── tooltip.less
│ │ ├── thumbnails.less
│ │ ├── pagination.less
│ │ ├── alerts.less
│ │ ├── popovers.less
│ │ ├── bootstrap.less
│ │ ├── code.less
│ │ ├── labels-badges.less
│ │ ├── modals.less
│ │ ├── carousel.less
│ │ ├── progress-bars.less
│ │ ├── reset.less
│ │ ├── dropdowns.less
│ │ ├── type.less
│ │ ├── tables.less
│ │ ├── buttons.less
│ │ ├── button-groups.less
│ │ ├── variables.less
│ │ ├── navs.less
│ │ ├── navbar.less
│ │ ├── sprites.less
│ │ └── forms.less
│ └── js
│ │ ├── bootstrap-transition.min.js
│ │ ├── charCount.min.js
│ │ ├── bootstrap-alert.min.js
│ │ ├── bootstrap-dropdown.min.js
│ │ ├── bootstrap-button.min.js
│ │ ├── bootstrap-popover.min.js
│ │ ├── bootstrap-tab.min.js
│ │ ├── bootstrap-scrollspy.min.js
│ │ ├── charCount.js
│ │ ├── bootstrap-collapse.min.js
│ │ ├── bootstrap-transition.js
│ │ ├── bootstrap-carousel.min.js
│ │ ├── bootstrap-alert.js
│ │ ├── bootstrap-modal.min.js
│ │ ├── bootstrap-button.js
│ │ ├── bootstrap-dropdown.js
│ │ ├── bootstrap-popover.js
│ │ ├── bootstrap-typeahead.min.js
│ │ ├── bootstrap-tooltip.min.js
│ │ ├── bootstrap-tab.js
│ │ ├── bootstrap-scrollspy.js
│ │ ├── bootstrap-collapse.js
│ │ ├── bootstrap-carousel.js
│ │ ├── bootstrap-modal.js
│ │ ├── bootstrap-typeahead.js
│ │ └── bootstrap-tooltip.js
├── templates
│ ├── csv.mak
│ ├── login.mak
│ ├── accept.mak
│ └── submissions.mak
├── models.py
└── __init__.py
├── .gitignore
├── MANIFEST.in
├── openhw2012.wsgi
├── setup.cfg
├── README.rst
├── compress
├── setup.py
└── development.ini
/fedorasummerofhardware/scripts/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.pyo
3 | *.db
4 | data
5 | sstore
6 | *.egg-info
7 | *.swp
8 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/logo.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/fedora.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/fedora.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/logo-olpc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/logo-olpc.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/starburst.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/starburst.png
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include *.txt *.ini *.cfg *.rst
2 | recursive-include fedorasummerofhardware *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml
3 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/logo-raspi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/logo-raspi.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/photo-olpc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/photo-olpc.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/photo-raspi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/photo-raspi.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/img/photo-arduino.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/img/photo-arduino.png
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/fonts/chewy-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/fonts/chewy-webfont.woff
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/fonts/chewy-webfont.woff.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/fonts/chewy-webfont.woff.1
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/fonts/Comfortaa_Regular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/fonts/Comfortaa_Regular-webfont.ttf
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/fonts/Comfortaa_Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/fedora-openhw2012/master/fedorasummerofhardware/static/fonts/Comfortaa_Regular-webfont.woff
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/grid.less:
--------------------------------------------------------------------------------
1 | // Fixed (940px)
2 | #grid > .core(@gridColumnWidth, @gridGutterWidth);
3 |
4 | // Fluid (940px)
5 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
--------------------------------------------------------------------------------
/fedorasummerofhardware/templates/csv.mak:
--------------------------------------------------------------------------------
1 | ## -*- coding: utf-8 -*-
2 | % for app in applications:
3 | ${app.date},${app.username},${app.realname.decode('utf-8')},${app.country},${app.hardware},${app.shield},${app.text.decode('utf-8')}
4 | % endfor
5 |
--------------------------------------------------------------------------------
/openhw2012.wsgi:
--------------------------------------------------------------------------------
1 | import site
2 | site.addsitedir('/srv/web/openhw2012/openhw2012/lib/python2.6/site-packages/')
3 |
4 | from pyramid.paster import get_app, setup_logging
5 | application = get_app('/srv/web/openhw2012/development.ini', 'main')
6 | setup_logging('/srv/web/openhw2012/development.ini')
7 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/utilities.less:
--------------------------------------------------------------------------------
1 | // UTILITY CLASSES
2 | // ---------------
3 |
4 | // Quick floats
5 | .pull-right {
6 | float: right;
7 | }
8 | .pull-left {
9 | float: left;
10 | }
11 |
12 | // Toggling content
13 | .hide {
14 | display: none;
15 | }
16 | .show {
17 | display: block;
18 | }
19 |
20 | // Visibility
21 | .invisible {
22 | visibility: hidden;
23 | }
24 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/component-animations.less:
--------------------------------------------------------------------------------
1 | // COMPONENT ANIMATIONS
2 | // --------------------
3 |
4 | .fade {
5 | opacity: 0;
6 | .transition(opacity .15s linear);
7 | &.in {
8 | opacity: 1;
9 | }
10 | }
11 |
12 | .collapse {
13 | position: relative;
14 | height: 0;
15 | overflow: hidden;
16 | .transition(height .35s ease);
17 | &.in {
18 | height: auto;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-transition.min.js:
--------------------------------------------------------------------------------
1 | !function(a){a(function(){a.support.transition=(function(){var b=(function(){var e=document.createElement("bootstrap"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in d){if(e.style[c]!==undefined){return d[c]}}}());return b&&{end:b}})()})}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/templates/login.mak:
--------------------------------------------------------------------------------
1 | ## -*- coding: utf-8 -*-
2 | <% flash = '. '.join(request.session.pop_flash()) %>
3 |
and elements
3 | // --------------------------------------------------------
4 |
5 | // Inline and block code styles
6 | code,
7 | pre {
8 | padding: 0 3px 2px;
9 | #font > #family > .monospace;
10 | font-size: @baseFontSize - 1;
11 | color: @grayDark;
12 | .border-radius(3px);
13 | }
14 |
15 | // Inline code
16 | code {
17 | padding: 2px 4px;
18 | color: #d14;
19 | background-color: #f7f7f9;
20 | border: 1px solid #e1e1e8;
21 | }
22 |
23 | // Blocks of code
24 | pre {
25 | display: block;
26 | padding: (@baseLineHeight - 1) / 2;
27 | margin: 0 0 @baseLineHeight / 2;
28 | font-size: @baseFontSize * .925; // 13px to 12px
29 | line-height: @baseLineHeight;
30 | word-break: break-all;
31 | word-wrap: break-word;
32 | white-space: pre;
33 | white-space: pre-wrap;
34 | background-color: #f5f5f5;
35 | border: 1px solid #ccc; // fallback for IE7-8
36 | border: 1px solid rgba(0,0,0,.15);
37 | .border-radius(4px);
38 |
39 | // Make prettyprint styles more spaced out for readability
40 | &.prettyprint {
41 | margin-bottom: @baseLineHeight;
42 | }
43 |
44 | // Account for some code outputs that place code tags in pre tags
45 | code {
46 | padding: 0;
47 | color: inherit;
48 | background-color: transparent;
49 | border: 0;
50 | }
51 | }
52 |
53 | // Enable scrollable blocks of code
54 | .pre-scrollable {
55 | max-height: 340px;
56 | overflow-y: scroll;
57 | }
--------------------------------------------------------------------------------
/fedorasummerofhardware/models.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Red Hat, Inc.
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU Affero General Public License as
5 | # published by the Free Software Foundation, either version 3 of the
6 | # License, or (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Affero General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Affero General Public License
14 | # along with this program. If not, see .
15 |
16 | from datetime import datetime
17 | from sqlalchemy import Column, DateTime, Integer, Text, Boolean, Date
18 | from sqlalchemy.ext.declarative import declarative_base
19 | from sqlalchemy.orm import scoped_session, sessionmaker
20 |
21 | DBSession = scoped_session(sessionmaker())
22 | Base = declarative_base()
23 |
24 | class Application(Base):
25 | __tablename__ = 'applications'
26 | id = Column(Integer, primary_key=True)
27 | realname = Column(Text)
28 | username = Column(Text, unique=True)
29 | country = Column(Text)
30 | state = Column(Text)
31 | hardware = Column(Text)
32 | shield = Column(Text)
33 | date = Column(DateTime, default=datetime.now)
34 | text = Column(Text)
35 | approved = Column(Boolean, default=False)
36 | address = Column(Text)
37 | phone = Column(Text)
38 |
39 | def __repr__(self):
40 | return "" % (self.username, self.hardware)
41 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/labels-badges.less:
--------------------------------------------------------------------------------
1 | // LABELS & BADGES
2 | // ---------------
3 |
4 | // Base classes
5 | .label,
6 | .badge {
7 | font-size: @baseFontSize * .846;
8 | font-weight: bold;
9 | line-height: 14px; // ensure proper line-height if floated
10 | color: @white;
11 | vertical-align: baseline;
12 | white-space: nowrap;
13 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
14 | background-color: @grayLight;
15 | }
16 | // Set unique padding and border-radii
17 | .label {
18 | padding: 1px 4px 2px;
19 | .border-radius(3px);
20 | }
21 | .badge {
22 | padding: 1px 9px 2px;
23 | .border-radius(9px);
24 | }
25 |
26 | // Hover state, but only for links
27 | a {
28 | &.label:hover,
29 | &.badge:hover {
30 | color: @white;
31 | text-decoration: none;
32 | cursor: pointer;
33 | }
34 | }
35 |
36 | // Colors
37 | // Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
38 | .label,
39 | .badge {
40 | // Important (red)
41 | &-important { background-color: @errorText; }
42 | &-important[href] { background-color: darken(@errorText, 10%); }
43 | // Warnings (orange)
44 | &-warning { background-color: @orange; }
45 | &-warning[href] { background-color: darken(@orange, 10%); }
46 | // Success (green)
47 | &-success { background-color: @successText; }
48 | &-success[href] { background-color: darken(@successText, 10%); }
49 | // Info (turquoise)
50 | &-info { background-color: @infoText; }
51 | &-info[href] { background-color: darken(@infoText, 10%); }
52 | // Inverse (black)
53 | &-inverse { background-color: @grayDark; }
54 | &-inverse[href] { background-color: darken(@grayDark, 10%); }
55 | }
56 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-scrollspy.min.js:
--------------------------------------------------------------------------------
1 | !function(b){function a(f,e){var g=b.proxy(this.process,this),c=b(f).is("body")?b(window):b(f),d;this.options=b.extend({},b.fn.scrollspy.defaults,e);this.$scrollElement=c.on("scroll.scroll.data-api",g);this.selector=(this.options.target||((d=b(f).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""))||"")+" .nav li > a";this.$body=b("body");this.refresh();this.process()}a.prototype={constructor:a,refresh:function(){var c=this,d;this.offsets=b([]);this.targets=b([]);d=this.$body.find(this.selector).map(function(){var f=b(this),e=f.data("target")||f.attr("href"),g=/^#\w/.test(e)&&b(e);return(g&&e.length&&[[g.position().top,e]])||null}).sort(function(f,e){return f[0]-e[0]}).each(function(){c.offsets.push(this[0]);c.targets.push(this[1])})},process:function(){var h=this.$scrollElement.scrollTop()+this.options.offset,e=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,g=e-this.$scrollElement.height(),f=this.offsets,c=this.targets,j=this.activeTarget,d;if(h>=g){return j!=(d=c.last()[0])&&this.activate(d)}for(d=f.length;d--;){j!=c[d]&&h>=f[d]&&(!f[d+1]||h<=f[d+1])&&this.activate(c[d])}},activate:function(e){var d,c;this.activeTarget=e;b(this.selector).parent(".active").removeClass("active");c=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]';d=b(c).parent("li").addClass("active");if(d.parent(".dropdown-menu")){d=d.closest("li.dropdown").addClass("active")}d.trigger("activate")}};b.fn.scrollspy=function(c){return this.each(function(){var f=b(this),e=f.data("scrollspy"),d=typeof c=="object"&&c;if(!e){f.data("scrollspy",(e=new a(this,d)))}if(typeof c=="string"){e[c]()}})};b.fn.scrollspy.Constructor=a;b.fn.scrollspy.defaults={offset:10};b(function(){b('[data-spy="scroll"]').each(function(){var c=b(this);c.scrollspy(c.data())})})}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/charCount.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Character Count Plugin - jQuery plugin
3 | * Dynamic character count for text areas and input fields
4 | * written by Alen Grakalic
5 | * http://cssglobe.com/post/7161/jquery-plugin-simplest-twitterlike-dynamic-character-count-for-textareas
6 | *
7 | * Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
8 | * Dual licensed under the MIT (MIT-LICENSE.txt)
9 | * and GPL (GPL-LICENSE.txt) licenses.
10 | *
11 | * Built for jQuery library
12 | * http://jquery.com
13 | *
14 | */
15 |
16 | (function($) {
17 |
18 | $.fn.charCount = function(options){
19 |
20 | // default configuration properties
21 | var defaults = {
22 | allowed: 140,
23 | warning: 25,
24 | css: 'counter',
25 | counterElement: 'span',
26 | cssWarning: 'warning',
27 | cssExceeded: 'exceeded',
28 | counterText: ''
29 | };
30 |
31 | var options = $.extend(defaults, options);
32 |
33 | function calculate(obj){
34 | var count = $(obj).val().length;
35 | var available = options.allowed - count;
36 | if(available <= options.warning && available >= 0){
37 | $(obj).next().addClass(options.cssWarning);
38 | } else {
39 | $(obj).next().removeClass(options.cssWarning);
40 | }
41 | if(available < 0){
42 | $(obj).next().addClass(options.cssExceeded);
43 | } else {
44 | $(obj).next().removeClass(options.cssExceeded);
45 | }
46 | $(obj).next().html(options.counterText + available);
47 | };
48 |
49 | this.each(function() {
50 | $(this).after('<'+ options.counterElement +' class="' + options.css + '">'+ options.counterText +''+ options.counterElement +'>');
51 | calculate(this);
52 | $(this).keyup(function(){calculate(this)});
53 | $(this).change(function(){calculate(this)});
54 | });
55 |
56 | };
57 |
58 | })(jQuery);
59 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-collapse.min.js:
--------------------------------------------------------------------------------
1 | !function(a){var b=function(d,c){this.$element=a(d);this.options=a.extend({},a.fn.collapse.defaults,c);if(this.options.parent){this.$parent=a(this.options.parent)}this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var c=this.$element.hasClass("width");return c?"width":"height"},show:function(){var f,c,e,d;if(this.transitioning){return}f=this.dimension();c=a.camelCase(["scroll",f].join("-"));e=this.$parent&&this.$parent.find("> .accordion-group > .in");if(e&&e.length){d=e.data("collapse");if(d&&d.transitioning){return}e.collapse("hide");d||e.data("collapse",null)}this.$element[f](0);this.transition("addClass",a.Event("show"),"shown");this.$element[f](this.$element[0][c])},hide:function(){var c;if(this.transitioning){return}c=this.dimension();this.reset(this.$element[c]());this.transition("removeClass",a.Event("hide"),"hidden");this.$element[c](0)},reset:function(c){var d=this.dimension();this.$element.removeClass("collapse")[d](c||"auto")[0].offsetWidth;this.$element[c!==null?"addClass":"removeClass"]("collapse");return this},transition:function(g,d,e){var f=this,c=function(){if(d.type=="show"){f.reset()}f.transitioning=0;f.$element.trigger(e)};this.$element.trigger(d);if(d.isDefaultPrevented()){return}this.transitioning=1;this.$element[g]("in");a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,c):c()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};a.fn.collapse=function(c){return this.each(function(){var f=a(this),e=f.data("collapse"),d=typeof c=="object"&&c;if(!e){f.data("collapse",(e=new b(this,d)))}if(typeof c=="string"){e[c]()}})};a.fn.collapse.defaults={toggle:true};a.fn.collapse.Constructor=b;a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(h){var g=a(this),c,f=g.attr("data-target")||h.preventDefault()||(c=g.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),d=a(f).data("collapse")?"toggle":g.data();a(f).collapse(d)})})}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-transition.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * bootstrap-transition.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#transitions
4 | * ===================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | $(function () {
24 |
25 | "use strict"; // jshint ;_;
26 |
27 |
28 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
29 | * ======================================================= */
30 |
31 | $.support.transition = (function () {
32 |
33 | var transitionEnd = (function () {
34 |
35 | var el = document.createElement('bootstrap')
36 | , transEndEventNames = {
37 | 'WebkitTransition' : 'webkitTransitionEnd'
38 | , 'MozTransition' : 'transitionend'
39 | , 'OTransition' : 'oTransitionEnd'
40 | , 'msTransition' : 'MSTransitionEnd'
41 | , 'transition' : 'transitionend'
42 | }
43 | , name
44 |
45 | for (name in transEndEventNames){
46 | if (el.style[name] !== undefined) {
47 | return transEndEventNames[name]
48 | }
49 | }
50 |
51 | }())
52 |
53 | return transitionEnd && {
54 | end: transitionEnd
55 | }
56 |
57 | })()
58 |
59 | })
60 |
61 | }(window.jQuery);
--------------------------------------------------------------------------------
/development.ini:
--------------------------------------------------------------------------------
1 | [app:main]
2 | use = egg:FedoraSummerOfHardware
3 |
4 | pyramid.reload_templates = true
5 | pyramid.debug_authorization = false
6 | pyramid.debug_notfound = false
7 | pyramid.debug_routematch = false
8 | pyramid.default_locale_name = en
9 | pyramid.includes =
10 | pyramid_debugtoolbar
11 |
12 | sqlalchemy.url = sqlite:///%(here)s/FedoraSummerOfHardware.db
13 |
14 | accept_applications = False
15 | start_date = 2012-07-25
16 | stop_date = 2012-08-16
17 |
18 | admin_usernames = lmacken spot duffy
19 | admin_email = lmacken@redhat.com
20 | email_from = openhw2012-members@fedoraproject.org
21 | email_subject = Your Fedora Summer of Open Hardware 2012 Application
22 | email_body = Congratulations, your Fedora Summer of Open Hardware application has been tentatively accepted. Please go to the following URL and enter your mailing address so we can send you your hardware: %sAs long as your mailing address isn't outside of the list of regions eligible for this drawing (%s), you should be receiving your hardware within the next %s weeks. We'll let you know if any issues crop up with your application when we do a final check on it.
23 |
24 | est_shipping = 6-10
25 |
26 | exclude_states = NY FL
27 | prohibited_users = redhat.com
28 |
29 | hardware = raspberrypi arduino olpc
30 | num_raspberrypi = 150
31 | num_olpc = 50
32 | num_arduino = 20
33 |
34 | authtkt.secret = CHANGEMEINPRODUCTION!!!1
35 |
36 | [server:main]
37 | use = egg:waitress#main
38 | host = 0.0.0.0
39 | port = 6543
40 |
41 | # Begin logging configuration
42 |
43 | [loggers]
44 | keys = root, fedorasummerofhardware, sqlalchemy
45 |
46 | [handlers]
47 | keys = console
48 |
49 | [formatters]
50 | keys = generic
51 |
52 | [logger_root]
53 | level = INFO
54 | handlers = console
55 |
56 | [logger_fedorasummerofhardware]
57 | level = DEBUG
58 | handlers =
59 | qualname = fedorasummerofhardware
60 |
61 | [logger_sqlalchemy]
62 | level = INFO
63 | handlers =
64 | qualname = sqlalchemy.engine
65 | # "level = INFO" logs SQL queries.
66 | # "level = DEBUG" logs SQL queries and results.
67 | # "level = WARN" logs neither. (Recommended for production systems.)
68 |
69 | [handler_console]
70 | class = StreamHandler
71 | args = (sys.stderr,)
72 | level = NOTSET
73 | formatter = generic
74 |
75 | [formatter_generic]
76 | format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
77 |
78 | # End logging configuration
79 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/modals.less:
--------------------------------------------------------------------------------
1 | // MODALS
2 | // ------
3 |
4 | // Recalculate z-index where appropriate
5 | .modal-open {
6 | .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
7 | .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
8 | .popover { z-index: @zindexPopover + @zindexModal; }
9 | .tooltip { z-index: @zindexTooltip + @zindexModal; }
10 | }
11 |
12 | // Background
13 | .modal-backdrop {
14 | position: fixed;
15 | top: 0;
16 | right: 0;
17 | bottom: 0;
18 | left: 0;
19 | z-index: @zindexModalBackdrop;
20 | background-color: @black;
21 | // Fade for backdrop
22 | &.fade { opacity: 0; }
23 | }
24 |
25 | .modal-backdrop,
26 | .modal-backdrop.fade.in {
27 | .opacity(80);
28 | }
29 |
30 | // Base modal
31 | .modal {
32 | position: fixed;
33 | top: 50%;
34 | left: 50%;
35 | z-index: @zindexModal;
36 | overflow: auto;
37 | width: 560px;
38 | margin: -250px 0 0 -280px;
39 | background-color: @white;
40 | border: 1px solid #999;
41 | border: 1px solid rgba(0,0,0,.3);
42 | *border: 1px solid #999; /* IE6-7 */
43 | .border-radius(6px);
44 | .box-shadow(0 3px 7px rgba(0,0,0,0.3));
45 | .background-clip(padding-box);
46 | &.fade {
47 | .transition(e('opacity .3s linear, top .3s ease-out'));
48 | top: -25%;
49 | }
50 | &.fade.in { top: 50%; }
51 | }
52 | .modal-header {
53 | padding: 9px 15px;
54 | border-bottom: 1px solid #eee;
55 | // Close icon
56 | .close { margin-top: 2px; }
57 | }
58 |
59 | // Body (where all modal content resides)
60 | .modal-body {
61 | overflow-y: auto;
62 | max-height: 400px;
63 | padding: 15px;
64 | }
65 | // Remove bottom margin if need be
66 | .modal-form {
67 | margin-bottom: 0;
68 | }
69 |
70 | // Footer (for actions)
71 | .modal-footer {
72 | padding: 14px 15px 15px;
73 | margin-bottom: 0;
74 | text-align: right; // right align buttons
75 | background-color: #f5f5f5;
76 | border-top: 1px solid #ddd;
77 | .border-radius(0 0 6px 6px);
78 | .box-shadow(inset 0 1px 0 @white);
79 | .clearfix(); // clear it in case folks use .pull-* classes on buttons
80 |
81 | // Properly space out buttons
82 | .btn + .btn {
83 | margin-left: 5px;
84 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
85 | }
86 | // but override that for button groups
87 | .btn-group .btn + .btn {
88 | margin-left: -1px;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-carousel.min.js:
--------------------------------------------------------------------------------
1 | !function(a){var b=function(d,c){this.$element=a(d);this.options=c;this.options.slide&&this.slide(this.options.slide);this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(c){if(!c){this.paused=false}this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval));return this},to:function(g){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(g>(d.length-1)||g<0){return}if(this.sliding){return this.$element.one("slid",function(){f.to(g)})}if(e==g){return this.pause().cycle()}return this.slide(g>e?"next":"prev",a(d[g]))},pause:function(c){if(!c){this.paused=true}clearInterval(this.interval);this.interval=null;return this},next:function(){if(this.sliding){return}return this.slide("next")},prev:function(){if(this.sliding){return}return this.slide("prev")},slide:function(j,d){var l=this.$element.find(".active"),c=d||l[j](),i=this.interval,k=j=="next"?"left":"right",f=j=="next"?"first":"last",g=this,h=a.Event("slide");this.sliding=true;i&&this.pause();c=c.length?c:this.$element.find(".item")[f]();if(c.hasClass("active")){return}if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(h);if(h.isDefaultPrevented()){return}c.addClass(j);c[0].offsetWidth;l.addClass(k);c.addClass(k);this.$element.one(a.support.transition.end,function(){c.removeClass([j,k].join(" ")).addClass("active");l.removeClass(["active",k].join(" "));g.sliding=false;setTimeout(function(){g.$element.trigger("slid")},0)})}else{this.$element.trigger(h);if(h.isDefaultPrevented()){return}l.removeClass("active");c.addClass("active");this.sliding=false;this.$element.trigger("slid")}i&&this.cycle();return this}};a.fn.carousel=function(c){return this.each(function(){var f=a(this),e=f.data("carousel"),d=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c);if(!e){f.data("carousel",(e=new b(this,d)))}if(typeof c=="number"){e.to(c)}else{if(typeof c=="string"||(c=d.slide)){e[c]()}else{if(d.interval){e.cycle()}}}})};a.fn.carousel.defaults={interval:5000,pause:"hover"};a.fn.carousel.Constructor=b;a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(h){var g=a(this),d,c=a(g.attr("data-target")||(d=g.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!c.data("modal")&&a.extend({},c.data(),g.data());c.carousel(f);h.preventDefault()})})}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/carousel.less:
--------------------------------------------------------------------------------
1 | // CAROUSEL
2 | // --------
3 |
4 | .carousel {
5 | position: relative;
6 | margin-bottom: @baseLineHeight;
7 | line-height: 1;
8 | }
9 |
10 | .carousel-inner {
11 | overflow: hidden;
12 | width: 100%;
13 | position: relative;
14 | }
15 |
16 | .carousel {
17 |
18 | .item {
19 | display: none;
20 | position: relative;
21 | .transition(.6s ease-in-out left);
22 | }
23 |
24 | // Account for jankitude on images
25 | .item > img {
26 | display: block;
27 | line-height: 1;
28 | }
29 |
30 | .active,
31 | .next,
32 | .prev { display: block; }
33 |
34 | .active {
35 | left: 0;
36 | }
37 |
38 | .next,
39 | .prev {
40 | position: absolute;
41 | top: 0;
42 | width: 100%;
43 | }
44 |
45 | .next {
46 | left: 100%;
47 | }
48 | .prev {
49 | left: -100%;
50 | }
51 | .next.left,
52 | .prev.right {
53 | left: 0;
54 | }
55 |
56 | .active.left {
57 | left: -100%;
58 | }
59 | .active.right {
60 | left: 100%;
61 | }
62 |
63 | }
64 |
65 | // Left/right controls for nav
66 | // ---------------------------
67 |
68 | .carousel-control {
69 | position: absolute;
70 | top: 40%;
71 | left: 15px;
72 | width: 40px;
73 | height: 40px;
74 | margin-top: -20px;
75 | font-size: 60px;
76 | font-weight: 100;
77 | line-height: 30px;
78 | color: @white;
79 | text-align: center;
80 | background: @grayDarker;
81 | border: 3px solid @white;
82 | .border-radius(23px);
83 | .opacity(50);
84 |
85 | // we can't have this transition here
86 | // because webkit cancels the carousel
87 | // animation if you trip this while
88 | // in the middle of another animation
89 | // ;_;
90 | // .transition(opacity .2s linear);
91 |
92 | // Reposition the right one
93 | &.right {
94 | left: auto;
95 | right: 15px;
96 | }
97 |
98 | // Hover state
99 | &:hover {
100 | color: @white;
101 | text-decoration: none;
102 | .opacity(90);
103 | }
104 | }
105 |
106 | // Caption for text below images
107 | // -----------------------------
108 |
109 | .carousel-caption {
110 | position: absolute;
111 | left: 0;
112 | right: 0;
113 | bottom: 0;
114 | padding: 10px 15px 5px;
115 | background: @grayDark;
116 | background: rgba(0,0,0,.75);
117 | }
118 | .carousel-caption h4,
119 | .carousel-caption p {
120 | color: @white;
121 | }
122 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Red Hat, Inc.
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU Affero General Public License as
5 | # published by the Free Software Foundation, either version 3 of the
6 | # License, or (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Affero General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Affero General Public License
14 | # along with this program. If not, see .
15 |
16 | from pyramid.authentication import AuthTktAuthenticationPolicy
17 | from pyramid.authorization import ACLAuthorizationPolicy
18 | from pyramid.exceptions import Forbidden
19 | from pyramid.config import Configurator
20 | from pyramid_beaker import session_factory_from_settings
21 | from pyramid_beaker import set_cache_regions_from_settings
22 | from sqlalchemy import engine_from_config
23 |
24 | from .models import DBSession
25 |
26 | def main(global_config, **settings):
27 | """ This function returns a Pyramid WSGI application. """
28 | engine = engine_from_config(settings, 'sqlalchemy.')
29 | DBSession.configure(bind=engine)
30 | session_factory = session_factory_from_settings(settings)
31 | set_cache_regions_from_settings(settings)
32 | config = Configurator(settings=settings, session_factory=session_factory)
33 | config.set_authentication_policy(AuthTktAuthenticationPolicy(
34 | settings['authtkt.secret']))
35 | config.set_authorization_policy(ACLAuthorizationPolicy())
36 | config.add_static_view('static', 'static', cache_max_age=3600)
37 | config.add_route('home', '/')
38 | config.add_route('submit', '/submit')
39 | config.add_route('details', '/details')
40 | config.add_route('admin', '/admin')
41 | config.add_route('csv', '/csv')
42 | config.add_route('approve', '/approve')
43 | config.add_route('accept', '/accept')
44 | config.add_route('save_address', '/save_address')
45 | config.include('pyramid_mailer')
46 | config.add_route('login', '/login')
47 | config.add_route('logout', '/logout')
48 | config.add_view('fedorasummerofhardware.views.login_view',
49 | renderer='fedorasummerofhardware:templates/login.mak',
50 | context=Forbidden)
51 | config.scan()
52 | return config.make_wsgi_app()
53 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-alert.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#alerts
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* ALERT CLASS DEFINITION
27 | * ====================== */
28 |
29 | var dismiss = '[data-dismiss="alert"]'
30 | , Alert = function (el) {
31 | $(el).on('click', dismiss, this.close)
32 | }
33 |
34 | Alert.prototype.close = function (e) {
35 | var $this = $(this)
36 | , selector = $this.attr('data-target')
37 | , $parent
38 |
39 | if (!selector) {
40 | selector = $this.attr('href')
41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42 | }
43 |
44 | $parent = $(selector)
45 |
46 | e && e.preventDefault()
47 |
48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49 |
50 | $parent.trigger(e = $.Event('close'))
51 |
52 | if (e.isDefaultPrevented()) return
53 |
54 | $parent.removeClass('in')
55 |
56 | function removeElement() {
57 | $parent
58 | .trigger('closed')
59 | .remove()
60 | }
61 |
62 | $.support.transition && $parent.hasClass('fade') ?
63 | $parent.on($.support.transition.end, removeElement) :
64 | removeElement()
65 | }
66 |
67 |
68 | /* ALERT PLUGIN DEFINITION
69 | * ======================= */
70 |
71 | $.fn.alert = function (option) {
72 | return this.each(function () {
73 | var $this = $(this)
74 | , data = $this.data('alert')
75 | if (!data) $this.data('alert', (data = new Alert(this)))
76 | if (typeof option == 'string') data[option].call($this)
77 | })
78 | }
79 |
80 | $.fn.alert.Constructor = Alert
81 |
82 |
83 | /* ALERT DATA-API
84 | * ============== */
85 |
86 | $(function () {
87 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
88 | })
89 |
90 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-modal.min.js:
--------------------------------------------------------------------------------
1 | !function(e){var a=function(i,h){this.options=h;this.$element=e(i).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this))};a.prototype={constructor:a,toggle:function(){return this[!this.isShown?"show":"hide"]()},show:function(){var h=this,i=e.Event("show");this.$element.trigger(i);if(this.isShown||i.isDefaultPrevented()){return}e("body").addClass("modal-open");this.isShown=true;d.call(this);c.call(this,function(){var j=e.support.transition&&h.$element.hasClass("fade");if(!h.$element.parent().length){h.$element.appendTo(document.body)}h.$element.show();if(j){h.$element[0].offsetWidth}h.$element.addClass("in");j?h.$element.one(e.support.transition.end,function(){h.$element.trigger("shown")}):h.$element.trigger("shown")})},hide:function(i){i&&i.preventDefault();var h=this;i=e.Event("hide");this.$element.trigger(i);if(!this.isShown||i.isDefaultPrevented()){return}this.isShown=false;e("body").removeClass("modal-open");d.call(this);this.$element.removeClass("in");e.support.transition&&this.$element.hasClass("fade")?g.call(this):f.call(this)}};function g(){var h=this,i=setTimeout(function(){h.$element.off(e.support.transition.end);f.call(h)},500);this.$element.one(e.support.transition.end,function(){clearTimeout(i);f.call(h)})}function f(h){this.$element.hide().trigger("hidden");c.call(this)}function c(k){var j=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var h=e.support.transition&&i;this.$backdrop=e('').appendTo(document.body);if(this.options.backdrop!="static"){this.$backdrop.click(e.proxy(this.hide,this))}if(h){this.$backdrop[0].offsetWidth}this.$backdrop.addClass("in");h?this.$backdrop.one(e.support.transition.end,k):k()}else{if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(b,this)):b.call(this)}else{if(k){k()}}}}function b(){this.$backdrop.remove();this.$backdrop=null}function d(){var h=this;if(this.isShown&&this.options.keyboard){e(document).on("keyup.dismiss.modal",function(i){i.which==27&&h.hide()})}else{if(!this.isShown){e(document).off("keyup.dismiss.modal")}}}e.fn.modal=function(h){return this.each(function(){var k=e(this),j=k.data("modal"),i=e.extend({},e.fn.modal.defaults,k.data(),typeof h=="object"&&h);if(!j){k.data("modal",(j=new a(this,i)))}if(typeof h=="string"){j[h]()}else{if(i.show){j.show()}}})};e.fn.modal.defaults={backdrop:true,keyboard:true,show:true};e.fn.modal.Constructor=a;e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(l){var k=e(this),i,h=e(k.attr("data-target")||(i=k.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),j=h.data("modal")?"toggle":e.extend({},h.data(),k.data());l.preventDefault();h.modal(j)})})}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/progress-bars.less:
--------------------------------------------------------------------------------
1 | // PROGRESS BARS
2 | // -------------
3 |
4 |
5 | // ANIMATIONS
6 | // ----------
7 |
8 | // Webkit
9 | @-webkit-keyframes progress-bar-stripes {
10 | from { background-position: 40px 0; }
11 | to { background-position: 0 0; }
12 | }
13 |
14 | // Firefox
15 | @-moz-keyframes progress-bar-stripes {
16 | from { background-position: 40px 0; }
17 | to { background-position: 0 0; }
18 | }
19 |
20 | // IE9
21 | @-ms-keyframes progress-bar-stripes {
22 | from { background-position: 40px 0; }
23 | to { background-position: 0 0; }
24 | }
25 |
26 | // Opera
27 | @-o-keyframes progress-bar-stripes {
28 | from { background-position: 0 0; }
29 | to { background-position: 40px 0; }
30 | }
31 |
32 | // Spec
33 | @keyframes progress-bar-stripes {
34 | from { background-position: 40px 0; }
35 | to { background-position: 0 0; }
36 | }
37 |
38 |
39 |
40 | // THE BARS
41 | // --------
42 |
43 | // Outer container
44 | .progress {
45 | overflow: hidden;
46 | height: 18px;
47 | margin-bottom: 18px;
48 | #gradient > .vertical(#f5f5f5, #f9f9f9);
49 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
50 | .border-radius(4px);
51 | }
52 |
53 | // Bar of progress
54 | .progress .bar {
55 | width: 0%;
56 | height: 18px;
57 | color: @white;
58 | font-size: 12px;
59 | text-align: center;
60 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
61 | #gradient > .vertical(#149bdf, #0480be);
62 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
63 | .box-sizing(border-box);
64 | .transition(width .6s ease);
65 | }
66 |
67 | // Striped bars
68 | .progress-striped .bar {
69 | #gradient > .striped(#149bdf);
70 | .background-size(40px 40px);
71 | }
72 |
73 | // Call animation for the active one
74 | .progress.active .bar {
75 | -webkit-animation: progress-bar-stripes 2s linear infinite;
76 | -moz-animation: progress-bar-stripes 2s linear infinite;
77 | -ms-animation: progress-bar-stripes 2s linear infinite;
78 | -o-animation: progress-bar-stripes 2s linear infinite;
79 | animation: progress-bar-stripes 2s linear infinite;
80 | }
81 |
82 |
83 |
84 | // COLORS
85 | // ------
86 |
87 | // Danger (red)
88 | .progress-danger .bar {
89 | #gradient > .vertical(#ee5f5b, #c43c35);
90 | }
91 | .progress-danger.progress-striped .bar {
92 | #gradient > .striped(#ee5f5b);
93 | }
94 |
95 | // Success (green)
96 | .progress-success .bar {
97 | #gradient > .vertical(#62c462, #57a957);
98 | }
99 | .progress-success.progress-striped .bar {
100 | #gradient > .striped(#62c462);
101 | }
102 |
103 | // Info (teal)
104 | .progress-info .bar {
105 | #gradient > .vertical(#5bc0de, #339bb9);
106 | }
107 | .progress-info.progress-striped .bar {
108 | #gradient > .striped(#5bc0de);
109 | }
110 |
111 | // Warning (orange)
112 | .progress-warning .bar {
113 | #gradient > .vertical(lighten(@orange, 15%), @orange);
114 | }
115 | .progress-warning.progress-striped .bar {
116 | #gradient > .striped(lighten(@orange, 15%));
117 | }
118 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-button.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#buttons
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* BUTTON PUBLIC CLASS DEFINITION
27 | * ============================== */
28 |
29 | var Button = function (element, options) {
30 | this.$element = $(element)
31 | this.options = $.extend({}, $.fn.button.defaults, options)
32 | }
33 |
34 | Button.prototype.setState = function (state) {
35 | var d = 'disabled'
36 | , $el = this.$element
37 | , data = $el.data()
38 | , val = $el.is('input') ? 'val' : 'html'
39 |
40 | state = state + 'Text'
41 | data.resetText || $el.data('resetText', $el[val]())
42 |
43 | $el[val](data[state] || this.options[state])
44 |
45 | // push to event loop to allow forms to submit
46 | setTimeout(function () {
47 | state == 'loadingText' ?
48 | $el.addClass(d).attr(d, d) :
49 | $el.removeClass(d).removeAttr(d)
50 | }, 0)
51 | }
52 |
53 | Button.prototype.toggle = function () {
54 | var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
55 |
56 | $parent && $parent
57 | .find('.active')
58 | .removeClass('active')
59 |
60 | this.$element.toggleClass('active')
61 | }
62 |
63 |
64 | /* BUTTON PLUGIN DEFINITION
65 | * ======================== */
66 |
67 | $.fn.button = function (option) {
68 | return this.each(function () {
69 | var $this = $(this)
70 | , data = $this.data('button')
71 | , options = typeof option == 'object' && option
72 | if (!data) $this.data('button', (data = new Button(this, options)))
73 | if (option == 'toggle') data.toggle()
74 | else if (option) data.setState(option)
75 | })
76 | }
77 |
78 | $.fn.button.defaults = {
79 | loadingText: 'loading...'
80 | }
81 |
82 | $.fn.button.Constructor = Button
83 |
84 |
85 | /* BUTTON DATA-API
86 | * =============== */
87 |
88 | $(function () {
89 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
90 | var $btn = $(e.target)
91 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
92 | $btn.button('toggle')
93 | })
94 | })
95 |
96 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* DROPDOWN CLASS DEFINITION
27 | * ========================= */
28 |
29 | var toggle = '[data-toggle="dropdown"]'
30 | , Dropdown = function (element) {
31 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
32 | $('html').on('click.dropdown.data-api', function () {
33 | $el.parent().removeClass('open')
34 | })
35 | }
36 |
37 | Dropdown.prototype = {
38 |
39 | constructor: Dropdown
40 |
41 | , toggle: function (e) {
42 | var $this = $(this)
43 | , $parent
44 | , selector
45 | , isActive
46 |
47 | if ($this.is('.disabled, :disabled')) return
48 |
49 | selector = $this.attr('data-target')
50 |
51 | if (!selector) {
52 | selector = $this.attr('href')
53 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
54 | }
55 |
56 | $parent = $(selector)
57 | $parent.length || ($parent = $this.parent())
58 |
59 | isActive = $parent.hasClass('open')
60 |
61 | clearMenus()
62 |
63 | if (!isActive) $parent.toggleClass('open')
64 |
65 | return false
66 | }
67 |
68 | }
69 |
70 | function clearMenus() {
71 | $(toggle).parent().removeClass('open')
72 | }
73 |
74 |
75 | /* DROPDOWN PLUGIN DEFINITION
76 | * ========================== */
77 |
78 | $.fn.dropdown = function (option) {
79 | return this.each(function () {
80 | var $this = $(this)
81 | , data = $this.data('dropdown')
82 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
83 | if (typeof option == 'string') data[option].call($this)
84 | })
85 | }
86 |
87 | $.fn.dropdown.Constructor = Dropdown
88 |
89 |
90 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
91 | * =================================== */
92 |
93 | $(function () {
94 | $('html').on('click.dropdown.data-api', clearMenus)
95 | $('body')
96 | .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
97 | .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
98 | })
99 |
100 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-popover.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#popovers
4 | * ===========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * =========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* POPOVER PUBLIC CLASS DEFINITION
27 | * =============================== */
28 |
29 | var Popover = function ( element, options ) {
30 | this.init('popover', element, options)
31 | }
32 |
33 |
34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35 | ========================================== */
36 |
37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38 |
39 | constructor: Popover
40 |
41 | , setContent: function () {
42 | var $tip = this.tip()
43 | , title = this.getTitle()
44 | , content = this.getContent()
45 |
46 | $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
47 | $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
48 |
49 | $tip.removeClass('fade top bottom left right in')
50 | }
51 |
52 | , hasContent: function () {
53 | return this.getTitle() || this.getContent()
54 | }
55 |
56 | , getContent: function () {
57 | var content
58 | , $e = this.$element
59 | , o = this.options
60 |
61 | content = $e.attr('data-content')
62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
63 |
64 | return content
65 | }
66 |
67 | , tip: function () {
68 | if (!this.$tip) {
69 | this.$tip = $(this.options.template)
70 | }
71 | return this.$tip
72 | }
73 |
74 | })
75 |
76 |
77 | /* POPOVER PLUGIN DEFINITION
78 | * ======================= */
79 |
80 | $.fn.popover = function (option) {
81 | return this.each(function () {
82 | var $this = $(this)
83 | , data = $this.data('popover')
84 | , options = typeof option == 'object' && option
85 | if (!data) $this.data('popover', (data = new Popover(this, options)))
86 | if (typeof option == 'string') data[option]()
87 | })
88 | }
89 |
90 | $.fn.popover.Constructor = Popover
91 |
92 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
93 | placement: 'right'
94 | , content: ''
95 | , template: ''
96 | })
97 |
98 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/reset.less:
--------------------------------------------------------------------------------
1 | // Reset.less
2 | // Adapted from Normalize.css http://github.com/necolas/normalize.css
3 | // ------------------------------------------------------------------------
4 |
5 | // Display in IE6-9 and FF3
6 | // -------------------------
7 |
8 | article,
9 | aside,
10 | details,
11 | figcaption,
12 | figure,
13 | footer,
14 | header,
15 | hgroup,
16 | nav,
17 | section {
18 | display: block;
19 | }
20 |
21 | // Display block in IE6-9 and FF3
22 | // -------------------------
23 |
24 | audio,
25 | canvas,
26 | video {
27 | display: inline-block;
28 | *display: inline;
29 | *zoom: 1;
30 | }
31 |
32 | // Prevents modern browsers from displaying 'audio' without controls
33 | // -------------------------
34 |
35 | audio:not([controls]) {
36 | display: none;
37 | }
38 |
39 | // Base settings
40 | // -------------------------
41 |
42 | html {
43 | font-size: 100%;
44 | -webkit-text-size-adjust: 100%;
45 | -ms-text-size-adjust: 100%;
46 | }
47 | // Focus states
48 | a:focus {
49 | .tab-focus();
50 | }
51 | // Hover & Active
52 | a:hover,
53 | a:active {
54 | outline: 0;
55 | }
56 |
57 | // Prevents sub and sup affecting line-height in all browsers
58 | // -------------------------
59 |
60 | sub,
61 | sup {
62 | position: relative;
63 | font-size: 75%;
64 | line-height: 0;
65 | vertical-align: baseline;
66 | }
67 | sup {
68 | top: -0.5em;
69 | }
70 | sub {
71 | bottom: -0.25em;
72 | }
73 |
74 | // Img border in a's and image quality
75 | // -------------------------
76 |
77 | img {
78 | max-width: 100%; // Make images inherently responsive
79 | vertical-align: middle;
80 | border: 0;
81 | -ms-interpolation-mode: bicubic;
82 | }
83 |
84 | // Prevent max-width from affecting Google Maps
85 | #map_canvas img {
86 | max-width: none;
87 | }
88 |
89 | // Forms
90 | // -------------------------
91 |
92 | // Font size in all browsers, margin changes, misc consistency
93 | button,
94 | input,
95 | select,
96 | textarea {
97 | margin: 0;
98 | font-size: 100%;
99 | vertical-align: middle;
100 | }
101 | button,
102 | input {
103 | *overflow: visible; // Inner spacing ie IE6/7
104 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
105 | }
106 | button::-moz-focus-inner,
107 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
108 | padding: 0;
109 | border: 0;
110 | }
111 | button,
112 | input[type="button"],
113 | input[type="reset"],
114 | input[type="submit"] {
115 | cursor: pointer; // Cursors on all buttons applied consistently
116 | -webkit-appearance: button; // Style clickable inputs in iOS
117 | }
118 | input[type="search"] { // Appearance in Safari/Chrome
119 | -webkit-box-sizing: content-box;
120 | -moz-box-sizing: content-box;
121 | box-sizing: content-box;
122 | -webkit-appearance: textfield;
123 | }
124 | input[type="search"]::-webkit-search-decoration,
125 | input[type="search"]::-webkit-search-cancel-button {
126 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
127 | }
128 | textarea {
129 | overflow: auto; // Remove vertical scrollbar in IE6-9
130 | vertical-align: top; // Readability and alignment cross-browser
131 | }
132 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-typeahead.min.js:
--------------------------------------------------------------------------------
1 | !function(a){var b=function(d,c){this.$element=a(d);this.options=a.extend({},a.fn.typeahead.defaults,c);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.$menu=a(this.options.menu).appendTo("body");this.source=this.options.source;this.shown=false;this.listen()};b.prototype={constructor:b,select:function(){var c=this.$menu.find(".active").attr("data-value");this.$element.val(this.updater(c)).change();return this.hide()},updater:function(c){return c},show:function(){var c=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});this.$menu.css({top:c.top+c.height,left:c.left});this.$menu.show();this.shown=true;return this},hide:function(){this.$menu.hide();this.shown=false;return this},lookup:function(e){var d=this,c,f;this.query=this.$element.val();if(!this.query){return this.shown?this.hide():this}c=a.grep(this.source,function(g){return d.matcher(g)});c=this.sorter(c);if(!c.length){return this.shown?this.hide():this}return this.render(c.slice(0,this.options.items)).show()},matcher:function(c){return ~c.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var f=[],d=[],c=[],g;while(g=e.shift()){if(!g.toLowerCase().indexOf(this.query.toLowerCase())){f.push(g)}else{if(~g.indexOf(this.query)){d.push(g)}else{c.push(g)}}}return f.concat(d,c)},highlighter:function(c){var d=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return c.replace(new RegExp("("+d+")","ig"),function(e,f){return""+f+""})},render:function(c){var d=this;c=a(c).map(function(e,f){e=a(d.options.item).attr("data-value",f);e.find("a").html(d.highlighter(f));return e[0]});c.first().addClass("active");this.$menu.html(c);return this},next:function(d){var e=this.$menu.find(".active").removeClass("active"),c=e.next();if(!c.length){c=a(this.$menu.find("li")[0])}c.addClass("active")},prev:function(d){var e=this.$menu.find(".active").removeClass("active"),c=e.prev();if(!c.length){c=this.$menu.find("li").last()}c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this));if(a.browser.webkit||a.browser.msie){this.$element.on("keydown",a.proxy(this.keypress,this))}this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(c){switch(c.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown){return}this.select();break;case 27:if(!this.shown){return}this.hide();break;default:this.lookup()}c.stopPropagation();c.preventDefault()},keypress:function(c){if(!this.shown){return}switch(c.keyCode){case 9:case 13:case 27:c.preventDefault();break;case 38:if(c.type!="keydown"){break}c.preventDefault();this.prev();break;case 40:if(c.type!="keydown"){break}c.preventDefault();this.next();break}c.stopPropagation()},blur:function(d){var c=this;setTimeout(function(){c.hide()},150)},click:function(c){c.stopPropagation();c.preventDefault();this.select()},mouseenter:function(c){this.$menu.find(".active").removeClass("active");a(c.currentTarget).addClass("active")}};a.fn.typeahead=function(c){return this.each(function(){var f=a(this),e=f.data("typeahead"),d=typeof c=="object"&&c;if(!e){f.data("typeahead",(e=new b(this,d)))}if(typeof c=="string"){e[c]()}})};a.fn.typeahead.defaults={source:[],items:8,menu:'',item:' '};a.fn.typeahead.Constructor=b;a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(d){var c=a(this);if(c.data("typeahead")){return}d.preventDefault();c.typeahead(c.data())})})}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-tooltip.min.js:
--------------------------------------------------------------------------------
1 | !function(b){var a=function(d,c){this.init("tooltip",d,c)};a.prototype={constructor:a,init:function(f,e,d){var g,c;this.type=f;this.$element=b(e);this.options=this.getOptions(d);this.enabled=true;if(this.options.trigger!="manual"){g=this.options.trigger=="hover"?"mouseenter":"focus";c=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(g,this.options.selector,b.proxy(this.enter,this));this.$element.on(c,this.options.selector,b.proxy(this.leave,this))}this.options.selector?(this._options=b.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()},getOptions:function(c){c=b.extend({},b.fn[this.type].defaults,c,this.$element.data());if(c.delay&&typeof c.delay=="number"){c.delay={show:c.delay,hide:c.delay}}return c},enter:function(d){var c=b(d.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show){return c.show()}clearTimeout(this.timeout);c.hoverState="in";this.timeout=setTimeout(function(){if(c.hoverState=="in"){c.show()}},c.options.delay.show)},leave:function(d){var c=b(d.currentTarget)[this.type](this._options).data(this.type);if(this.timeout){clearTimeout(this.timeout)}if(!c.options.delay||!c.options.delay.hide){return c.hide()}c.hoverState="out";this.timeout=setTimeout(function(){if(c.hoverState=="out"){c.hide()}},c.options.delay.hide)},show:function(){var g,c,i,e,h,d,f;if(this.hasContent()&&this.enabled){g=this.tip();this.setContent();if(this.options.animation){g.addClass("fade")}d=typeof this.options.placement=="function"?this.options.placement.call(this,g[0],this.$element[0]):this.options.placement;c=/in/.test(d);g.remove().css({top:0,left:0,display:"block"}).appendTo(c?this.$element:document.body);i=this.getPosition(c);e=g[0].offsetWidth;h=g[0].offsetHeight;switch(c?d.split(" ")[1]:d){case"bottom":f={top:i.top+i.height,left:i.left+i.width/2-e/2};break;case"top":f={top:i.top-h,left:i.left+i.width/2-e/2};break;case"left":f={top:i.top+i.height/2-h/2,left:i.left-e};break;case"right":f={top:i.top+i.height/2-h/2,left:i.left+i.width};break}g.css(f).addClass(d).addClass("in")}},isHTML:function(c){return typeof c!="string"||(c.charAt(0)==="<"&&c.charAt(c.length-1)===">"&&c.length>=3)||/^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(c)},setContent:function(){var d=this.tip(),c=this.getTitle();d.find(".tooltip-inner")[this.isHTML(c)?"html":"text"](c);d.removeClass("fade in top bottom left right")},hide:function(){var c=this,d=this.tip();d.removeClass("in");function e(){var f=setTimeout(function(){d.off(b.support.transition.end).remove()},500);d.one(b.support.transition.end,function(){clearTimeout(f);d.remove()})}b.support.transition&&this.$tip.hasClass("fade")?e():d.remove()},fixTitle:function(){var c=this.$element;if(c.attr("title")||typeof(c.attr("data-original-title"))!="string"){c.attr("data-original-title",c.attr("title")||"").removeAttr("title")}},hasContent:function(){return this.getTitle()},getPosition:function(c){return b.extend({},(c?{top:0,left:0}:this.$element.offset()),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,c=this.$element,d=this.options;e=c.attr("data-original-title")||(typeof d.title=="function"?d.title.call(c[0]):d.title);return e},tip:function(){return this.$tip=this.$tip||b(this.options.template)},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},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};b.fn.tooltip=function(c){return this.each(function(){var f=b(this),e=f.data("tooltip"),d=typeof c=="object"&&c;if(!e){f.data("tooltip",(e=new a(this,d)))}if(typeof c=="string"){e[c]()}})};b.fn.tooltip.Constructor=a;b.fn.tooltip.defaults={animation:true,placement:"top",selector:false,template:'',trigger:"hover",title:"",delay:0}}(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/dropdowns.less:
--------------------------------------------------------------------------------
1 | // DROPDOWN MENUS
2 | // --------------
3 |
4 | // Use the .menu class on any element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5 | .dropup,
6 | .dropdown {
7 | position: relative;
8 | }
9 | .dropdown-toggle {
10 | // The caret makes the toggle a bit too tall in IE7
11 | *margin-bottom: -3px;
12 | }
13 | .dropdown-toggle:active,
14 | .open .dropdown-toggle {
15 | outline: 0;
16 | }
17 |
18 | // Dropdown arrow/caret
19 | // --------------------
20 | .caret {
21 | display: inline-block;
22 | width: 0;
23 | height: 0;
24 | vertical-align: top;
25 | border-top: 4px solid @black;
26 | border-right: 4px solid transparent;
27 | border-left: 4px solid transparent;
28 | content: "";
29 | .opacity(30);
30 | }
31 |
32 | // Place the caret
33 | .dropdown .caret {
34 | margin-top: 8px;
35 | margin-left: 2px;
36 | }
37 | .dropdown:hover .caret,
38 | .open .caret {
39 | .opacity(100);
40 | }
41 |
42 | // The dropdown menu (ul)
43 | // ----------------------
44 | .dropdown-menu {
45 | position: absolute;
46 | top: 100%;
47 | left: 0;
48 | z-index: @zindexDropdown;
49 | display: none; // none by default, but block on "open" of the menu
50 | float: left;
51 | min-width: 160px;
52 | padding: 4px 0;
53 | margin: 1px 0 0; // override default ul
54 | list-style: none;
55 | background-color: @dropdownBackground;
56 | border: 1px solid #ccc;
57 | border: 1px solid rgba(0,0,0,.2);
58 | *border-right-width: 2px;
59 | *border-bottom-width: 2px;
60 | .border-radius(5px);
61 | .box-shadow(0 5px 10px rgba(0,0,0,.2));
62 | -webkit-background-clip: padding-box;
63 | -moz-background-clip: padding;
64 | background-clip: padding-box;
65 |
66 | // Aligns the dropdown menu to right
67 | &.pull-right {
68 | right: 0;
69 | left: auto;
70 | }
71 |
72 | // Dividers (basically an hr) within the dropdown
73 | .divider {
74 | .nav-divider(@dropdownDividerTop, @dropdownDividerBottom);
75 | }
76 |
77 | // Links within the dropdown menu
78 | a {
79 | display: block;
80 | padding: 3px 15px;
81 | clear: both;
82 | font-weight: normal;
83 | line-height: @baseLineHeight;
84 | color: @dropdownLinkColor;
85 | white-space: nowrap;
86 | }
87 | }
88 |
89 | // Hover state
90 | // -----------
91 | .dropdown-menu li > a:hover,
92 | .dropdown-menu .active > a,
93 | .dropdown-menu .active > a:hover {
94 | color: @dropdownLinkColorHover;
95 | text-decoration: none;
96 | background-color: @dropdownLinkBackgroundHover;
97 | }
98 |
99 | // Open state for the dropdown
100 | // ---------------------------
101 | .open {
102 | // IE7's z-index only goes to the nearest positioned ancestor, which would
103 | // make the menu appear below buttons that appeared later on the page
104 | *z-index: @zindexDropdown;
105 |
106 | & > .dropdown-menu {
107 | display: block;
108 | }
109 | }
110 |
111 | // Right aligned dropdowns
112 | // ---------------------------
113 | .pull-right > .dropdown-menu {
114 | right: 0;
115 | left: auto;
116 | }
117 |
118 | // Allow for dropdowns to go bottom up (aka, dropup-menu)
119 | // ------------------------------------------------------
120 | // Just add .dropup after the standard .dropdown class and you're set, bro.
121 | // TODO: abstract this so that the navbar fixed styles are not placed here?
122 | .dropup,
123 | .navbar-fixed-bottom .dropdown {
124 | // Reverse the caret
125 | .caret {
126 | border-top: 0;
127 | border-bottom: 4px solid @black;
128 | content: "\2191";
129 | }
130 | // Different positioning for bottom up menu
131 | .dropdown-menu {
132 | top: auto;
133 | bottom: 100%;
134 | margin-bottom: 1px;
135 | }
136 | }
137 |
138 | // Typeahead
139 | // ---------
140 | .typeahead {
141 | margin-top: 2px; // give it some space to breathe
142 | .border-radius(4px);
143 | }
144 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | /* ========================================================
2 | * bootstrap-tab.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#tabs
4 | * ========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ======================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* TAB CLASS DEFINITION
27 | * ==================== */
28 |
29 | var Tab = function ( element ) {
30 | this.element = $(element)
31 | }
32 |
33 | Tab.prototype = {
34 |
35 | constructor: Tab
36 |
37 | , show: function () {
38 | var $this = this.element
39 | , $ul = $this.closest('ul:not(.dropdown-menu)')
40 | , selector = $this.attr('data-target')
41 | , previous
42 | , $target
43 | , e
44 |
45 | if (!selector) {
46 | selector = $this.attr('href')
47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
48 | }
49 |
50 | if ( $this.parent('li').hasClass('active') ) return
51 |
52 | previous = $ul.find('.active a').last()[0]
53 |
54 | e = $.Event('show', {
55 | relatedTarget: previous
56 | })
57 |
58 | $this.trigger(e)
59 |
60 | if (e.isDefaultPrevented()) return
61 |
62 | $target = $(selector)
63 |
64 | this.activate($this.parent('li'), $ul)
65 | this.activate($target, $target.parent(), function () {
66 | $this.trigger({
67 | type: 'shown'
68 | , relatedTarget: previous
69 | })
70 | })
71 | }
72 |
73 | , activate: function ( element, container, callback) {
74 | var $active = container.find('> .active')
75 | , transition = callback
76 | && $.support.transition
77 | && $active.hasClass('fade')
78 |
79 | function next() {
80 | $active
81 | .removeClass('active')
82 | .find('> .dropdown-menu > .active')
83 | .removeClass('active')
84 |
85 | element.addClass('active')
86 |
87 | if (transition) {
88 | element[0].offsetWidth // reflow for transition
89 | element.addClass('in')
90 | } else {
91 | element.removeClass('fade')
92 | }
93 |
94 | if ( element.parent('.dropdown-menu') ) {
95 | element.closest('li.dropdown').addClass('active')
96 | }
97 |
98 | callback && callback()
99 | }
100 |
101 | transition ?
102 | $active.one($.support.transition.end, next) :
103 | next()
104 |
105 | $active.removeClass('in')
106 | }
107 | }
108 |
109 |
110 | /* TAB PLUGIN DEFINITION
111 | * ===================== */
112 |
113 | $.fn.tab = function ( option ) {
114 | return this.each(function () {
115 | var $this = $(this)
116 | , data = $this.data('tab')
117 | if (!data) $this.data('tab', (data = new Tab(this)))
118 | if (typeof option == 'string') data[option]()
119 | })
120 | }
121 |
122 | $.fn.tab.Constructor = Tab
123 |
124 |
125 | /* TAB DATA-API
126 | * ============ */
127 |
128 | $(function () {
129 | $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
130 | e.preventDefault()
131 | $(this).tab('show')
132 | })
133 | })
134 |
135 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/templates/accept.mak:
--------------------------------------------------------------------------------
1 | ## -*- coding: utf-8 -*-
2 |
3 |
4 |
5 |
6 | Fedora Summer of Fun
7 |
8 |
9 |
10 |
11 | ##
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 | <% flash = '. '.join(request.session.pop_flash()) %>
22 | % if flash:
23 | % if flash.startswith('Error:'):
24 |
25 | Error
26 | ${flash[7:]}
27 |
28 | % else:
29 |
30 | Success!
31 | ${flash}
32 |
33 | %endif
34 | % endif
35 |
36 |
37 |
38 | Fedora
39 | Summer of Open Hardware and Fun!
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | Congratulations!
48 | We just need a few more details from you to ship your open hardware to you:
49 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
85 |
86 |
87 |
88 |
89 |
98 | ##
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/templates/submissions.mak:
--------------------------------------------------------------------------------
1 | ## -*- coding: utf-8 -*-
2 |
3 |
4 |
5 |
6 |
9 | ##
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | <% flash = '. '.join(request.session.pop_flash()) %>
23 | % if flash:
24 | % if flash.startswith('Error:'):
25 |
26 | Error
27 | ${flash[7:]}
28 |
29 | % else:
30 |
31 | Success!
32 | ${flash}
33 |
34 | %endif
35 | % endif
36 |
37 |
38 |
39 | Fedora
40 | Summer of Open Hardware and Fun!
41 |
42 |
43 |
44 |
45 |
46 |
47 | CSV
48 | Logout
49 |
50 |
51 |
52 |
53 |
54 | % for name, hw in hardware.iteritems():
55 |
56 | ${name}
57 |
58 | - Available: ${hw['num']}
59 | - Approved: ${hw['approved']}
60 | - Unapproved: ${hw['unapproved']}
61 |
62 |
63 | % endfor
64 |
65 |
66 |
67 | ${len(selected)} entries randomly selected below.
68 |
69 | % if now >= stop_date:
70 |
98 |
99 | Approved Entries
100 |
101 | Real Name Username Phone Hardware Text Country Address
102 | % for app in applications:
103 | % if app.approved:
104 |
105 | ${app.realname.decode('utf-8')}
106 | ${app.username}
107 | ${app.phone}
108 | ${app.hardware}
109 | % if app.shield:
110 | (${app.shield})
111 | % endif
112 |
113 | ${app.text.decode('utf-8')}
114 | ${app.country}
115 | ${app.address and app.address.decode('utf-8') or app.address}
116 |
117 | % endif
118 | % endfor
119 |
120 |
121 |
122 |
123 |
124 | ##
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/type.less:
--------------------------------------------------------------------------------
1 | // Typography.less
2 | // Headings, body text, lists, code, and more for a versatile and durable typography system
3 | // ----------------------------------------------------------------------------------------
4 |
5 |
6 | // BODY TEXT
7 | // ---------
8 |
9 | p {
10 | margin: 0 0 @baseLineHeight / 2;
11 | small {
12 | font-size: @baseFontSize - 2;
13 | color: @grayLight;
14 | }
15 | }
16 | .lead {
17 | margin-bottom: @baseLineHeight;
18 | font-size: 20px;
19 | font-weight: 200;
20 | line-height: @baseLineHeight * 1.5;
21 | }
22 |
23 | // HEADINGS
24 | // --------
25 |
26 | h1, h2, h3, h4, h5, h6 {
27 | margin: 0;
28 | font-family: @headingsFontFamily;
29 | font-weight: @headingsFontWeight;
30 | color: @headingsColor;
31 | text-rendering: optimizelegibility; // Fix the character spacing for headings
32 | small {
33 | font-weight: normal;
34 | color: @grayLight;
35 | }
36 | }
37 | h1 {
38 | font-size: 30px;
39 | line-height: @baseLineHeight * 2;
40 | small {
41 | font-size: 18px;
42 | }
43 | }
44 | h2 {
45 | font-size: 24px;
46 | line-height: @baseLineHeight * 2;
47 | small {
48 | font-size: 18px;
49 | }
50 | }
51 | h3 {
52 | font-size: 18px;
53 | line-height: @baseLineHeight * 1.5;
54 | small {
55 | font-size: 14px;
56 | }
57 | }
58 | h4, h5, h6 {
59 | line-height: @baseLineHeight;
60 | }
61 | h4 {
62 | font-size: 14px;
63 | small {
64 | font-size: 12px;
65 | }
66 | }
67 | h5 {
68 | font-size: 12px;
69 | }
70 | h6 {
71 | font-size: 11px;
72 | color: @grayLight;
73 | text-transform: uppercase;
74 | }
75 |
76 | // Page header
77 | .page-header {
78 | padding-bottom: @baseLineHeight - 1;
79 | margin: @baseLineHeight 0;
80 | border-bottom: 1px solid @grayLighter;
81 | }
82 | .page-header h1 {
83 | line-height: 1;
84 | }
85 |
86 |
87 |
88 | // LISTS
89 | // -----
90 |
91 | // Unordered and Ordered lists
92 | ul, ol {
93 | padding: 0;
94 | margin: 0 0 @baseLineHeight / 2 25px;
95 | }
96 | ul ul,
97 | ul ol,
98 | ol ol,
99 | ol ul {
100 | margin-bottom: 0;
101 | }
102 | ul {
103 | list-style: disc;
104 | }
105 | ol {
106 | list-style: decimal;
107 | }
108 | li {
109 | line-height: @baseLineHeight;
110 | }
111 | ul.unstyled,
112 | ol.unstyled {
113 | margin-left: 0;
114 | list-style: none;
115 | }
116 |
117 | // Description Lists
118 | dl {
119 | margin-bottom: @baseLineHeight;
120 | }
121 | dt,
122 | dd {
123 | line-height: @baseLineHeight;
124 | }
125 | dt {
126 | font-weight: bold;
127 | line-height: @baseLineHeight - 1; // fix jank Helvetica Neue font bug
128 | }
129 | dd {
130 | margin-left: @baseLineHeight / 2;
131 | }
132 | // Horizontal layout (like forms)
133 | .dl-horizontal {
134 | dt {
135 | float: left;
136 | width: 120px;
137 | clear: left;
138 | text-align: right;
139 | .text-overflow();
140 | }
141 | dd {
142 | margin-left: 130px;
143 | }
144 | }
145 |
146 | // MISC
147 | // ----
148 |
149 | // Horizontal rules
150 | hr {
151 | margin: @baseLineHeight 0;
152 | border: 0;
153 | border-top: 1px solid @hrBorder;
154 | border-bottom: 1px solid @white;
155 | }
156 |
157 | // Emphasis
158 | strong {
159 | font-weight: bold;
160 | }
161 | em {
162 | font-style: italic;
163 | }
164 | .muted {
165 | color: @grayLight;
166 | }
167 |
168 | // Abbreviations and acronyms
169 | abbr[title] {
170 | cursor: help;
171 | border-bottom: 1px dotted @grayLight;
172 | }
173 | abbr.initialism {
174 | font-size: 90%;
175 | text-transform: uppercase;
176 | }
177 |
178 | // Blockquotes
179 | blockquote {
180 | padding: 0 0 0 15px;
181 | margin: 0 0 @baseLineHeight;
182 | border-left: 5px solid @grayLighter;
183 | p {
184 | margin-bottom: 0;
185 | #font > .shorthand(16px,300,@baseLineHeight * 1.25);
186 | }
187 | small {
188 | display: block;
189 | line-height: @baseLineHeight;
190 | color: @grayLight;
191 | &:before {
192 | content: '\2014 \00A0';
193 | }
194 | }
195 |
196 | // Float right with text-align: right
197 | &.pull-right {
198 | float: right;
199 | padding-right: 15px;
200 | padding-left: 0;
201 | border-right: 5px solid @grayLighter;
202 | border-left: 0;
203 | p,
204 | small {
205 | text-align: right;
206 | }
207 | }
208 | }
209 |
210 | // Quotes
211 | q:before,
212 | q:after,
213 | blockquote:before,
214 | blockquote:after {
215 | content: "";
216 | }
217 |
218 | // Addresses
219 | address {
220 | display: block;
221 | margin-bottom: @baseLineHeight;
222 | font-style: normal;
223 | line-height: @baseLineHeight;
224 | }
225 |
226 | // Misc
227 | small {
228 | font-size: 100%;
229 | }
230 | cite {
231 | font-style: normal;
232 | }
233 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-scrollspy.js:
--------------------------------------------------------------------------------
1 | /* =============================================================
2 | * bootstrap-scrollspy.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4 | * =============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* SCROLLSPY CLASS DEFINITION
27 | * ========================== */
28 |
29 | function ScrollSpy( element, options) {
30 | var process = $.proxy(this.process, this)
31 | , $element = $(element).is('body') ? $(window) : $(element)
32 | , href
33 | this.options = $.extend({}, $.fn.scrollspy.defaults, options)
34 | this.$scrollElement = $element.on('scroll.scroll.data-api', process)
35 | this.selector = (this.options.target
36 | || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
37 | || '') + ' .nav li > a'
38 | this.$body = $('body')
39 | this.refresh()
40 | this.process()
41 | }
42 |
43 | ScrollSpy.prototype = {
44 |
45 | constructor: ScrollSpy
46 |
47 | , refresh: function () {
48 | var self = this
49 | , $targets
50 |
51 | this.offsets = $([])
52 | this.targets = $([])
53 |
54 | $targets = this.$body
55 | .find(this.selector)
56 | .map(function () {
57 | var $el = $(this)
58 | , href = $el.data('target') || $el.attr('href')
59 | , $href = /^#\w/.test(href) && $(href)
60 | return ( $href
61 | && href.length
62 | && [[ $href.position().top, href ]] ) || null
63 | })
64 | .sort(function (a, b) { return a[0] - b[0] })
65 | .each(function () {
66 | self.offsets.push(this[0])
67 | self.targets.push(this[1])
68 | })
69 | }
70 |
71 | , process: function () {
72 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
73 | , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
74 | , maxScroll = scrollHeight - this.$scrollElement.height()
75 | , offsets = this.offsets
76 | , targets = this.targets
77 | , activeTarget = this.activeTarget
78 | , i
79 |
80 | if (scrollTop >= maxScroll) {
81 | return activeTarget != (i = targets.last()[0])
82 | && this.activate ( i )
83 | }
84 |
85 | for (i = offsets.length; i--;) {
86 | activeTarget != targets[i]
87 | && scrollTop >= offsets[i]
88 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
89 | && this.activate( targets[i] )
90 | }
91 | }
92 |
93 | , activate: function (target) {
94 | var active
95 | , selector
96 |
97 | this.activeTarget = target
98 |
99 | $(this.selector)
100 | .parent('.active')
101 | .removeClass('active')
102 |
103 | selector = this.selector
104 | + '[data-target="' + target + '"],'
105 | + this.selector + '[href="' + target + '"]'
106 |
107 | active = $(selector)
108 | .parent('li')
109 | .addClass('active')
110 |
111 | if (active.parent('.dropdown-menu')) {
112 | active = active.closest('li.dropdown').addClass('active')
113 | }
114 |
115 | active.trigger('activate')
116 | }
117 |
118 | }
119 |
120 |
121 | /* SCROLLSPY PLUGIN DEFINITION
122 | * =========================== */
123 |
124 | $.fn.scrollspy = function ( option ) {
125 | return this.each(function () {
126 | var $this = $(this)
127 | , data = $this.data('scrollspy')
128 | , options = typeof option == 'object' && option
129 | if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
130 | if (typeof option == 'string') data[option]()
131 | })
132 | }
133 |
134 | $.fn.scrollspy.Constructor = ScrollSpy
135 |
136 | $.fn.scrollspy.defaults = {
137 | offset: 10
138 | }
139 |
140 |
141 | /* SCROLLSPY DATA-API
142 | * ================== */
143 |
144 | $(function () {
145 | $('[data-spy="scroll"]').each(function () {
146 | var $spy = $(this)
147 | $spy.scrollspy($spy.data())
148 | })
149 | })
150 |
151 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-collapse.js:
--------------------------------------------------------------------------------
1 | /* =============================================================
2 | * bootstrap-collapse.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#collapse
4 | * =============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* COLLAPSE PUBLIC CLASS DEFINITION
27 | * ================================ */
28 |
29 | var Collapse = function (element, options) {
30 | this.$element = $(element)
31 | this.options = $.extend({}, $.fn.collapse.defaults, options)
32 |
33 | if (this.options.parent) {
34 | this.$parent = $(this.options.parent)
35 | }
36 |
37 | this.options.toggle && this.toggle()
38 | }
39 |
40 | Collapse.prototype = {
41 |
42 | constructor: Collapse
43 |
44 | , dimension: function () {
45 | var hasWidth = this.$element.hasClass('width')
46 | return hasWidth ? 'width' : 'height'
47 | }
48 |
49 | , show: function () {
50 | var dimension
51 | , scroll
52 | , actives
53 | , hasData
54 |
55 | if (this.transitioning) return
56 |
57 | dimension = this.dimension()
58 | scroll = $.camelCase(['scroll', dimension].join('-'))
59 | actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60 |
61 | if (actives && actives.length) {
62 | hasData = actives.data('collapse')
63 | if (hasData && hasData.transitioning) return
64 | actives.collapse('hide')
65 | hasData || actives.data('collapse', null)
66 | }
67 |
68 | this.$element[dimension](0)
69 | this.transition('addClass', $.Event('show'), 'shown')
70 | this.$element[dimension](this.$element[0][scroll])
71 | }
72 |
73 | , hide: function () {
74 | var dimension
75 | if (this.transitioning) return
76 | dimension = this.dimension()
77 | this.reset(this.$element[dimension]())
78 | this.transition('removeClass', $.Event('hide'), 'hidden')
79 | this.$element[dimension](0)
80 | }
81 |
82 | , reset: function (size) {
83 | var dimension = this.dimension()
84 |
85 | this.$element
86 | .removeClass('collapse')
87 | [dimension](size || 'auto')
88 | [0].offsetWidth
89 |
90 | this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
91 |
92 | return this
93 | }
94 |
95 | , transition: function (method, startEvent, completeEvent) {
96 | var that = this
97 | , complete = function () {
98 | if (startEvent.type == 'show') that.reset()
99 | that.transitioning = 0
100 | that.$element.trigger(completeEvent)
101 | }
102 |
103 | this.$element.trigger(startEvent)
104 |
105 | if (startEvent.isDefaultPrevented()) return
106 |
107 | this.transitioning = 1
108 |
109 | this.$element[method]('in')
110 |
111 | $.support.transition && this.$element.hasClass('collapse') ?
112 | this.$element.one($.support.transition.end, complete) :
113 | complete()
114 | }
115 |
116 | , toggle: function () {
117 | this[this.$element.hasClass('in') ? 'hide' : 'show']()
118 | }
119 |
120 | }
121 |
122 |
123 | /* COLLAPSIBLE PLUGIN DEFINITION
124 | * ============================== */
125 |
126 | $.fn.collapse = function (option) {
127 | return this.each(function () {
128 | var $this = $(this)
129 | , data = $this.data('collapse')
130 | , options = typeof option == 'object' && option
131 | if (!data) $this.data('collapse', (data = new Collapse(this, options)))
132 | if (typeof option == 'string') data[option]()
133 | })
134 | }
135 |
136 | $.fn.collapse.defaults = {
137 | toggle: true
138 | }
139 |
140 | $.fn.collapse.Constructor = Collapse
141 |
142 |
143 | /* COLLAPSIBLE DATA-API
144 | * ==================== */
145 |
146 | $(function () {
147 | $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
148 | var $this = $(this), href
149 | , target = $this.attr('data-target')
150 | || e.preventDefault()
151 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152 | , option = $(target).data('collapse') ? 'toggle' : $this.data()
153 | $(target).collapse(option)
154 | })
155 | })
156 |
157 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/tables.less:
--------------------------------------------------------------------------------
1 | //
2 | // Tables.less
3 | // Tables for, you guessed it, tabular data
4 | // ----------------------------------------
5 |
6 |
7 | // BASE TABLES
8 | // -----------------
9 |
10 | table {
11 | max-width: 100%;
12 | background-color: @tableBackground;
13 | border-collapse: collapse;
14 | border-spacing: 0;
15 | }
16 |
17 | // BASELINE STYLES
18 | // ---------------
19 |
20 | .table {
21 | width: 100%;
22 | margin-bottom: @baseLineHeight;
23 | // Cells
24 | th,
25 | td {
26 | padding: 8px;
27 | line-height: @baseLineHeight;
28 | text-align: left;
29 | vertical-align: top;
30 | border-top: 1px solid @tableBorder;
31 | }
32 | th {
33 | font-weight: bold;
34 | }
35 | // Bottom align for column headings
36 | thead th {
37 | vertical-align: bottom;
38 | }
39 | // Remove top border from thead by default
40 | caption + thead tr:first-child th,
41 | caption + thead tr:first-child td,
42 | colgroup + thead tr:first-child th,
43 | colgroup + thead tr:first-child td,
44 | thead:first-child tr:first-child th,
45 | thead:first-child tr:first-child td {
46 | border-top: 0;
47 | }
48 | // Account for multiple tbody instances
49 | tbody + tbody {
50 | border-top: 2px solid @tableBorder;
51 | }
52 | }
53 |
54 |
55 |
56 | // CONDENSED TABLE W/ HALF PADDING
57 | // -------------------------------
58 |
59 | .table-condensed {
60 | th,
61 | td {
62 | padding: 4px 5px;
63 | }
64 | }
65 |
66 |
67 | // BORDERED VERSION
68 | // ----------------
69 |
70 | .table-bordered {
71 | border: 1px solid @tableBorder;
72 | border-collapse: separate; // Done so we can round those corners!
73 | *border-collapse: collapsed; // IE7 can't round corners anyway
74 | border-left: 0;
75 | .border-radius(4px);
76 | th,
77 | td {
78 | border-left: 1px solid @tableBorder;
79 | }
80 | // Prevent a double border
81 | caption + thead tr:first-child th,
82 | caption + tbody tr:first-child th,
83 | caption + tbody tr:first-child td,
84 | colgroup + thead tr:first-child th,
85 | colgroup + tbody tr:first-child th,
86 | colgroup + tbody tr:first-child td,
87 | thead:first-child tr:first-child th,
88 | tbody:first-child tr:first-child th,
89 | tbody:first-child tr:first-child td {
90 | border-top: 0;
91 | }
92 | // For first th or td in the first row in the first thead or tbody
93 | thead:first-child tr:first-child th:first-child,
94 | tbody:first-child tr:first-child td:first-child {
95 | -webkit-border-top-left-radius: 4px;
96 | border-top-left-radius: 4px;
97 | -moz-border-radius-topleft: 4px;
98 | }
99 | thead:first-child tr:first-child th:last-child,
100 | tbody:first-child tr:first-child td:last-child {
101 | -webkit-border-top-right-radius: 4px;
102 | border-top-right-radius: 4px;
103 | -moz-border-radius-topright: 4px;
104 | }
105 | // For first th or td in the first row in the first thead or tbody
106 | thead:last-child tr:last-child th:first-child,
107 | tbody:last-child tr:last-child td:first-child {
108 | .border-radius(0 0 0 4px);
109 | -webkit-border-bottom-left-radius: 4px;
110 | border-bottom-left-radius: 4px;
111 | -moz-border-radius-bottomleft: 4px;
112 | }
113 | thead:last-child tr:last-child th:last-child,
114 | tbody:last-child tr:last-child td:last-child {
115 | -webkit-border-bottom-right-radius: 4px;
116 | border-bottom-right-radius: 4px;
117 | -moz-border-radius-bottomright: 4px;
118 | }
119 | }
120 |
121 |
122 | // ZEBRA-STRIPING
123 | // --------------
124 |
125 | // Default zebra-stripe styles (alternating gray and transparent backgrounds)
126 | .table-striped {
127 | tbody {
128 | tr:nth-child(odd) td,
129 | tr:nth-child(odd) th {
130 | background-color: @tableBackgroundAccent;
131 | }
132 | }
133 | }
134 |
135 |
136 | // HOVER EFFECT
137 | // ------------
138 | // Placed here since it has to come after the potential zebra striping
139 | .table {
140 | tbody tr:hover td,
141 | tbody tr:hover th {
142 | background-color: @tableBackgroundHover;
143 | }
144 | }
145 |
146 |
147 | // TABLE CELL SIZING
148 | // -----------------
149 |
150 | // Change the columns
151 | table {
152 | .span1 { .tableColumns(1); }
153 | .span2 { .tableColumns(2); }
154 | .span3 { .tableColumns(3); }
155 | .span4 { .tableColumns(4); }
156 | .span5 { .tableColumns(5); }
157 | .span6 { .tableColumns(6); }
158 | .span7 { .tableColumns(7); }
159 | .span8 { .tableColumns(8); }
160 | .span9 { .tableColumns(9); }
161 | .span10 { .tableColumns(10); }
162 | .span11 { .tableColumns(11); }
163 | .span12 { .tableColumns(12); }
164 | .span13 { .tableColumns(13); }
165 | .span14 { .tableColumns(14); }
166 | .span15 { .tableColumns(15); }
167 | .span16 { .tableColumns(16); }
168 | .span17 { .tableColumns(17); }
169 | .span18 { .tableColumns(18); }
170 | .span19 { .tableColumns(19); }
171 | .span20 { .tableColumns(20); }
172 | .span21 { .tableColumns(21); }
173 | .span22 { .tableColumns(22); }
174 | .span23 { .tableColumns(23); }
175 | .span24 { .tableColumns(24); }
176 | }
177 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/buttons.less:
--------------------------------------------------------------------------------
1 | // BUTTON STYLES
2 | // -------------
3 |
4 |
5 | // Base styles
6 | // --------------------------------------------------
7 |
8 | // Core
9 | .btn {
10 | display: inline-block;
11 | .ie7-inline-block();
12 | padding: 4px 10px 4px;
13 | margin-bottom: 0; // For input.btn
14 | font-size: @baseFontSize;
15 | line-height: @baseLineHeight;
16 | *line-height: 20px;
17 | color: @grayDark;
18 | text-align: center;
19 | text-shadow: 0 1px 1px rgba(255,255,255,.75);
20 | vertical-align: middle;
21 | cursor: pointer;
22 | .buttonBackground(@btnBackground, @btnBackgroundHighlight);
23 | border: 1px solid @btnBorder;
24 | *border: 0; // Remove the border to prevent IE7's black border on input:focus
25 | border-bottom-color: darken(@btnBorder, 10%);
26 | .border-radius(4px);
27 | .ie7-restore-left-whitespace(); // Give IE7 some love
28 | .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
29 | }
30 |
31 | // Hover state
32 | .btn:hover {
33 | color: @grayDark;
34 | text-decoration: none;
35 | background-color: darken(@white, 10%);
36 | *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
37 | background-position: 0 -15px;
38 |
39 | // transition is only when going to hover, otherwise the background
40 | // behind the gradient (there for IE<=9 fallback) gets mismatched
41 | .transition(background-position .1s linear);
42 | }
43 |
44 | // Focus state for keyboard and accessibility
45 | .btn:focus {
46 | .tab-focus();
47 | }
48 |
49 | // Active state
50 | .btn.active,
51 | .btn:active {
52 | background-color: darken(@white, 10%);
53 | background-color: darken(@white, 15%) e("\9");
54 | background-image: none;
55 | outline: 0;
56 | .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
57 | }
58 |
59 | // Disabled state
60 | .btn.disabled,
61 | .btn[disabled] {
62 | cursor: default;
63 | background-color: darken(@white, 10%);
64 | background-image: none;
65 | .opacity(65);
66 | .box-shadow(none);
67 | }
68 |
69 |
70 | // Button Sizes
71 | // --------------------------------------------------
72 |
73 | // Large
74 | .btn-large {
75 | padding: 9px 14px;
76 | font-size: @baseFontSize + 2px;
77 | line-height: normal;
78 | .border-radius(5px);
79 | }
80 | .btn-large [class^="icon-"] {
81 | margin-top: 1px;
82 | }
83 |
84 | // Small
85 | .btn-small {
86 | padding: 5px 9px;
87 | font-size: @baseFontSize - 2px;
88 | line-height: @baseLineHeight - 2px;
89 | }
90 | .btn-small [class^="icon-"] {
91 | margin-top: -1px;
92 | }
93 |
94 | // Mini
95 | .btn-mini {
96 | padding: 2px 6px;
97 | font-size: @baseFontSize - 2px;
98 | line-height: @baseLineHeight - 4px;
99 | }
100 |
101 |
102 | // Alternate buttons
103 | // --------------------------------------------------
104 |
105 | // Set text color
106 | // -------------------------
107 | .btn-primary,
108 | .btn-primary:hover,
109 | .btn-warning,
110 | .btn-warning:hover,
111 | .btn-danger,
112 | .btn-danger:hover,
113 | .btn-success,
114 | .btn-success:hover,
115 | .btn-info,
116 | .btn-info:hover,
117 | .btn-inverse,
118 | .btn-inverse:hover {
119 | color: @white;
120 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121 | }
122 | // Provide *some* extra contrast for those who can get it
123 | .btn-primary.active,
124 | .btn-warning.active,
125 | .btn-danger.active,
126 | .btn-success.active,
127 | .btn-info.active,
128 | .btn-inverse.active {
129 | color: rgba(255,255,255,.75);
130 | }
131 |
132 | // Set the backgrounds
133 | // -------------------------
134 | .btn {
135 | // reset here as of 2.0.3 due to Recess property order
136 | border-color: #ccc;
137 | border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
138 | }
139 | .btn-primary {
140 | .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
141 | }
142 | // Warning appears are orange
143 | .btn-warning {
144 | .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
145 | }
146 | // Danger and error appear as red
147 | .btn-danger {
148 | .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
149 | }
150 | // Success appears as green
151 | .btn-success {
152 | .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
153 | }
154 | // Info appears as a neutral blue
155 | .btn-info {
156 | .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
157 | }
158 | // Inverse appears as dark gray
159 | .btn-inverse {
160 | .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
161 | }
162 |
163 |
164 | // Cross-browser Jank
165 | // --------------------------------------------------
166 |
167 | button.btn,
168 | input[type="submit"].btn {
169 |
170 | // Firefox 3.6 only I believe
171 | &::-moz-focus-inner {
172 | padding: 0;
173 | border: 0;
174 | }
175 |
176 | // IE7 has some default padding on button controls
177 | *padding-top: 2px;
178 | *padding-bottom: 2px;
179 | &.btn-large {
180 | *padding-top: 7px;
181 | *padding-bottom: 7px;
182 | }
183 | &.btn-small {
184 | *padding-top: 3px;
185 | *padding-bottom: 3px;
186 | }
187 | &.btn-mini {
188 | *padding-top: 1px;
189 | *padding-bottom: 1px;
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/button-groups.less:
--------------------------------------------------------------------------------
1 | // BUTTON GROUPS
2 | // -------------
3 |
4 |
5 | // Make the div behave like a button
6 | .btn-group {
7 | position: relative;
8 | .clearfix(); // clears the floated buttons
9 | .ie7-restore-left-whitespace();
10 | }
11 |
12 | // Space out series of button groups
13 | .btn-group + .btn-group {
14 | margin-left: 5px;
15 | }
16 |
17 | // Optional: Group multiple button groups together for a toolbar
18 | .btn-toolbar {
19 | margin-top: @baseLineHeight / 2;
20 | margin-bottom: @baseLineHeight / 2;
21 | .btn-group {
22 | display: inline-block;
23 | .ie7-inline-block();
24 | }
25 | }
26 |
27 | // Float them, remove border radius, then re-add to first and last elements
28 | .btn-group > .btn {
29 | position: relative;
30 | float: left;
31 | margin-left: -1px;
32 | .border-radius(0);
33 | }
34 | // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35 | .btn-group > .btn:first-child {
36 | margin-left: 0;
37 | -webkit-border-top-left-radius: 4px;
38 | -moz-border-radius-topleft: 4px;
39 | border-top-left-radius: 4px;
40 | -webkit-border-bottom-left-radius: 4px;
41 | -moz-border-radius-bottomleft: 4px;
42 | border-bottom-left-radius: 4px;
43 | }
44 | // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
45 | .btn-group > .btn:last-child,
46 | .btn-group > .dropdown-toggle {
47 | -webkit-border-top-right-radius: 4px;
48 | -moz-border-radius-topright: 4px;
49 | border-top-right-radius: 4px;
50 | -webkit-border-bottom-right-radius: 4px;
51 | -moz-border-radius-bottomright: 4px;
52 | border-bottom-right-radius: 4px;
53 | }
54 | // Reset corners for large buttons
55 | .btn-group > .btn.large:first-child {
56 | margin-left: 0;
57 | -webkit-border-top-left-radius: 6px;
58 | -moz-border-radius-topleft: 6px;
59 | border-top-left-radius: 6px;
60 | -webkit-border-bottom-left-radius: 6px;
61 | -moz-border-radius-bottomleft: 6px;
62 | border-bottom-left-radius: 6px;
63 | }
64 | .btn-group > .btn.large:last-child,
65 | .btn-group > .large.dropdown-toggle {
66 | -webkit-border-top-right-radius: 6px;
67 | -moz-border-radius-topright: 6px;
68 | border-top-right-radius: 6px;
69 | -webkit-border-bottom-right-radius: 6px;
70 | -moz-border-radius-bottomright: 6px;
71 | border-bottom-right-radius: 6px;
72 | }
73 |
74 | // On hover/focus/active, bring the proper btn to front
75 | .btn-group > .btn:hover,
76 | .btn-group > .btn:focus,
77 | .btn-group > .btn:active,
78 | .btn-group > .btn.active {
79 | z-index: 2;
80 | }
81 |
82 | // On active and open, don't show outline
83 | .btn-group .dropdown-toggle:active,
84 | .btn-group.open .dropdown-toggle {
85 | outline: 0;
86 | }
87 |
88 |
89 |
90 | // Split button dropdowns
91 | // ----------------------
92 |
93 | // Give the line between buttons some depth
94 | .btn-group > .dropdown-toggle {
95 | padding-left: 8px;
96 | padding-right: 8px;
97 | .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
98 | *padding-top: 4px;
99 | *padding-bottom: 4px;
100 | }
101 | .btn-group > .btn-mini.dropdown-toggle {
102 | padding-left: 5px;
103 | padding-right: 5px;
104 | }
105 | .btn-group > .btn-small.dropdown-toggle {
106 | *padding-top: 4px;
107 | *padding-bottom: 4px;
108 | }
109 | .btn-group > .btn-large.dropdown-toggle {
110 | padding-left: 12px;
111 | padding-right: 12px;
112 | }
113 |
114 | .btn-group.open {
115 |
116 | // The clickable button for toggling the menu
117 | // Remove the gradient and set the same inset shadow as the :active state
118 | .dropdown-toggle {
119 | background-image: none;
120 | .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
121 | }
122 |
123 | // Keep the hover's background when dropdown is open
124 | .btn.dropdown-toggle {
125 | background-color: @btnBackgroundHighlight;
126 | }
127 | .btn-primary.dropdown-toggle {
128 | background-color: @btnPrimaryBackgroundHighlight;
129 | }
130 | .btn-warning.dropdown-toggle {
131 | background-color: @btnWarningBackgroundHighlight;
132 | }
133 | .btn-danger.dropdown-toggle {
134 | background-color: @btnDangerBackgroundHighlight;
135 | }
136 | .btn-success.dropdown-toggle {
137 | background-color: @btnSuccessBackgroundHighlight;
138 | }
139 | .btn-info.dropdown-toggle {
140 | background-color: @btnInfoBackgroundHighlight;
141 | }
142 | .btn-inverse.dropdown-toggle {
143 | background-color: @btnInverseBackgroundHighlight;
144 | }
145 | }
146 |
147 |
148 | // Reposition the caret
149 | .btn .caret {
150 | margin-top: 7px;
151 | margin-left: 0;
152 | }
153 | .btn:hover .caret,
154 | .open.btn-group .caret {
155 | .opacity(100);
156 | }
157 | // Carets in other button sizes
158 | .btn-mini .caret {
159 | margin-top: 5px;
160 | }
161 | .btn-small .caret {
162 | margin-top: 6px;
163 | }
164 | .btn-large .caret {
165 | margin-top: 6px;
166 | border-left-width: 5px;
167 | border-right-width: 5px;
168 | border-top-width: 5px;
169 | }
170 | // Upside down carets for .dropup
171 | .dropup .btn-large .caret {
172 | border-bottom: 5px solid @black;
173 | border-top: 0;
174 | }
175 |
176 |
177 |
178 | // Account for other colors
179 | .btn-primary,
180 | .btn-warning,
181 | .btn-danger,
182 | .btn-info,
183 | .btn-success,
184 | .btn-inverse {
185 | .caret {
186 | border-top-color: @white;
187 | border-bottom-color: @white;
188 | .opacity(75);
189 | }
190 | }
191 |
192 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-carousel.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-carousel.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#carousel
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* CAROUSEL CLASS DEFINITION
27 | * ========================= */
28 |
29 | var Carousel = function (element, options) {
30 | this.$element = $(element)
31 | this.options = options
32 | this.options.slide && this.slide(this.options.slide)
33 | this.options.pause == 'hover' && this.$element
34 | .on('mouseenter', $.proxy(this.pause, this))
35 | .on('mouseleave', $.proxy(this.cycle, this))
36 | }
37 |
38 | Carousel.prototype = {
39 |
40 | cycle: function (e) {
41 | if (!e) this.paused = false
42 | this.options.interval
43 | && !this.paused
44 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
45 | return this
46 | }
47 |
48 | , to: function (pos) {
49 | var $active = this.$element.find('.active')
50 | , children = $active.parent().children()
51 | , activePos = children.index($active)
52 | , that = this
53 |
54 | if (pos > (children.length - 1) || pos < 0) return
55 |
56 | if (this.sliding) {
57 | return this.$element.one('slid', function () {
58 | that.to(pos)
59 | })
60 | }
61 |
62 | if (activePos == pos) {
63 | return this.pause().cycle()
64 | }
65 |
66 | return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
67 | }
68 |
69 | , pause: function (e) {
70 | if (!e) this.paused = true
71 | clearInterval(this.interval)
72 | this.interval = null
73 | return this
74 | }
75 |
76 | , next: function () {
77 | if (this.sliding) return
78 | return this.slide('next')
79 | }
80 |
81 | , prev: function () {
82 | if (this.sliding) return
83 | return this.slide('prev')
84 | }
85 |
86 | , slide: function (type, next) {
87 | var $active = this.$element.find('.active')
88 | , $next = next || $active[type]()
89 | , isCycling = this.interval
90 | , direction = type == 'next' ? 'left' : 'right'
91 | , fallback = type == 'next' ? 'first' : 'last'
92 | , that = this
93 | , e = $.Event('slide')
94 |
95 | this.sliding = true
96 |
97 | isCycling && this.pause()
98 |
99 | $next = $next.length ? $next : this.$element.find('.item')[fallback]()
100 |
101 | if ($next.hasClass('active')) return
102 |
103 | if ($.support.transition && this.$element.hasClass('slide')) {
104 | this.$element.trigger(e)
105 | if (e.isDefaultPrevented()) return
106 | $next.addClass(type)
107 | $next[0].offsetWidth // force reflow
108 | $active.addClass(direction)
109 | $next.addClass(direction)
110 | this.$element.one($.support.transition.end, function () {
111 | $next.removeClass([type, direction].join(' ')).addClass('active')
112 | $active.removeClass(['active', direction].join(' '))
113 | that.sliding = false
114 | setTimeout(function () { that.$element.trigger('slid') }, 0)
115 | })
116 | } else {
117 | this.$element.trigger(e)
118 | if (e.isDefaultPrevented()) return
119 | $active.removeClass('active')
120 | $next.addClass('active')
121 | this.sliding = false
122 | this.$element.trigger('slid')
123 | }
124 |
125 | isCycling && this.cycle()
126 |
127 | return this
128 | }
129 |
130 | }
131 |
132 |
133 | /* CAROUSEL PLUGIN DEFINITION
134 | * ========================== */
135 |
136 | $.fn.carousel = function (option) {
137 | return this.each(function () {
138 | var $this = $(this)
139 | , data = $this.data('carousel')
140 | , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
141 | if (!data) $this.data('carousel', (data = new Carousel(this, options)))
142 | if (typeof option == 'number') data.to(option)
143 | else if (typeof option == 'string' || (option = options.slide)) data[option]()
144 | else if (options.interval) data.cycle()
145 | })
146 | }
147 |
148 | $.fn.carousel.defaults = {
149 | interval: 5000
150 | , pause: 'hover'
151 | }
152 |
153 | $.fn.carousel.Constructor = Carousel
154 |
155 |
156 | /* CAROUSEL DATA-API
157 | * ================= */
158 |
159 | $(function () {
160 | $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
161 | var $this = $(this), href
162 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
163 | , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
164 | $target.carousel(options)
165 | e.preventDefault()
166 | })
167 | })
168 |
169 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-modal.js:
--------------------------------------------------------------------------------
1 | /* =========================================================
2 | * bootstrap-modal.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#modals
4 | * =========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================= */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* MODAL CLASS DEFINITION
27 | * ====================== */
28 |
29 | var Modal = function (content, options) {
30 | this.options = options
31 | this.$element = $(content)
32 | .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
33 | }
34 |
35 | Modal.prototype = {
36 |
37 | constructor: Modal
38 |
39 | , toggle: function () {
40 | return this[!this.isShown ? 'show' : 'hide']()
41 | }
42 |
43 | , show: function () {
44 | var that = this
45 | , e = $.Event('show')
46 |
47 | this.$element.trigger(e)
48 |
49 | if (this.isShown || e.isDefaultPrevented()) return
50 |
51 | $('body').addClass('modal-open')
52 |
53 | this.isShown = true
54 |
55 | escape.call(this)
56 | backdrop.call(this, function () {
57 | var transition = $.support.transition && that.$element.hasClass('fade')
58 |
59 | if (!that.$element.parent().length) {
60 | that.$element.appendTo(document.body) //don't move modals dom position
61 | }
62 |
63 | that.$element
64 | .show()
65 |
66 | if (transition) {
67 | that.$element[0].offsetWidth // force reflow
68 | }
69 |
70 | that.$element.addClass('in')
71 |
72 | transition ?
73 | that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
74 | that.$element.trigger('shown')
75 |
76 | })
77 | }
78 |
79 | , hide: function (e) {
80 | e && e.preventDefault()
81 |
82 | var that = this
83 |
84 | e = $.Event('hide')
85 |
86 | this.$element.trigger(e)
87 |
88 | if (!this.isShown || e.isDefaultPrevented()) return
89 |
90 | this.isShown = false
91 |
92 | $('body').removeClass('modal-open')
93 |
94 | escape.call(this)
95 |
96 | this.$element.removeClass('in')
97 |
98 | $.support.transition && this.$element.hasClass('fade') ?
99 | hideWithTransition.call(this) :
100 | hideModal.call(this)
101 | }
102 |
103 | }
104 |
105 |
106 | /* MODAL PRIVATE METHODS
107 | * ===================== */
108 |
109 | function hideWithTransition() {
110 | var that = this
111 | , timeout = setTimeout(function () {
112 | that.$element.off($.support.transition.end)
113 | hideModal.call(that)
114 | }, 500)
115 |
116 | this.$element.one($.support.transition.end, function () {
117 | clearTimeout(timeout)
118 | hideModal.call(that)
119 | })
120 | }
121 |
122 | function hideModal(that) {
123 | this.$element
124 | .hide()
125 | .trigger('hidden')
126 |
127 | backdrop.call(this)
128 | }
129 |
130 | function backdrop(callback) {
131 | var that = this
132 | , animate = this.$element.hasClass('fade') ? 'fade' : ''
133 |
134 | if (this.isShown && this.options.backdrop) {
135 | var doAnimate = $.support.transition && animate
136 |
137 | this.$backdrop = $('')
138 | .appendTo(document.body)
139 |
140 | if (this.options.backdrop != 'static') {
141 | this.$backdrop.click($.proxy(this.hide, this))
142 | }
143 |
144 | if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
145 |
146 | this.$backdrop.addClass('in')
147 |
148 | doAnimate ?
149 | this.$backdrop.one($.support.transition.end, callback) :
150 | callback()
151 |
152 | } else if (!this.isShown && this.$backdrop) {
153 | this.$backdrop.removeClass('in')
154 |
155 | $.support.transition && this.$element.hasClass('fade')?
156 | this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
157 | removeBackdrop.call(this)
158 |
159 | } else if (callback) {
160 | callback()
161 | }
162 | }
163 |
164 | function removeBackdrop() {
165 | this.$backdrop.remove()
166 | this.$backdrop = null
167 | }
168 |
169 | function escape() {
170 | var that = this
171 | if (this.isShown && this.options.keyboard) {
172 | $(document).on('keyup.dismiss.modal', function ( e ) {
173 | e.which == 27 && that.hide()
174 | })
175 | } else if (!this.isShown) {
176 | $(document).off('keyup.dismiss.modal')
177 | }
178 | }
179 |
180 |
181 | /* MODAL PLUGIN DEFINITION
182 | * ======================= */
183 |
184 | $.fn.modal = function (option) {
185 | return this.each(function () {
186 | var $this = $(this)
187 | , data = $this.data('modal')
188 | , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
189 | if (!data) $this.data('modal', (data = new Modal(this, options)))
190 | if (typeof option == 'string') data[option]()
191 | else if (options.show) data.show()
192 | })
193 | }
194 |
195 | $.fn.modal.defaults = {
196 | backdrop: true
197 | , keyboard: true
198 | , show: true
199 | }
200 |
201 | $.fn.modal.Constructor = Modal
202 |
203 |
204 | /* MODAL DATA-API
205 | * ============== */
206 |
207 | $(function () {
208 | $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
209 | var $this = $(this), href
210 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
211 | , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
212 |
213 | e.preventDefault()
214 | $target.modal(option)
215 | })
216 | })
217 |
218 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/variables.less:
--------------------------------------------------------------------------------
1 | // Variables.less
2 | // Variables to customize the look and feel of Bootstrap
3 | // -----------------------------------------------------
4 |
5 |
6 |
7 | // GLOBAL VALUES
8 | // --------------------------------------------------
9 |
10 |
11 | // Grays
12 | // -------------------------
13 | @black: #000;
14 | @grayDarker: #222;
15 | @grayDark: #333;
16 | @gray: #555;
17 | @grayLight: #999;
18 | @grayLighter: #eee;
19 | @white: #fff;
20 |
21 |
22 | // Accent colors
23 | // -------------------------
24 | @blue: #049cdb;
25 | @blueDark: #0064cd;
26 | @green: #46a546;
27 | @red: #9d261d;
28 | @yellow: #ffc40d;
29 | @orange: #f89406;
30 | @pink: #c3325f;
31 | @purple: #7a43b6;
32 |
33 |
34 | // Scaffolding
35 | // -------------------------
36 | @bodyBackground: @white;
37 | @textColor: @grayDark;
38 |
39 |
40 | // Links
41 | // -------------------------
42 | @linkColor: #08c;
43 | @linkColorHover: darken(@linkColor, 15%);
44 |
45 |
46 | // Typography
47 | // -------------------------
48 | @sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
49 | @serifFontFamily: Georgia, "Times New Roman", Times, serif;
50 | @monoFontFamily: Menlo, Monaco, Consolas, "Courier New", monospace;
51 |
52 | @baseFontSize: 13px;
53 | @baseFontFamily: @sansFontFamily;
54 | @baseLineHeight: 18px;
55 | @altFontFamily: @serifFontFamily;
56 |
57 | @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
58 | @headingsFontWeight: bold; // instead of browser default, bold
59 | @headingsColor: inherit; // empty to use BS default, @textColor
60 |
61 |
62 | // Tables
63 | // -------------------------
64 | @tableBackground: transparent; // overall background-color
65 | @tableBackgroundAccent: #f9f9f9; // for striping
66 | @tableBackgroundHover: #f5f5f5; // for hover
67 | @tableBorder: #ddd; // table and cell border
68 |
69 |
70 | // Buttons
71 | // -------------------------
72 | @btnBackground: @white;
73 | @btnBackgroundHighlight: darken(@white, 10%);
74 | @btnBorder: #ccc;
75 |
76 | @btnPrimaryBackground: @linkColor;
77 | @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 15%);
78 |
79 | @btnInfoBackground: #5bc0de;
80 | @btnInfoBackgroundHighlight: #2f96b4;
81 |
82 | @btnSuccessBackground: #62c462;
83 | @btnSuccessBackgroundHighlight: #51a351;
84 |
85 | @btnWarningBackground: lighten(@orange, 15%);
86 | @btnWarningBackgroundHighlight: @orange;
87 |
88 | @btnDangerBackground: #ee5f5b;
89 | @btnDangerBackgroundHighlight: #bd362f;
90 |
91 | @btnInverseBackground: @gray;
92 | @btnInverseBackgroundHighlight: @grayDarker;
93 |
94 |
95 | // Forms
96 | // -------------------------
97 | @inputBackground: @white;
98 | @inputBorder: #ccc;
99 | @inputBorderRadius: 3px;
100 | @inputDisabledBackground: @grayLighter;
101 | @formActionsBackground: #f5f5f5;
102 |
103 | // Dropdowns
104 | // -------------------------
105 | @dropdownBackground: @white;
106 | @dropdownBorder: rgba(0,0,0,.2);
107 | @dropdownLinkColor: @grayDark;
108 | @dropdownLinkColorHover: @white;
109 | @dropdownLinkBackgroundHover: @linkColor;
110 | @dropdownDividerTop: #e5e5e5;
111 | @dropdownDividerBottom: @white;
112 |
113 |
114 |
115 | // COMPONENT VARIABLES
116 | // --------------------------------------------------
117 |
118 | // Z-index master list
119 | // -------------------------
120 | // Used for a bird's eye view of components dependent on the z-axis
121 | // Try to avoid customizing these :)
122 | @zindexDropdown: 1000;
123 | @zindexPopover: 1010;
124 | @zindexTooltip: 1020;
125 | @zindexFixedNavbar: 1030;
126 | @zindexModalBackdrop: 1040;
127 | @zindexModal: 1050;
128 |
129 |
130 | // Sprite icons path
131 | // -------------------------
132 | @iconSpritePath: "../img/glyphicons-halflings.png";
133 | @iconWhiteSpritePath: "../img/glyphicons-halflings-white.png";
134 |
135 |
136 | // Input placeholder text color
137 | // -------------------------
138 | @placeholderText: @grayLight;
139 |
140 |
141 | // Hr border color
142 | // -------------------------
143 | @hrBorder: @grayLighter;
144 |
145 |
146 | // Navbar
147 | // -------------------------
148 | @navbarHeight: 40px;
149 | @navbarBackground: @grayDarker;
150 | @navbarBackgroundHighlight: @grayDark;
151 |
152 | @navbarText: @grayLight;
153 | @navbarLinkColor: @grayLight;
154 | @navbarLinkColorHover: @white;
155 | @navbarLinkColorActive: @navbarLinkColorHover;
156 | @navbarLinkBackgroundHover: transparent;
157 | @navbarLinkBackgroundActive: @navbarBackground;
158 |
159 | @navbarSearchBackground: lighten(@navbarBackground, 25%);
160 | @navbarSearchBackgroundFocus: @white;
161 | @navbarSearchBorder: darken(@navbarSearchBackground, 30%);
162 | @navbarSearchPlaceholderColor: #ccc;
163 | @navbarBrandColor: @navbarLinkColor;
164 |
165 |
166 | // Hero unit
167 | // -------------------------
168 | @heroUnitBackground: @grayLighter;
169 | @heroUnitHeadingColor: inherit;
170 | @heroUnitLeadColor: inherit;
171 |
172 |
173 | // Form states and alerts
174 | // -------------------------
175 | @warningText: #c09853;
176 | @warningBackground: #fcf8e3;
177 | @warningBorder: darken(spin(@warningBackground, -10), 3%);
178 |
179 | @errorText: #b94a48;
180 | @errorBackground: #f2dede;
181 | @errorBorder: darken(spin(@errorBackground, -10), 3%);
182 |
183 | @successText: #468847;
184 | @successBackground: #dff0d8;
185 | @successBorder: darken(spin(@successBackground, -10), 5%);
186 |
187 | @infoText: #3a87ad;
188 | @infoBackground: #d9edf7;
189 | @infoBorder: darken(spin(@infoBackground, -10), 7%);
190 |
191 |
192 |
193 | // GRID
194 | // --------------------------------------------------
195 |
196 | // Default 940px grid
197 | // -------------------------
198 | @gridColumns: 12;
199 | @gridColumnWidth: 60px;
200 | @gridGutterWidth: 20px;
201 | @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
202 |
203 | // Fluid grid
204 | // -------------------------
205 | @fluidGridColumnWidth: 6.382978723%;
206 | @fluidGridGutterWidth: 2.127659574%;
207 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-typeahead.js:
--------------------------------------------------------------------------------
1 | /* =============================================================
2 | * bootstrap-typeahead.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#typeahead
4 | * =============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function($){
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* TYPEAHEAD PUBLIC CLASS DEFINITION
27 | * ================================= */
28 |
29 | var Typeahead = function (element, options) {
30 | this.$element = $(element)
31 | this.options = $.extend({}, $.fn.typeahead.defaults, options)
32 | this.matcher = this.options.matcher || this.matcher
33 | this.sorter = this.options.sorter || this.sorter
34 | this.highlighter = this.options.highlighter || this.highlighter
35 | this.updater = this.options.updater || this.updater
36 | this.$menu = $(this.options.menu).appendTo('body')
37 | this.source = this.options.source
38 | this.shown = false
39 | this.listen()
40 | }
41 |
42 | Typeahead.prototype = {
43 |
44 | constructor: Typeahead
45 |
46 | , select: function () {
47 | var val = this.$menu.find('.active').attr('data-value')
48 | this.$element
49 | .val(this.updater(val))
50 | .change()
51 | return this.hide()
52 | }
53 |
54 | , updater: function (item) {
55 | return item
56 | }
57 |
58 | , show: function () {
59 | var pos = $.extend({}, this.$element.offset(), {
60 | height: this.$element[0].offsetHeight
61 | })
62 |
63 | this.$menu.css({
64 | top: pos.top + pos.height
65 | , left: pos.left
66 | })
67 |
68 | this.$menu.show()
69 | this.shown = true
70 | return this
71 | }
72 |
73 | , hide: function () {
74 | this.$menu.hide()
75 | this.shown = false
76 | return this
77 | }
78 |
79 | , lookup: function (event) {
80 | var that = this
81 | , items
82 | , q
83 |
84 | this.query = this.$element.val()
85 |
86 | if (!this.query) {
87 | return this.shown ? this.hide() : this
88 | }
89 |
90 | items = $.grep(this.source, function (item) {
91 | return that.matcher(item)
92 | })
93 |
94 | items = this.sorter(items)
95 |
96 | if (!items.length) {
97 | return this.shown ? this.hide() : this
98 | }
99 |
100 | return this.render(items.slice(0, this.options.items)).show()
101 | }
102 |
103 | , matcher: function (item) {
104 | return ~item.toLowerCase().indexOf(this.query.toLowerCase())
105 | }
106 |
107 | , sorter: function (items) {
108 | var beginswith = []
109 | , caseSensitive = []
110 | , caseInsensitive = []
111 | , item
112 |
113 | while (item = items.shift()) {
114 | if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
115 | else if (~item.indexOf(this.query)) caseSensitive.push(item)
116 | else caseInsensitive.push(item)
117 | }
118 |
119 | return beginswith.concat(caseSensitive, caseInsensitive)
120 | }
121 |
122 | , highlighter: function (item) {
123 | var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
124 | return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
125 | return '' + match + ''
126 | })
127 | }
128 |
129 | , render: function (items) {
130 | var that = this
131 |
132 | items = $(items).map(function (i, item) {
133 | i = $(that.options.item).attr('data-value', item)
134 | i.find('a').html(that.highlighter(item))
135 | return i[0]
136 | })
137 |
138 | items.first().addClass('active')
139 | this.$menu.html(items)
140 | return this
141 | }
142 |
143 | , next: function (event) {
144 | var active = this.$menu.find('.active').removeClass('active')
145 | , next = active.next()
146 |
147 | if (!next.length) {
148 | next = $(this.$menu.find('li')[0])
149 | }
150 |
151 | next.addClass('active')
152 | }
153 |
154 | , prev: function (event) {
155 | var active = this.$menu.find('.active').removeClass('active')
156 | , prev = active.prev()
157 |
158 | if (!prev.length) {
159 | prev = this.$menu.find('li').last()
160 | }
161 |
162 | prev.addClass('active')
163 | }
164 |
165 | , listen: function () {
166 | this.$element
167 | .on('blur', $.proxy(this.blur, this))
168 | .on('keypress', $.proxy(this.keypress, this))
169 | .on('keyup', $.proxy(this.keyup, this))
170 |
171 | if ($.browser.webkit || $.browser.msie) {
172 | this.$element.on('keydown', $.proxy(this.keypress, this))
173 | }
174 |
175 | this.$menu
176 | .on('click', $.proxy(this.click, this))
177 | .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
178 | }
179 |
180 | , keyup: function (e) {
181 | switch(e.keyCode) {
182 | case 40: // down arrow
183 | case 38: // up arrow
184 | break
185 |
186 | case 9: // tab
187 | case 13: // enter
188 | if (!this.shown) return
189 | this.select()
190 | break
191 |
192 | case 27: // escape
193 | if (!this.shown) return
194 | this.hide()
195 | break
196 |
197 | default:
198 | this.lookup()
199 | }
200 |
201 | e.stopPropagation()
202 | e.preventDefault()
203 | }
204 |
205 | , keypress: function (e) {
206 | if (!this.shown) return
207 |
208 | switch(e.keyCode) {
209 | case 9: // tab
210 | case 13: // enter
211 | case 27: // escape
212 | e.preventDefault()
213 | break
214 |
215 | case 38: // up arrow
216 | if (e.type != 'keydown') break
217 | e.preventDefault()
218 | this.prev()
219 | break
220 |
221 | case 40: // down arrow
222 | if (e.type != 'keydown') break
223 | e.preventDefault()
224 | this.next()
225 | break
226 | }
227 |
228 | e.stopPropagation()
229 | }
230 |
231 | , blur: function (e) {
232 | var that = this
233 | setTimeout(function () { that.hide() }, 150)
234 | }
235 |
236 | , click: function (e) {
237 | e.stopPropagation()
238 | e.preventDefault()
239 | this.select()
240 | }
241 |
242 | , mouseenter: function (e) {
243 | this.$menu.find('.active').removeClass('active')
244 | $(e.currentTarget).addClass('active')
245 | }
246 |
247 | }
248 |
249 |
250 | /* TYPEAHEAD PLUGIN DEFINITION
251 | * =========================== */
252 |
253 | $.fn.typeahead = function (option) {
254 | return this.each(function () {
255 | var $this = $(this)
256 | , data = $this.data('typeahead')
257 | , options = typeof option == 'object' && option
258 | if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
259 | if (typeof option == 'string') data[option]()
260 | })
261 | }
262 |
263 | $.fn.typeahead.defaults = {
264 | source: []
265 | , items: 8
266 | , menu: ''
267 | , item: ' '
268 | }
269 |
270 | $.fn.typeahead.Constructor = Typeahead
271 |
272 |
273 | /* TYPEAHEAD DATA-API
274 | * ================== */
275 |
276 | $(function () {
277 | $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
278 | var $this = $(this)
279 | if ($this.data('typeahead')) return
280 | e.preventDefault()
281 | $this.typeahead($this.data())
282 | })
283 | })
284 |
285 | }(window.jQuery);
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/navs.less:
--------------------------------------------------------------------------------
1 | // NAVIGATIONS
2 | // -----------
3 |
4 |
5 |
6 | // BASE CLASS
7 | // ----------
8 |
9 | .nav {
10 | margin-left: 0;
11 | margin-bottom: @baseLineHeight;
12 | list-style: none;
13 | }
14 |
15 | // Make links block level
16 | .nav > li > a {
17 | display: block;
18 | }
19 | .nav > li > a:hover {
20 | text-decoration: none;
21 | background-color: @grayLighter;
22 | }
23 |
24 | // Redeclare pull classes because of specifity
25 | .nav > .pull-right {
26 | float: right;
27 | }
28 |
29 | // Nav headers (for dropdowns and lists)
30 | .nav .nav-header {
31 | display: block;
32 | padding: 3px 15px;
33 | font-size: 11px;
34 | font-weight: bold;
35 | line-height: @baseLineHeight;
36 | color: @grayLight;
37 | text-shadow: 0 1px 0 rgba(255,255,255,.5);
38 | text-transform: uppercase;
39 | }
40 | // Space them out when they follow another list item (link)
41 | .nav li + .nav-header {
42 | margin-top: 9px;
43 | }
44 |
45 |
46 | // NAV LIST
47 | // --------
48 |
49 | .nav-list {
50 | padding-left: 15px;
51 | padding-right: 15px;
52 | margin-bottom: 0;
53 | }
54 | .nav-list > li > a,
55 | .nav-list .nav-header {
56 | margin-left: -15px;
57 | margin-right: -15px;
58 | text-shadow: 0 1px 0 rgba(255,255,255,.5);
59 | }
60 | .nav-list > li > a {
61 | padding: 3px 15px;
62 | }
63 | .nav-list > .active > a,
64 | .nav-list > .active > a:hover {
65 | color: @white;
66 | text-shadow: 0 -1px 0 rgba(0,0,0,.2);
67 | background-color: @linkColor;
68 | }
69 | .nav-list [class^="icon-"] {
70 | margin-right: 2px;
71 | }
72 | // Dividers (basically an hr) within the dropdown
73 | .nav-list .divider {
74 | .nav-divider();
75 | }
76 |
77 |
78 |
79 | // TABS AND PILLS
80 | // -------------
81 |
82 | // Common styles
83 | .nav-tabs,
84 | .nav-pills {
85 | .clearfix();
86 | }
87 | .nav-tabs > li,
88 | .nav-pills > li {
89 | float: left;
90 | }
91 | .nav-tabs > li > a,
92 | .nav-pills > li > a {
93 | padding-right: 12px;
94 | padding-left: 12px;
95 | margin-right: 2px;
96 | line-height: 14px; // keeps the overall height an even number
97 | }
98 |
99 | // TABS
100 | // ----
101 |
102 | // Give the tabs something to sit on
103 | .nav-tabs {
104 | border-bottom: 1px solid #ddd;
105 | }
106 | // Make the list-items overlay the bottom border
107 | .nav-tabs > li {
108 | margin-bottom: -1px;
109 | }
110 | // Actual tabs (as links)
111 | .nav-tabs > li > a {
112 | padding-top: 8px;
113 | padding-bottom: 8px;
114 | line-height: @baseLineHeight;
115 | border: 1px solid transparent;
116 | .border-radius(4px 4px 0 0);
117 | &:hover {
118 | border-color: @grayLighter @grayLighter #ddd;
119 | }
120 | }
121 | // Active state, and it's :hover to override normal :hover
122 | .nav-tabs > .active > a,
123 | .nav-tabs > .active > a:hover {
124 | color: @gray;
125 | background-color: @white;
126 | border: 1px solid #ddd;
127 | border-bottom-color: transparent;
128 | cursor: default;
129 | }
130 |
131 |
132 | // PILLS
133 | // -----
134 |
135 | // Links rendered as pills
136 | .nav-pills > li > a {
137 | padding-top: 8px;
138 | padding-bottom: 8px;
139 | margin-top: 2px;
140 | margin-bottom: 2px;
141 | .border-radius(5px);
142 | }
143 |
144 | // Active state
145 | .nav-pills > .active > a,
146 | .nav-pills > .active > a:hover {
147 | color: @white;
148 | background-color: @linkColor;
149 | }
150 |
151 |
152 |
153 | // STACKED NAV
154 | // -----------
155 |
156 | // Stacked tabs and pills
157 | .nav-stacked > li {
158 | float: none;
159 | }
160 | .nav-stacked > li > a {
161 | margin-right: 0; // no need for the gap between nav items
162 | }
163 |
164 | // Tabs
165 | .nav-tabs.nav-stacked {
166 | border-bottom: 0;
167 | }
168 | .nav-tabs.nav-stacked > li > a {
169 | border: 1px solid #ddd;
170 | .border-radius(0);
171 | }
172 | .nav-tabs.nav-stacked > li:first-child > a {
173 | .border-radius(4px 4px 0 0);
174 | }
175 | .nav-tabs.nav-stacked > li:last-child > a {
176 | .border-radius(0 0 4px 4px);
177 | }
178 | .nav-tabs.nav-stacked > li > a:hover {
179 | border-color: #ddd;
180 | z-index: 2;
181 | }
182 |
183 | // Pills
184 | .nav-pills.nav-stacked > li > a {
185 | margin-bottom: 3px;
186 | }
187 | .nav-pills.nav-stacked > li:last-child > a {
188 | margin-bottom: 1px; // decrease margin to match sizing of stacked tabs
189 | }
190 |
191 |
192 |
193 | // DROPDOWNS
194 | // ---------
195 |
196 | .nav-tabs .dropdown-menu {
197 | .border-radius(0 0 5px 5px); // remove the top rounded corners here since there is a hard edge above the menu
198 | }
199 | .nav-pills .dropdown-menu {
200 | .border-radius(4px); // make rounded corners match the pills
201 | }
202 |
203 | // Default dropdown links
204 | // -------------------------
205 | // Make carets use linkColor to start
206 | .nav-tabs .dropdown-toggle .caret,
207 | .nav-pills .dropdown-toggle .caret {
208 | border-top-color: @linkColor;
209 | border-bottom-color: @linkColor;
210 | margin-top: 6px;
211 | }
212 | .nav-tabs .dropdown-toggle:hover .caret,
213 | .nav-pills .dropdown-toggle:hover .caret {
214 | border-top-color: @linkColorHover;
215 | border-bottom-color: @linkColorHover;
216 | }
217 |
218 | // Active dropdown links
219 | // -------------------------
220 | .nav-tabs .active .dropdown-toggle .caret,
221 | .nav-pills .active .dropdown-toggle .caret {
222 | border-top-color: @grayDark;
223 | border-bottom-color: @grayDark;
224 | }
225 |
226 | // Active:hover dropdown links
227 | // -------------------------
228 | .nav > .dropdown.active > a:hover {
229 | color: @black;
230 | cursor: pointer;
231 | }
232 |
233 | // Open dropdowns
234 | // -------------------------
235 | .nav-tabs .open .dropdown-toggle,
236 | .nav-pills .open .dropdown-toggle,
237 | .nav > li.dropdown.open.active > a:hover {
238 | color: @white;
239 | background-color: @grayLight;
240 | border-color: @grayLight;
241 | }
242 | .nav li.dropdown.open .caret,
243 | .nav li.dropdown.open.active .caret,
244 | .nav li.dropdown.open a:hover .caret {
245 | border-top-color: @white;
246 | border-bottom-color: @white;
247 | .opacity(100);
248 | }
249 |
250 | // Dropdowns in stacked tabs
251 | .tabs-stacked .open > a:hover {
252 | border-color: @grayLight;
253 | }
254 |
255 |
256 |
257 | // TABBABLE
258 | // --------
259 |
260 |
261 | // COMMON STYLES
262 | // -------------
263 |
264 | // Clear any floats
265 | .tabbable {
266 | .clearfix();
267 | }
268 | .tab-content {
269 | overflow: auto; // prevent content from running below tabs
270 | }
271 |
272 | // Remove border on bottom, left, right
273 | .tabs-below > .nav-tabs,
274 | .tabs-right > .nav-tabs,
275 | .tabs-left > .nav-tabs {
276 | border-bottom: 0;
277 | }
278 |
279 | // Show/hide tabbable areas
280 | .tab-content > .tab-pane,
281 | .pill-content > .pill-pane {
282 | display: none;
283 | }
284 | .tab-content > .active,
285 | .pill-content > .active {
286 | display: block;
287 | }
288 |
289 |
290 | // BOTTOM
291 | // ------
292 |
293 | .tabs-below > .nav-tabs {
294 | border-top: 1px solid #ddd;
295 | }
296 | .tabs-below > .nav-tabs > li {
297 | margin-top: -1px;
298 | margin-bottom: 0;
299 | }
300 | .tabs-below > .nav-tabs > li > a {
301 | .border-radius(0 0 4px 4px);
302 | &:hover {
303 | border-bottom-color: transparent;
304 | border-top-color: #ddd;
305 | }
306 | }
307 | .tabs-below > .nav-tabs > .active > a,
308 | .tabs-below > .nav-tabs > .active > a:hover {
309 | border-color: transparent #ddd #ddd #ddd;
310 | }
311 |
312 | // LEFT & RIGHT
313 | // ------------
314 |
315 | // Common styles
316 | .tabs-left > .nav-tabs > li,
317 | .tabs-right > .nav-tabs > li {
318 | float: none;
319 | }
320 | .tabs-left > .nav-tabs > li > a,
321 | .tabs-right > .nav-tabs > li > a {
322 | min-width: 74px;
323 | margin-right: 0;
324 | margin-bottom: 3px;
325 | }
326 |
327 | // Tabs on the left
328 | .tabs-left > .nav-tabs {
329 | float: left;
330 | margin-right: 19px;
331 | border-right: 1px solid #ddd;
332 | }
333 | .tabs-left > .nav-tabs > li > a {
334 | margin-right: -1px;
335 | .border-radius(4px 0 0 4px);
336 | }
337 | .tabs-left > .nav-tabs > li > a:hover {
338 | border-color: @grayLighter #ddd @grayLighter @grayLighter;
339 | }
340 | .tabs-left > .nav-tabs .active > a,
341 | .tabs-left > .nav-tabs .active > a:hover {
342 | border-color: #ddd transparent #ddd #ddd;
343 | *border-right-color: @white;
344 | }
345 |
346 | // Tabs on the right
347 | .tabs-right > .nav-tabs {
348 | float: right;
349 | margin-left: 19px;
350 | border-left: 1px solid #ddd;
351 | }
352 | .tabs-right > .nav-tabs > li > a {
353 | margin-left: -1px;
354 | .border-radius(0 4px 4px 0);
355 | }
356 | .tabs-right > .nav-tabs > li > a:hover {
357 | border-color: @grayLighter @grayLighter @grayLighter #ddd;
358 | }
359 | .tabs-right > .nav-tabs .active > a,
360 | .tabs-right > .nav-tabs .active > a:hover {
361 | border-color: #ddd #ddd #ddd transparent;
362 | *border-left-color: @white;
363 | }
364 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/js/bootstrap-tooltip.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-tooltip.js v2.0.4
3 | * http://twitter.github.com/bootstrap/javascript.html#tooltips
4 | * Inspired by the original jQuery.tipsy by Jason Frame
5 | * ===========================================================
6 | * Copyright 2012 Twitter, Inc.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================== */
20 |
21 |
22 | !function ($) {
23 |
24 | "use strict"; // jshint ;_;
25 |
26 |
27 | /* TOOLTIP PUBLIC CLASS DEFINITION
28 | * =============================== */
29 |
30 | var Tooltip = function (element, options) {
31 | this.init('tooltip', element, options)
32 | }
33 |
34 | Tooltip.prototype = {
35 |
36 | constructor: Tooltip
37 |
38 | , init: function (type, element, options) {
39 | var eventIn
40 | , eventOut
41 |
42 | this.type = type
43 | this.$element = $(element)
44 | this.options = this.getOptions(options)
45 | this.enabled = true
46 |
47 | if (this.options.trigger != 'manual') {
48 | eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
49 | eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
50 | this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
51 | this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
52 | }
53 |
54 | this.options.selector ?
55 | (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
56 | this.fixTitle()
57 | }
58 |
59 | , getOptions: function (options) {
60 | options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
61 |
62 | if (options.delay && typeof options.delay == 'number') {
63 | options.delay = {
64 | show: options.delay
65 | , hide: options.delay
66 | }
67 | }
68 |
69 | return options
70 | }
71 |
72 | , enter: function (e) {
73 | var self = $(e.currentTarget)[this.type](this._options).data(this.type)
74 |
75 | if (!self.options.delay || !self.options.delay.show) return self.show()
76 |
77 | clearTimeout(this.timeout)
78 | self.hoverState = 'in'
79 | this.timeout = setTimeout(function() {
80 | if (self.hoverState == 'in') self.show()
81 | }, self.options.delay.show)
82 | }
83 |
84 | , leave: function (e) {
85 | var self = $(e.currentTarget)[this.type](this._options).data(this.type)
86 |
87 | if (this.timeout) clearTimeout(this.timeout)
88 | if (!self.options.delay || !self.options.delay.hide) return self.hide()
89 |
90 | self.hoverState = 'out'
91 | this.timeout = setTimeout(function() {
92 | if (self.hoverState == 'out') self.hide()
93 | }, self.options.delay.hide)
94 | }
95 |
96 | , show: function () {
97 | var $tip
98 | , inside
99 | , pos
100 | , actualWidth
101 | , actualHeight
102 | , placement
103 | , tp
104 |
105 | if (this.hasContent() && this.enabled) {
106 | $tip = this.tip()
107 | this.setContent()
108 |
109 | if (this.options.animation) {
110 | $tip.addClass('fade')
111 | }
112 |
113 | placement = typeof this.options.placement == 'function' ?
114 | this.options.placement.call(this, $tip[0], this.$element[0]) :
115 | this.options.placement
116 |
117 | inside = /in/.test(placement)
118 |
119 | $tip
120 | .remove()
121 | .css({ top: 0, left: 0, display: 'block' })
122 | .appendTo(inside ? this.$element : document.body)
123 |
124 | pos = this.getPosition(inside)
125 |
126 | actualWidth = $tip[0].offsetWidth
127 | actualHeight = $tip[0].offsetHeight
128 |
129 | switch (inside ? placement.split(' ')[1] : placement) {
130 | case 'bottom':
131 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
132 | break
133 | case 'top':
134 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
135 | break
136 | case 'left':
137 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
138 | break
139 | case 'right':
140 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
141 | break
142 | }
143 |
144 | $tip
145 | .css(tp)
146 | .addClass(placement)
147 | .addClass('in')
148 | }
149 | }
150 |
151 | , isHTML: function(text) {
152 | // html string detection logic adapted from jQuery
153 | return typeof text != 'string'
154 | || ( text.charAt(0) === "<"
155 | && text.charAt( text.length - 1 ) === ">"
156 | && text.length >= 3
157 | ) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
158 | }
159 |
160 | , setContent: function () {
161 | var $tip = this.tip()
162 | , title = this.getTitle()
163 |
164 | $tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
165 | $tip.removeClass('fade in top bottom left right')
166 | }
167 |
168 | , hide: function () {
169 | var that = this
170 | , $tip = this.tip()
171 |
172 | $tip.removeClass('in')
173 |
174 | function removeWithAnimation() {
175 | var timeout = setTimeout(function () {
176 | $tip.off($.support.transition.end).remove()
177 | }, 500)
178 |
179 | $tip.one($.support.transition.end, function () {
180 | clearTimeout(timeout)
181 | $tip.remove()
182 | })
183 | }
184 |
185 | $.support.transition && this.$tip.hasClass('fade') ?
186 | removeWithAnimation() :
187 | $tip.remove()
188 | }
189 |
190 | , fixTitle: function () {
191 | var $e = this.$element
192 | if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
193 | $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
194 | }
195 | }
196 |
197 | , hasContent: function () {
198 | return this.getTitle()
199 | }
200 |
201 | , getPosition: function (inside) {
202 | return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
203 | width: this.$element[0].offsetWidth
204 | , height: this.$element[0].offsetHeight
205 | })
206 | }
207 |
208 | , getTitle: function () {
209 | var title
210 | , $e = this.$element
211 | , o = this.options
212 |
213 | title = $e.attr('data-original-title')
214 | || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
215 |
216 | return title
217 | }
218 |
219 | , tip: function () {
220 | return this.$tip = this.$tip || $(this.options.template)
221 | }
222 |
223 | , validate: function () {
224 | if (!this.$element[0].parentNode) {
225 | this.hide()
226 | this.$element = null
227 | this.options = null
228 | }
229 | }
230 |
231 | , enable: function () {
232 | this.enabled = true
233 | }
234 |
235 | , disable: function () {
236 | this.enabled = false
237 | }
238 |
239 | , toggleEnabled: function () {
240 | this.enabled = !this.enabled
241 | }
242 |
243 | , toggle: function () {
244 | this[this.tip().hasClass('in') ? 'hide' : 'show']()
245 | }
246 |
247 | }
248 |
249 |
250 | /* TOOLTIP PLUGIN DEFINITION
251 | * ========================= */
252 |
253 | $.fn.tooltip = function ( option ) {
254 | return this.each(function () {
255 | var $this = $(this)
256 | , data = $this.data('tooltip')
257 | , options = typeof option == 'object' && option
258 | if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
259 | if (typeof option == 'string') data[option]()
260 | })
261 | }
262 |
263 | $.fn.tooltip.Constructor = Tooltip
264 |
265 | $.fn.tooltip.defaults = {
266 | animation: true
267 | , placement: 'top'
268 | , selector: false
269 | , template: ''
270 | , trigger: 'hover'
271 | , title: ''
272 | , delay: 0
273 | }
274 |
275 | }(window.jQuery);
276 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/navbar.less:
--------------------------------------------------------------------------------
1 | // NAVBAR (FIXED AND STATIC)
2 | // -------------------------
3 |
4 |
5 | // COMMON STYLES
6 | // -------------
7 |
8 | .navbar {
9 | // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
10 | *position: relative;
11 | *z-index: 2;
12 |
13 | overflow: visible;
14 | margin-bottom: @baseLineHeight;
15 | }
16 |
17 | // Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
18 | .navbar-inner {
19 | min-height: @navbarHeight;
20 | padding-left: 20px;
21 | padding-right: 20px;
22 | #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
23 | .border-radius(4px);
24 | .box-shadow(~"0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1)");
25 | }
26 |
27 | // Set width to auto for default container
28 | // We then reset it for fixed navbars in the #gridSystem mixin
29 | .navbar .container {
30 | width: auto;
31 | }
32 |
33 | // Override the default collapsed state
34 | .nav-collapse.collapse {
35 | height: auto;
36 | }
37 |
38 |
39 | // Brand, links, text, and buttons
40 | .navbar {
41 | color: @navbarText;
42 | // Hover and active states
43 | .brand:hover {
44 | text-decoration: none;
45 | }
46 | // Website or project name
47 | .brand {
48 | float: left;
49 | display: block;
50 | // Vertically center the text given @navbarHeight
51 | @elementHeight: 20px;
52 | padding: ((@navbarHeight - @elementHeight) / 2 - 2) 20px ((@navbarHeight - @elementHeight) / 2 + 2);
53 | margin-left: -20px; // negative indent to left-align the text down the page
54 | font-size: 20px;
55 | font-weight: 200;
56 | line-height: 1;
57 | color: @navbarBrandColor;
58 | }
59 | // Plain text in topbar
60 | .navbar-text {
61 | margin-bottom: 0;
62 | line-height: @navbarHeight;
63 | }
64 | // Janky solution for now to account for links outside the .nav
65 | .navbar-link {
66 | color: @navbarLinkColor;
67 | &:hover {
68 | color: @navbarLinkColorHover;
69 | }
70 | }
71 | // Buttons in navbar
72 | .btn,
73 | .btn-group {
74 | .navbarVerticalAlign(30px); // Vertically center in navbar
75 | }
76 | .btn-group .btn {
77 | margin: 0; // then undo the margin here so we don't accidentally double it
78 | }
79 | }
80 |
81 | // Navbar forms
82 | .navbar-form {
83 | margin-bottom: 0; // remove default bottom margin
84 | .clearfix();
85 | input,
86 | select,
87 | .radio,
88 | .checkbox {
89 | .navbarVerticalAlign(30px); // Vertically center in navbar
90 | }
91 | input,
92 | select {
93 | display: inline-block;
94 | margin-bottom: 0;
95 | }
96 | input[type="image"],
97 | input[type="checkbox"],
98 | input[type="radio"] {
99 | margin-top: 3px;
100 | }
101 | .input-append,
102 | .input-prepend {
103 | margin-top: 6px;
104 | white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
105 | input {
106 | margin-top: 0; // remove the margin on top since it's on the parent
107 | }
108 | }
109 | }
110 |
111 | // Navbar search
112 | .navbar-search {
113 | position: relative;
114 | float: left;
115 | .navbarVerticalAlign(28px); // Vertically center in navbar
116 | margin-bottom: 0;
117 | .search-query {
118 | padding: 4px 9px;
119 | #font > .sans-serif(13px, normal, 1);
120 | color: @white;
121 | background-color: @navbarSearchBackground;
122 | border: 1px solid @navbarSearchBorder;
123 | .box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)");
124 | .transition(none);
125 |
126 | .placeholder(@navbarSearchPlaceholderColor);
127 |
128 | // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
129 | &:focus,
130 | &.focused {
131 | padding: 5px 10px;
132 | color: @grayDark;
133 | text-shadow: 0 1px 0 @white;
134 | background-color: @navbarSearchBackgroundFocus;
135 | border: 0;
136 | .box-shadow(0 0 3px rgba(0,0,0,.15));
137 | outline: 0;
138 | }
139 | }
140 | }
141 |
142 |
143 |
144 | // FIXED NAVBAR
145 | // ------------
146 |
147 | // Shared (top/bottom) styles
148 | .navbar-fixed-top,
149 | .navbar-fixed-bottom {
150 | position: fixed;
151 | right: 0;
152 | left: 0;
153 | z-index: @zindexFixedNavbar;
154 | margin-bottom: 0; // remove 18px margin for static navbar
155 | }
156 | .navbar-fixed-top .navbar-inner,
157 | .navbar-fixed-bottom .navbar-inner {
158 | padding-left: 0;
159 | padding-right: 0;
160 | .border-radius(0);
161 | }
162 |
163 | .navbar-fixed-top .container,
164 | .navbar-fixed-bottom .container {
165 | #grid > .core > .span(@gridColumns);
166 | }
167 |
168 | // Fixed to top
169 | .navbar-fixed-top {
170 | top: 0;
171 | }
172 |
173 | // Fixed to bottom
174 | .navbar-fixed-bottom {
175 | bottom: 0;
176 | }
177 |
178 |
179 |
180 | // NAVIGATION
181 | // ----------
182 |
183 | .navbar .nav {
184 | position: relative;
185 | left: 0;
186 | display: block;
187 | float: left;
188 | margin: 0 10px 0 0;
189 | }
190 | .navbar .nav.pull-right {
191 | float: right; // redeclare due to specificity
192 | }
193 | .navbar .nav > li {
194 | display: block;
195 | float: left;
196 | }
197 |
198 | // Links
199 | .navbar .nav > li > a {
200 | float: none;
201 | // Vertically center the text given @navbarHeight
202 | @elementHeight: 20px;
203 | padding: ((@navbarHeight - @elementHeight) / 2 - 1) 10px ((@navbarHeight - @elementHeight) / 2 + 1);
204 | line-height: 19px;
205 | color: @navbarLinkColor;
206 | text-decoration: none;
207 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
208 | }
209 | // Buttons
210 | .navbar .btn {
211 | display: inline-block;
212 | padding: 4px 10px 4px;
213 | // Vertically center the button given @navbarHeight
214 | @elementHeight: 28px;
215 | margin: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
216 | line-height: @baseLineHeight;
217 | }
218 | .navbar .btn-group {
219 | margin: 0;
220 | // Vertically center the button given @navbarHeight
221 | @elementHeight: 28px;
222 | padding: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
223 | }
224 | // Hover
225 | .navbar .nav > li > a:hover {
226 | background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
227 | color: @navbarLinkColorHover;
228 | text-decoration: none;
229 | }
230 |
231 | // Active nav items
232 | .navbar .nav .active > a,
233 | .navbar .nav .active > a:hover {
234 | color: @navbarLinkColorActive;
235 | text-decoration: none;
236 | background-color: @navbarLinkBackgroundActive;
237 | }
238 |
239 | // Dividers (basically a vertical hr)
240 | .navbar .divider-vertical {
241 | height: @navbarHeight;
242 | width: 1px;
243 | margin: 0 9px;
244 | overflow: hidden;
245 | background-color: @navbarBackground;
246 | border-right: 1px solid @navbarBackgroundHighlight;
247 | }
248 |
249 | // Secondary (floated right) nav in topbar
250 | .navbar .nav.pull-right {
251 | margin-left: 10px;
252 | margin-right: 0;
253 | }
254 |
255 | // Navbar button for toggling navbar items in responsive layouts
256 | // These definitions need to come after '.navbar .btn'
257 | .navbar .btn-navbar {
258 | display: none;
259 | float: right;
260 | padding: 7px 10px;
261 | margin-left: 5px;
262 | margin-right: 5px;
263 | .buttonBackground(@navbarBackgroundHighlight, @navbarBackground);
264 | .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
265 | }
266 | .navbar .btn-navbar .icon-bar {
267 | display: block;
268 | width: 18px;
269 | height: 2px;
270 | background-color: #f5f5f5;
271 | .border-radius(1px);
272 | .box-shadow(0 1px 0 rgba(0,0,0,.25));
273 | }
274 | .btn-navbar .icon-bar + .icon-bar {
275 | margin-top: 3px;
276 | }
277 |
278 |
279 | // Dropdown menus
280 | // --------------
281 |
282 | // Menu position and menu carets
283 | .navbar .dropdown-menu {
284 | &:before {
285 | content: '';
286 | display: inline-block;
287 | border-left: 7px solid transparent;
288 | border-right: 7px solid transparent;
289 | border-bottom: 7px solid #ccc;
290 | border-bottom-color: @dropdownBorder;
291 | position: absolute;
292 | top: -7px;
293 | left: 9px;
294 | }
295 | &:after {
296 | content: '';
297 | display: inline-block;
298 | border-left: 6px solid transparent;
299 | border-right: 6px solid transparent;
300 | border-bottom: 6px solid @dropdownBackground;
301 | position: absolute;
302 | top: -6px;
303 | left: 10px;
304 | }
305 | }
306 | // Menu position and menu caret support for dropups via extra dropup class
307 | .navbar-fixed-bottom .dropdown-menu {
308 | &:before {
309 | border-top: 7px solid #ccc;
310 | border-top-color: @dropdownBorder;
311 | border-bottom: 0;
312 | bottom: -7px;
313 | top: auto;
314 | }
315 | &:after {
316 | border-top: 6px solid @dropdownBackground;
317 | border-bottom: 0;
318 | bottom: -6px;
319 | top: auto;
320 | }
321 | }
322 | // Dropdown toggle caret
323 | .navbar .nav li.dropdown .dropdown-toggle .caret,
324 | .navbar .nav li.dropdown.open .caret {
325 | border-top-color: @white;
326 | border-bottom-color: @white;
327 | }
328 | .navbar .nav li.dropdown.active .caret {
329 | .opacity(100);
330 | }
331 |
332 | // Remove background color from open dropdown
333 | .navbar .nav li.dropdown.open > .dropdown-toggle,
334 | .navbar .nav li.dropdown.active > .dropdown-toggle,
335 | .navbar .nav li.dropdown.open.active > .dropdown-toggle {
336 | background-color: transparent;
337 | }
338 |
339 | // Dropdown link on hover
340 | .navbar .nav li.dropdown.active > .dropdown-toggle:hover {
341 | color: @white;
342 | }
343 |
344 | // Right aligned menus need alt position
345 | // TODO: rejigger this at some point to simplify the selectors
346 | .navbar .pull-right .dropdown-menu,
347 | .navbar .dropdown-menu.pull-right {
348 | left: auto;
349 | right: 0;
350 | &:before {
351 | left: auto;
352 | right: 12px;
353 | }
354 | &:after {
355 | left: auto;
356 | right: 13px;
357 | }
358 | }
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/sprites.less:
--------------------------------------------------------------------------------
1 | // SPRITES
2 | // Glyphs and icons for buttons, nav, and more
3 | // -------------------------------------------
4 |
5 |
6 | // ICONS
7 | // -----
8 |
9 | // All icons receive the styles of the tag with a base class
10 | // of .i and are then given a unique class to add width, height,
11 | // and background-position. Your resulting HTML will look like
12 | // .
13 |
14 | // For the white version of the icons, just add the .icon-white class:
15 | //
16 |
17 | [class^="icon-"],
18 | [class*=" icon-"] {
19 | display: inline-block;
20 | width: 14px;
21 | height: 14px;
22 | .ie7-restore-right-whitespace();
23 | line-height: 14px;
24 | vertical-align: text-top;
25 | background-image: url("@{iconSpritePath}");
26 | background-position: 14px 14px;
27 | background-repeat: no-repeat;
28 |
29 | }
30 | .icon-white {
31 | background-image: url("@{iconWhiteSpritePath}");
32 | }
33 |
34 | .icon-glass { background-position: 0 0; }
35 | .icon-music { background-position: -24px 0; }
36 | .icon-search { background-position: -48px 0; }
37 | .icon-envelope { background-position: -72px 0; }
38 | .icon-heart { background-position: -96px 0; }
39 | .icon-star { background-position: -120px 0; }
40 | .icon-star-empty { background-position: -144px 0; }
41 | .icon-user { background-position: -168px 0; }
42 | .icon-film { background-position: -192px 0; }
43 | .icon-th-large { background-position: -216px 0; }
44 | .icon-th { background-position: -240px 0; }
45 | .icon-th-list { background-position: -264px 0; }
46 | .icon-ok { background-position: -288px 0; }
47 | .icon-remove { background-position: -312px 0; }
48 | .icon-zoom-in { background-position: -336px 0; }
49 | .icon-zoom-out { background-position: -360px 0; }
50 | .icon-off { background-position: -384px 0; }
51 | .icon-signal { background-position: -408px 0; }
52 | .icon-cog { background-position: -432px 0; }
53 | .icon-trash { background-position: -456px 0; }
54 |
55 | .icon-home { background-position: 0 -24px; }
56 | .icon-file { background-position: -24px -24px; }
57 | .icon-time { background-position: -48px -24px; }
58 | .icon-road { background-position: -72px -24px; }
59 | .icon-download-alt { background-position: -96px -24px; }
60 | .icon-download { background-position: -120px -24px; }
61 | .icon-upload { background-position: -144px -24px; }
62 | .icon-inbox { background-position: -168px -24px; }
63 | .icon-play-circle { background-position: -192px -24px; }
64 | .icon-repeat { background-position: -216px -24px; }
65 | .icon-refresh { background-position: -240px -24px; }
66 | .icon-list-alt { background-position: -264px -24px; }
67 | .icon-lock { background-position: -287px -24px; } // 1px off
68 | .icon-flag { background-position: -312px -24px; }
69 | .icon-headphones { background-position: -336px -24px; }
70 | .icon-volume-off { background-position: -360px -24px; }
71 | .icon-volume-down { background-position: -384px -24px; }
72 | .icon-volume-up { background-position: -408px -24px; }
73 | .icon-qrcode { background-position: -432px -24px; }
74 | .icon-barcode { background-position: -456px -24px; }
75 |
76 | .icon-tag { background-position: 0 -48px; }
77 | .icon-tags { background-position: -25px -48px; } // 1px off
78 | .icon-book { background-position: -48px -48px; }
79 | .icon-bookmark { background-position: -72px -48px; }
80 | .icon-print { background-position: -96px -48px; }
81 | .icon-camera { background-position: -120px -48px; }
82 | .icon-font { background-position: -144px -48px; }
83 | .icon-bold { background-position: -167px -48px; } // 1px off
84 | .icon-italic { background-position: -192px -48px; }
85 | .icon-text-height { background-position: -216px -48px; }
86 | .icon-text-width { background-position: -240px -48px; }
87 | .icon-align-left { background-position: -264px -48px; }
88 | .icon-align-center { background-position: -288px -48px; }
89 | .icon-align-right { background-position: -312px -48px; }
90 | .icon-align-justify { background-position: -336px -48px; }
91 | .icon-list { background-position: -360px -48px; }
92 | .icon-indent-left { background-position: -384px -48px; }
93 | .icon-indent-right { background-position: -408px -48px; }
94 | .icon-facetime-video { background-position: -432px -48px; }
95 | .icon-picture { background-position: -456px -48px; }
96 |
97 | .icon-pencil { background-position: 0 -72px; }
98 | .icon-map-marker { background-position: -24px -72px; }
99 | .icon-adjust { background-position: -48px -72px; }
100 | .icon-tint { background-position: -72px -72px; }
101 | .icon-edit { background-position: -96px -72px; }
102 | .icon-share { background-position: -120px -72px; }
103 | .icon-check { background-position: -144px -72px; }
104 | .icon-move { background-position: -168px -72px; }
105 | .icon-step-backward { background-position: -192px -72px; }
106 | .icon-fast-backward { background-position: -216px -72px; }
107 | .icon-backward { background-position: -240px -72px; }
108 | .icon-play { background-position: -264px -72px; }
109 | .icon-pause { background-position: -288px -72px; }
110 | .icon-stop { background-position: -312px -72px; }
111 | .icon-forward { background-position: -336px -72px; }
112 | .icon-fast-forward { background-position: -360px -72px; }
113 | .icon-step-forward { background-position: -384px -72px; }
114 | .icon-eject { background-position: -408px -72px; }
115 | .icon-chevron-left { background-position: -432px -72px; }
116 | .icon-chevron-right { background-position: -456px -72px; }
117 |
118 | .icon-plus-sign { background-position: 0 -96px; }
119 | .icon-minus-sign { background-position: -24px -96px; }
120 | .icon-remove-sign { background-position: -48px -96px; }
121 | .icon-ok-sign { background-position: -72px -96px; }
122 | .icon-question-sign { background-position: -96px -96px; }
123 | .icon-info-sign { background-position: -120px -96px; }
124 | .icon-screenshot { background-position: -144px -96px; }
125 | .icon-remove-circle { background-position: -168px -96px; }
126 | .icon-ok-circle { background-position: -192px -96px; }
127 | .icon-ban-circle { background-position: -216px -96px; }
128 | .icon-arrow-left { background-position: -240px -96px; }
129 | .icon-arrow-right { background-position: -264px -96px; }
130 | .icon-arrow-up { background-position: -289px -96px; } // 1px off
131 | .icon-arrow-down { background-position: -312px -96px; }
132 | .icon-share-alt { background-position: -336px -96px; }
133 | .icon-resize-full { background-position: -360px -96px; }
134 | .icon-resize-small { background-position: -384px -96px; }
135 | .icon-plus { background-position: -408px -96px; }
136 | .icon-minus { background-position: -433px -96px; }
137 | .icon-asterisk { background-position: -456px -96px; }
138 |
139 | .icon-exclamation-sign { background-position: 0 -120px; }
140 | .icon-gift { background-position: -24px -120px; }
141 | .icon-leaf { background-position: -48px -120px; }
142 | .icon-fire { background-position: -72px -120px; }
143 | .icon-eye-open { background-position: -96px -120px; }
144 | .icon-eye-close { background-position: -120px -120px; }
145 | .icon-warning-sign { background-position: -144px -120px; }
146 | .icon-plane { background-position: -168px -120px; }
147 | .icon-calendar { background-position: -192px -120px; }
148 | .icon-random { background-position: -216px -120px; }
149 | .icon-comment { background-position: -240px -120px; }
150 | .icon-magnet { background-position: -264px -120px; }
151 | .icon-chevron-up { background-position: -288px -120px; }
152 | .icon-chevron-down { background-position: -313px -119px; } // 1px, 1px off
153 | .icon-retweet { background-position: -336px -120px; }
154 | .icon-shopping-cart { background-position: -360px -120px; }
155 | .icon-folder-close { background-position: -384px -120px; }
156 | .icon-folder-open { background-position: -408px -120px; }
157 | .icon-resize-vertical { background-position: -432px -119px; } // 1px, 1px off
158 | .icon-resize-horizontal { background-position: -456px -118px; } // 1px, 2px off
159 |
160 | .icon-hdd { background-position: 0 -144px; }
161 | .icon-bullhorn { background-position: -24px -144px; }
162 | .icon-bell { background-position: -48px -144px; }
163 | .icon-certificate { background-position: -72px -144px; }
164 | .icon-thumbs-up { background-position: -96px -144px; }
165 | .icon-thumbs-down { background-position: -120px -144px; }
166 | .icon-hand-right { background-position: -144px -144px; }
167 | .icon-hand-left { background-position: -168px -144px; }
168 | .icon-hand-up { background-position: -192px -144px; }
169 | .icon-hand-down { background-position: -216px -144px; }
170 | .icon-circle-arrow-right { background-position: -240px -144px; }
171 | .icon-circle-arrow-left { background-position: -264px -144px; }
172 | .icon-circle-arrow-up { background-position: -288px -144px; }
173 | .icon-circle-arrow-down { background-position: -312px -144px; }
174 | .icon-globe { background-position: -336px -144px; }
175 | .icon-wrench { background-position: -360px -144px; }
176 | .icon-tasks { background-position: -384px -144px; }
177 | .icon-filter { background-position: -408px -144px; }
178 | .icon-briefcase { background-position: -432px -144px; }
179 | .icon-fullscreen { background-position: -456px -144px; }
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
--------------------------------------------------------------------------------
/fedorasummerofhardware/static/less/forms.less:
--------------------------------------------------------------------------------
1 | // Forms.less
2 | // Base styles for various input types, form layouts, and states
3 | // -------------------------------------------------------------
4 |
5 |
6 | // GENERAL STYLES
7 | // --------------
8 |
9 | // Make all forms have space below them
10 | form {
11 | margin: 0 0 @baseLineHeight;
12 | }
13 |
14 | fieldset {
15 | padding: 0;
16 | margin: 0;
17 | border: 0;
18 | }
19 |
20 | // Groups of fields with labels on top (legends)
21 | legend {
22 | display: block;
23 | width: 100%;
24 | padding: 0;
25 | margin-bottom: @baseLineHeight * 1.5;
26 | font-size: @baseFontSize * 1.5;
27 | line-height: @baseLineHeight * 2;
28 | color: @grayDark;
29 | border: 0;
30 | border-bottom: 1px solid #e5e5e5;
31 |
32 | // Small
33 | small {
34 | font-size: @baseLineHeight * .75;
35 | color: @grayLight;
36 | }
37 | }
38 |
39 | // Set font for forms
40 | label,
41 | input,
42 | button,
43 | select,
44 | textarea {
45 | #font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
46 | }
47 | input,
48 | button,
49 | select,
50 | textarea {
51 | font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
52 | }
53 |
54 | // Identify controls by their labels
55 | label {
56 | display: block;
57 | margin-bottom: 5px;
58 | }
59 |
60 | // Form controls
61 | // -------------------------
62 |
63 | // Shared size and type resets
64 | select,
65 | textarea,
66 | input[type="text"],
67 | input[type="password"],
68 | input[type="datetime"],
69 | input[type="datetime-local"],
70 | input[type="date"],
71 | input[type="month"],
72 | input[type="time"],
73 | input[type="week"],
74 | input[type="number"],
75 | input[type="email"],
76 | input[type="url"],
77 | input[type="search"],
78 | input[type="tel"],
79 | input[type="color"],
80 | .uneditable-input {
81 | display: inline-block;
82 | height: @baseLineHeight;
83 | padding: 4px;
84 | margin-bottom: 9px;
85 | font-size: @baseFontSize;
86 | line-height: @baseLineHeight;
87 | color: @gray;
88 | }
89 |
90 | // Reset appearance properties for textual inputs and textarea
91 | // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
92 | input,
93 | textarea {
94 | width: 210px;
95 | }
96 | // Reset height since textareas have rows
97 | textarea {
98 | height: auto;
99 | }
100 | // Everything else
101 | textarea,
102 | input[type="text"],
103 | input[type="password"],
104 | input[type="datetime"],
105 | input[type="datetime-local"],
106 | input[type="date"],
107 | input[type="month"],
108 | input[type="time"],
109 | input[type="week"],
110 | input[type="number"],
111 | input[type="email"],
112 | input[type="url"],
113 | input[type="search"],
114 | input[type="tel"],
115 | input[type="color"],
116 | .uneditable-input {
117 | background-color: @inputBackground;
118 | border: 1px solid @inputBorder;
119 | .border-radius(@inputBorderRadius);
120 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
121 | @transition: border linear .2s, box-shadow linear .2s;
122 | .transition(@transition);
123 |
124 | // Focus state
125 | &:focus {
126 | border-color: rgba(82,168,236,.8);
127 | outline: 0;
128 | outline: thin dotted \9; /* IE6-9 */
129 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
130 | }
131 | }
132 |
133 | // Position radios and checkboxes better
134 | input[type="radio"],
135 | input[type="checkbox"] {
136 | margin: 3px 0;
137 | *margin-top: 0; /* IE7 */
138 | line-height: normal;
139 | cursor: pointer;
140 | }
141 |
142 | // Reset width of input buttons, radios, checkboxes
143 | input[type="submit"],
144 | input[type="reset"],
145 | input[type="button"],
146 | input[type="radio"],
147 | input[type="checkbox"] {
148 | width: auto; // Override of generic input selector
149 | }
150 |
151 | // Make uneditable textareas behave like a textarea
152 | .uneditable-textarea {
153 | width: auto;
154 | height: auto;
155 | }
156 |
157 | // Set the height of select and file controls to match text inputs
158 | select,
159 | input[type="file"] {
160 | height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
161 | *margin-top: 4px; /* For IE7, add top margin to align select with labels */
162 | line-height: 28px;
163 | }
164 |
165 | // Make select elements obey height by applying a border
166 | select {
167 | width: 220px; // default input width + 10px of padding that doesn't get applied
168 | border: 1px solid #bbb;
169 | }
170 |
171 | // Make multiple select elements height not fixed
172 | select[multiple],
173 | select[size] {
174 | height: auto;
175 | }
176 |
177 | // Focus for select, file, radio, and checkbox
178 | select:focus,
179 | input[type="file"]:focus,
180 | input[type="radio"]:focus,
181 | input[type="checkbox"]:focus {
182 | .tab-focus();
183 | }
184 |
185 |
186 |
187 | // CHECKBOXES & RADIOS
188 | // -------------------
189 |
190 | // Indent the labels to position radios/checkboxes as hanging
191 | .radio,
192 | .checkbox {
193 | min-height: 18px; // clear the floating input if there is no label text
194 | padding-left: 18px;
195 | }
196 | .radio input[type="radio"],
197 | .checkbox input[type="checkbox"] {
198 | float: left;
199 | margin-left: -18px;
200 | }
201 |
202 | // Move the options list down to align with labels
203 | .controls > .radio:first-child,
204 | .controls > .checkbox:first-child {
205 | padding-top: 5px; // has to be padding because margin collaspes
206 | }
207 |
208 | // Radios and checkboxes on same line
209 | // TODO v3: Convert .inline to .control-inline
210 | .radio.inline,
211 | .checkbox.inline {
212 | display: inline-block;
213 | padding-top: 5px;
214 | margin-bottom: 0;
215 | vertical-align: middle;
216 | }
217 | .radio.inline + .radio.inline,
218 | .checkbox.inline + .checkbox.inline {
219 | margin-left: 10px; // space out consecutive inline controls
220 | }
221 |
222 |
223 |
224 | // INPUT SIZES
225 | // -----------
226 |
227 | // General classes for quick sizes
228 | .input-mini { width: 60px; }
229 | .input-small { width: 90px; }
230 | .input-medium { width: 150px; }
231 | .input-large { width: 210px; }
232 | .input-xlarge { width: 270px; }
233 | .input-xxlarge { width: 530px; }
234 |
235 | // Grid style input sizes
236 | input[class*="span"],
237 | select[class*="span"],
238 | textarea[class*="span"],
239 | .uneditable-input[class*="span"],
240 | // Redeclare since the fluid row class is more specific
241 | .row-fluid input[class*="span"],
242 | .row-fluid select[class*="span"],
243 | .row-fluid textarea[class*="span"],
244 | .row-fluid .uneditable-input[class*="span"] {
245 | float: none;
246 | margin-left: 0;
247 | }
248 | // Ensure input-prepend/append never wraps
249 | .input-append input[class*="span"],
250 | .input-append .uneditable-input[class*="span"],
251 | .input-prepend input[class*="span"],
252 | .input-prepend .uneditable-input[class*="span"],
253 | .row-fluid .input-prepend [class*="span"],
254 | .row-fluid .input-append [class*="span"] {
255 | display: inline-block;
256 | }
257 |
258 |
259 |
260 | // GRID SIZING FOR INPUTS
261 | // ----------------------
262 |
263 | #grid > .input(@gridColumnWidth, @gridGutterWidth);
264 |
265 |
266 |
267 | // DISABLED STATE
268 | // --------------
269 |
270 | // Disabled and read-only inputs
271 | input[disabled],
272 | select[disabled],
273 | textarea[disabled],
274 | input[readonly],
275 | select[readonly],
276 | textarea[readonly] {
277 | cursor: not-allowed;
278 | background-color: @inputDisabledBackground;
279 | border-color: #ddd;
280 | }
281 | // Explicitly reset the colors here
282 | input[type="radio"][disabled],
283 | input[type="checkbox"][disabled],
284 | input[type="radio"][readonly],
285 | input[type="checkbox"][readonly] {
286 | background-color: transparent;
287 | }
288 |
289 |
290 |
291 |
292 | // FORM FIELD FEEDBACK STATES
293 | // --------------------------
294 |
295 | // Warning
296 | .control-group.warning {
297 | .formFieldState(@warningText, @warningText, @warningBackground);
298 | }
299 | // Error
300 | .control-group.error {
301 | .formFieldState(@errorText, @errorText, @errorBackground);
302 | }
303 | // Success
304 | .control-group.success {
305 | .formFieldState(@successText, @successText, @successBackground);
306 | }
307 |
308 | // HTML5 invalid states
309 | // Shares styles with the .control-group.error above
310 | input:focus:required:invalid,
311 | textarea:focus:required:invalid,
312 | select:focus:required:invalid {
313 | color: #b94a48;
314 | border-color: #ee5f5b;
315 | &:focus {
316 | border-color: darken(#ee5f5b, 10%);
317 | .box-shadow(0 0 6px lighten(#ee5f5b, 20%));
318 | }
319 | }
320 |
321 |
322 |
323 | // FORM ACTIONS
324 | // ------------
325 |
326 | .form-actions {
327 | padding: (@baseLineHeight - 1) 20px @baseLineHeight;
328 | margin-top: @baseLineHeight;
329 | margin-bottom: @baseLineHeight;
330 | background-color: @formActionsBackground;
331 | border-top: 1px solid #e5e5e5;
332 | .clearfix(); // Adding clearfix to allow for .pull-right button containers
333 | }
334 |
335 | // For text that needs to appear as an input but should not be an input
336 | .uneditable-input {
337 | overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
338 | white-space: nowrap;
339 | cursor: not-allowed;
340 | background-color: @inputBackground;
341 | border-color: #eee;
342 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
343 | }
344 |
345 | // Placeholder text gets special styles; can't be bundled together though for some reason
346 | .placeholder();
347 |
348 |
349 |
350 | // HELP TEXT
351 | // ---------
352 |
353 | .help-block,
354 | .help-inline {
355 | color: @gray; // lighten the text some for contrast
356 | }
357 |
358 | .help-block {
359 | display: block; // account for any element using help-block
360 | margin-bottom: @baseLineHeight / 2;
361 | }
362 |
363 | .help-inline {
364 | display: inline-block;
365 | .ie7-inline-block();
366 | vertical-align: middle;
367 | padding-left: 5px;
368 | }
369 |
370 |
371 |
372 | // INPUT GROUPS
373 | // ------------
374 |
375 | // Allow us to put symbols and text within the input field for a cleaner look
376 | .input-prepend,
377 | .input-append {
378 | margin-bottom: 5px;
379 | input,
380 | select,
381 | .uneditable-input {
382 | position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
383 | margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
384 | *margin-left: 0;
385 | vertical-align: middle;
386 | .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
387 | // Make input on top when focused so blue border and shadow always show
388 | &:focus {
389 | z-index: 2;
390 | }
391 | }
392 | .uneditable-input {
393 | border-left-color: #ccc;
394 | }
395 | .add-on {
396 | display: inline-block;
397 | width: auto;
398 | height: @baseLineHeight;
399 | min-width: 16px;
400 | padding: 4px 5px;
401 | font-weight: normal;
402 | line-height: @baseLineHeight;
403 | text-align: center;
404 | text-shadow: 0 1px 0 @white;
405 | vertical-align: middle;
406 | background-color: @grayLighter;
407 | border: 1px solid #ccc;
408 | }
409 | .add-on,
410 | .btn {
411 | margin-left: -1px;
412 | .border-radius(0);
413 | }
414 | .active {
415 | background-color: lighten(@green, 30);
416 | border-color: @green;
417 | }
418 | }
419 | .input-prepend {
420 | .add-on,
421 | .btn {
422 | margin-right: -1px;
423 | }
424 | .add-on:first-child,
425 | .btn:first-child {
426 | .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
427 | }
428 | }
429 | .input-append {
430 | input,
431 | select,
432 | .uneditable-input {
433 | .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
434 | }
435 | .uneditable-input {
436 | border-right-color: #ccc;
437 | border-left-color: #eee;
438 | }
439 | .add-on:last-child,
440 | .btn:last-child {
441 | .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
442 | }
443 | }
444 | // Remove all border-radius for inputs with both prepend and append
445 | .input-prepend.input-append {
446 | input,
447 | select,
448 | .uneditable-input {
449 | .border-radius(0);
450 | }
451 | .add-on:first-child,
452 | .btn:first-child {
453 | margin-right: -1px;
454 | .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
455 | }
456 | .add-on:last-child,
457 | .btn:last-child {
458 | margin-left: -1px;
459 | .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
460 | }
461 | }
462 |
463 |
464 |
465 | // SEARCH FORM
466 | // -----------
467 |
468 | .search-query {
469 | padding-right: 14px;
470 | padding-right: 4px \9;
471 | padding-left: 14px;
472 | padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
473 | margin-bottom: 0; // remove the default margin on all inputs
474 | .border-radius(14px);
475 | }
476 |
477 |
478 |
479 | // HORIZONTAL & VERTICAL FORMS
480 | // ---------------------------
481 |
482 | // Common properties
483 | // -----------------
484 |
485 | .form-search,
486 | .form-inline,
487 | .form-horizontal {
488 | input,
489 | textarea,
490 | select,
491 | .help-inline,
492 | .uneditable-input,
493 | .input-prepend,
494 | .input-append {
495 | display: inline-block;
496 | .ie7-inline-block();
497 | margin-bottom: 0;
498 | }
499 | // Re-hide hidden elements due to specifity
500 | .hide {
501 | display: none;
502 | }
503 | }
504 | .form-search label,
505 | .form-inline label {
506 | display: inline-block;
507 | }
508 | // Remove margin for input-prepend/-append
509 | .form-search .input-append,
510 | .form-inline .input-append,
511 | .form-search .input-prepend,
512 | .form-inline .input-prepend {
513 | margin-bottom: 0;
514 | }
515 | // Inline checkbox/radio labels (remove padding on left)
516 | .form-search .radio,
517 | .form-search .checkbox,
518 | .form-inline .radio,
519 | .form-inline .checkbox {
520 | padding-left: 0;
521 | margin-bottom: 0;
522 | vertical-align: middle;
523 | }
524 | // Remove float and margin, set to inline-block
525 | .form-search .radio input[type="radio"],
526 | .form-search .checkbox input[type="checkbox"],
527 | .form-inline .radio input[type="radio"],
528 | .form-inline .checkbox input[type="checkbox"] {
529 | float: left;
530 | margin-right: 3px;
531 | margin-left: 0;
532 | }
533 |
534 |
535 | // Margin to space out fieldsets
536 | .control-group {
537 | margin-bottom: @baseLineHeight / 2;
538 | }
539 |
540 | // Legend collapses margin, so next element is responsible for spacing
541 | legend + .control-group {
542 | margin-top: @baseLineHeight;
543 | -webkit-margin-top-collapse: separate;
544 | }
545 |
546 | // Horizontal-specific styles
547 | // --------------------------
548 |
549 | .form-horizontal {
550 | // Increase spacing between groups
551 | .control-group {
552 | margin-bottom: @baseLineHeight;
553 | .clearfix();
554 | }
555 | // Float the labels left
556 | .control-label {
557 | float: left;
558 | width: 140px;
559 | padding-top: 5px;
560 | text-align: right;
561 | }
562 | // Move over all input controls and content
563 | .controls {
564 | // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
565 | // don't inherit the margin of the parent, in this case .controls
566 | *display: inline-block;
567 | *padding-left: 20px;
568 | margin-left: 160px;
569 | *margin-left: 0;
570 | &:first-child {
571 | *padding-left: 160px;
572 | }
573 | }
574 | // Remove bottom margin on block level help text since that's accounted for on .control-group
575 | .help-block {
576 | margin-top: @baseLineHeight / 2;
577 | margin-bottom: 0;
578 | }
579 | // Move over buttons in .form-actions to align with .controls
580 | .form-actions {
581 | padding-left: 160px;
582 | }
583 | }
584 |
--------------------------------------------------------------------------------