adhoq 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +80 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/adhoq/application.js +19 -0
- data/app/assets/javascripts/adhoq/bootstrap-sprockets.js +12 -0
- data/app/assets/javascripts/adhoq/bootstrap.js +2107 -0
- data/app/assets/javascripts/adhoq/bootstrap/affix.js +142 -0
- data/app/assets/javascripts/adhoq/bootstrap/alert.js +92 -0
- data/app/assets/javascripts/adhoq/bootstrap/button.js +110 -0
- data/app/assets/javascripts/adhoq/bootstrap/carousel.js +223 -0
- data/app/assets/javascripts/adhoq/bootstrap/collapse.js +170 -0
- data/app/assets/javascripts/adhoq/bootstrap/dropdown.js +151 -0
- data/app/assets/javascripts/adhoq/bootstrap/modal.js +280 -0
- data/app/assets/javascripts/adhoq/bootstrap/popover.js +113 -0
- data/app/assets/javascripts/adhoq/bootstrap/scrollspy.js +170 -0
- data/app/assets/javascripts/adhoq/bootstrap/tab.js +128 -0
- data/app/assets/javascripts/adhoq/bootstrap/tooltip.js +457 -0
- data/app/assets/javascripts/adhoq/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/adhoq/previewer.js.coffee +25 -0
- data/app/assets/stylesheets/adhoq/_bootstrap-compass.scss +7 -0
- data/app/assets/stylesheets/adhoq/_bootstrap-mincer.scss +17 -0
- data/app/assets/stylesheets/adhoq/_bootstrap-sprockets.scss +7 -0
- data/app/assets/stylesheets/adhoq/adhoq.css.sass +57 -0
- data/app/assets/stylesheets/adhoq/application.css +16 -0
- data/app/assets/stylesheets/adhoq/bootstrap.scss +50 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_alerts.scss +68 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_badges.scss +57 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_breadcrumbs.scss +26 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_button-groups.scss +240 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_buttons.scss +157 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_carousel.scss +243 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_close.scss +35 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_code.scss +68 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_component-animations.scss +35 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_dropdowns.scss +215 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_forms.scss +538 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_glyphicons.scss +237 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_grid.scss +84 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_input-groups.scss +166 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_jumbotron.scss +48 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_list-group.scss +131 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_media.scss +56 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_mixins.scss +39 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_modals.scss +150 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_navbar.scss +659 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_navs.scss +242 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_normalize.scss +425 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_pager.scss +55 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_pagination.scss +88 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_panels.scss +243 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_popovers.scss +133 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_print.scss +101 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_progress-bars.scss +105 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_responsive-embed.scss +34 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_responsive-utilities.scss +174 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_scaffolding.scss +150 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_tables.scss +233 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_theme.scss +258 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_thumbnails.scss +38 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_tooltip.scss +95 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_type.scss +304 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_utilities.scss +57 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_variables.scss +850 -0
- data/app/assets/stylesheets/adhoq/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/adhoq/bootstrap/bootstrap.scss +50 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_alerts.scss +14 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_background-variant.scss +11 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_buttons.scss +50 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_forms.scss +84 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_gradients.scss +58 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_image.scss +34 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_list-group.scss +31 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_opacity.scss +8 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_pagination.scss +23 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_panels.scss +24 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_progress-bar.scss +10 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-emphasis.scss +11 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/adhoq/bootstrap/mixins/_vendor-prefixes.scss +219 -0
- data/app/controllers/adhoq/application_controller.rb +5 -0
- data/app/controllers/adhoq/authorization_methods.rb +36 -0
- data/app/controllers/adhoq/executions_controller.rb +25 -0
- data/app/controllers/adhoq/previews_controller.rb +13 -0
- data/app/controllers/adhoq/queries_controller.rb +38 -0
- data/app/helpers/adhoq/application_helper.rb +11 -0
- data/app/models/adhoq/execution.rb +29 -0
- data/app/models/adhoq/query.rb +14 -0
- data/app/models/adhoq/report.rb +42 -0
- data/app/models/adhoq/time_based_orders.rb +9 -0
- data/app/views/adhoq/application/_global_nav.html.slim +11 -0
- data/app/views/adhoq/application/_sidebar_queries_index.html.slim +10 -0
- data/app/views/adhoq/previews/create.html.slim +12 -0
- data/app/views/adhoq/previews/statement_invalid.html.slim +5 -0
- data/app/views/adhoq/queries/_form.html.slim +38 -0
- data/app/views/adhoq/queries/_query.html.slim +43 -0
- data/app/views/adhoq/queries/edit.html.slim +2 -0
- data/app/views/adhoq/queries/index.html.slim +1 -0
- data/app/views/adhoq/queries/new.html.slim +2 -0
- data/app/views/adhoq/queries/show.html.slim +1 -0
- data/app/views/layouts/adhoq/application.html.slim +18 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20141003095645_create_adhoq_queries.rb +11 -0
- data/db/migrate/20141006014750_create_adhoq_executions.rb +13 -0
- data/db/migrate/20141007052308_create_adhoq_reports.rb +12 -0
- data/lib/adhoq.rb +13 -0
- data/lib/adhoq/configuration.rb +21 -0
- data/lib/adhoq/engine.rb +15 -0
- data/lib/adhoq/error.rb +4 -0
- data/lib/adhoq/executor.rb +27 -0
- data/lib/adhoq/global_variable.rb +34 -0
- data/lib/adhoq/reporter.rb +5 -0
- data/lib/adhoq/reporter/xlsx.rb +32 -0
- data/lib/adhoq/result.rb +18 -0
- data/lib/adhoq/storage.rb +5 -0
- data/lib/adhoq/storage/local_file.rb +45 -0
- data/lib/adhoq/version.rb +3 -0
- data/lib/tasks/adhoq_tasks.rake +4 -0
- data/spec/adhoq/executor_spec.rb +11 -0
- data/spec/adhoq/storage_spec.rb +19 -0
- data/spec/factories/adhoq_queries.rb +29 -0
- data/spec/models/adhoq/execution_spec.rb +4 -0
- data/spec/models/adhoq/query_spec.rb +4 -0
- data/spec/models/adhoq/report_spec.rb +25 -0
- data/spec/spec_helper.rb +36 -0
- data/spec/support/have_values_in_xlsx_sheet_matcher.rb +20 -0
- metadata +375 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
//
|
2
|
+
// Wells
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base class
|
7
|
+
.well {
|
8
|
+
min-height: 20px;
|
9
|
+
padding: 19px;
|
10
|
+
margin-bottom: 20px;
|
11
|
+
background-color: $well-bg;
|
12
|
+
border: 1px solid $well-border;
|
13
|
+
border-radius: $border-radius-base;
|
14
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
|
15
|
+
blockquote {
|
16
|
+
border-color: #ddd;
|
17
|
+
border-color: rgba(0,0,0,.15);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
// Sizes
|
22
|
+
.well-lg {
|
23
|
+
padding: 24px;
|
24
|
+
border-radius: $border-radius-large;
|
25
|
+
}
|
26
|
+
.well-sm {
|
27
|
+
padding: 9px;
|
28
|
+
border-radius: $border-radius-small;
|
29
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Core variables and mixins
|
2
|
+
@import "variables";
|
3
|
+
@import "mixins";
|
4
|
+
|
5
|
+
// Reset and dependencies
|
6
|
+
@import "normalize";
|
7
|
+
@import "print";
|
8
|
+
@import "glyphicons";
|
9
|
+
|
10
|
+
// Core CSS
|
11
|
+
@import "scaffolding";
|
12
|
+
@import "type";
|
13
|
+
@import "code";
|
14
|
+
@import "grid";
|
15
|
+
@import "tables";
|
16
|
+
@import "forms";
|
17
|
+
@import "buttons";
|
18
|
+
|
19
|
+
// Components
|
20
|
+
@import "component-animations";
|
21
|
+
@import "dropdowns";
|
22
|
+
@import "button-groups";
|
23
|
+
@import "input-groups";
|
24
|
+
@import "navs";
|
25
|
+
@import "navbar";
|
26
|
+
@import "breadcrumbs";
|
27
|
+
@import "pagination";
|
28
|
+
@import "pager";
|
29
|
+
@import "labels";
|
30
|
+
@import "badges";
|
31
|
+
@import "jumbotron";
|
32
|
+
@import "thumbnails";
|
33
|
+
@import "alerts";
|
34
|
+
@import "progress-bars";
|
35
|
+
@import "media";
|
36
|
+
@import "list-group";
|
37
|
+
@import "panels";
|
38
|
+
@import "responsive-embed";
|
39
|
+
@import "wells";
|
40
|
+
@import "close";
|
41
|
+
|
42
|
+
// Components w/ JavaScript
|
43
|
+
@import "modals";
|
44
|
+
@import "tooltip";
|
45
|
+
@import "popovers";
|
46
|
+
@import "carousel";
|
47
|
+
|
48
|
+
// Utility classes
|
49
|
+
@import "utilities";
|
50
|
+
@import "responsive-utilities";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Alerts
|
2
|
+
|
3
|
+
@mixin alert-variant($background, $border, $text-color) {
|
4
|
+
background-color: $background;
|
5
|
+
border-color: $border;
|
6
|
+
color: $text-color;
|
7
|
+
|
8
|
+
hr {
|
9
|
+
border-top-color: darken($border, 5%);
|
10
|
+
}
|
11
|
+
.alert-link {
|
12
|
+
color: darken($text-color, 10%);
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// Single side border-radius
|
2
|
+
|
3
|
+
@mixin border-top-radius($radius) {
|
4
|
+
border-top-right-radius: $radius;
|
5
|
+
border-top-left-radius: $radius;
|
6
|
+
}
|
7
|
+
@mixin border-right-radius($radius) {
|
8
|
+
border-bottom-right-radius: $radius;
|
9
|
+
border-top-right-radius: $radius;
|
10
|
+
}
|
11
|
+
@mixin border-bottom-radius($radius) {
|
12
|
+
border-bottom-right-radius: $radius;
|
13
|
+
border-bottom-left-radius: $radius;
|
14
|
+
}
|
15
|
+
@mixin border-left-radius($radius) {
|
16
|
+
border-bottom-left-radius: $radius;
|
17
|
+
border-top-left-radius: $radius;
|
18
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Button variants
|
2
|
+
//
|
3
|
+
// Easily pump out default styles, as well as :hover, :focus, :active,
|
4
|
+
// and disabled options for all buttons
|
5
|
+
|
6
|
+
@mixin button-variant($color, $background, $border) {
|
7
|
+
color: $color;
|
8
|
+
background-color: $background;
|
9
|
+
border-color: $border;
|
10
|
+
|
11
|
+
&:hover,
|
12
|
+
&:focus,
|
13
|
+
&:active,
|
14
|
+
&.active,
|
15
|
+
.open > &.dropdown-toggle {
|
16
|
+
color: $color;
|
17
|
+
background-color: darken($background, 10%);
|
18
|
+
border-color: darken($border, 12%);
|
19
|
+
}
|
20
|
+
&:active,
|
21
|
+
&.active,
|
22
|
+
.open > &.dropdown-toggle {
|
23
|
+
background-image: none;
|
24
|
+
}
|
25
|
+
&.disabled,
|
26
|
+
&[disabled],
|
27
|
+
fieldset[disabled] & {
|
28
|
+
&,
|
29
|
+
&:hover,
|
30
|
+
&:focus,
|
31
|
+
&:active,
|
32
|
+
&.active {
|
33
|
+
background-color: $background;
|
34
|
+
border-color: $border;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.badge {
|
39
|
+
color: $background;
|
40
|
+
background-color: $color;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
// Button sizes
|
45
|
+
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
46
|
+
padding: $padding-vertical $padding-horizontal;
|
47
|
+
font-size: $font-size;
|
48
|
+
line-height: $line-height;
|
49
|
+
border-radius: $border-radius;
|
50
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Clearfix
|
2
|
+
//
|
3
|
+
// For modern browsers
|
4
|
+
// 1. The space content is one way to avoid an Opera bug when the
|
5
|
+
// contenteditable attribute is included anywhere else in the document.
|
6
|
+
// Otherwise it causes space to appear at the top and bottom of elements
|
7
|
+
// that are clearfixed.
|
8
|
+
// 2. The use of `table` rather than `block` is only necessary if using
|
9
|
+
// `:before` to contain the top-margins of child elements.
|
10
|
+
//
|
11
|
+
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
12
|
+
|
13
|
+
@mixin clearfix() {
|
14
|
+
&:before,
|
15
|
+
&:after {
|
16
|
+
content: " "; // 1
|
17
|
+
display: table; // 2
|
18
|
+
}
|
19
|
+
&:after {
|
20
|
+
clear: both;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
// Form validation states
|
2
|
+
//
|
3
|
+
// Used in forms.less to generate the form validation CSS for warnings, errors,
|
4
|
+
// and successes.
|
5
|
+
|
6
|
+
@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
|
7
|
+
// Color the label and help text
|
8
|
+
.help-block,
|
9
|
+
.control-label,
|
10
|
+
.radio,
|
11
|
+
.checkbox,
|
12
|
+
.radio-inline,
|
13
|
+
.checkbox-inline {
|
14
|
+
color: $text-color;
|
15
|
+
}
|
16
|
+
// Set the border and box shadow on specific inputs to match
|
17
|
+
.form-control {
|
18
|
+
border-color: $border-color;
|
19
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
|
20
|
+
&:focus {
|
21
|
+
border-color: darken($border-color, 10%);
|
22
|
+
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
|
23
|
+
@include box-shadow($shadow);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
// Set validation states also for addons
|
27
|
+
.input-group-addon {
|
28
|
+
color: $text-color;
|
29
|
+
border-color: $border-color;
|
30
|
+
background-color: $background-color;
|
31
|
+
}
|
32
|
+
// Optional feedback icon
|
33
|
+
.form-control-feedback {
|
34
|
+
color: $text-color;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
// Form control focus state
|
40
|
+
//
|
41
|
+
// Generate a customized focus state and for any input with the specified color,
|
42
|
+
// which defaults to the `$input-border-focus` variable.
|
43
|
+
//
|
44
|
+
// We highly encourage you to not customize the default value, but instead use
|
45
|
+
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
46
|
+
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
47
|
+
// usability and accessibility should be taken into account with any change.
|
48
|
+
//
|
49
|
+
// Example usage: change the default blue border and shadow to white for better
|
50
|
+
// contrast against a dark gray background.
|
51
|
+
@mixin form-control-focus($color: $input-border-focus) {
|
52
|
+
$color-rgba: rgba(red($color), green($color), blue($color), .6);
|
53
|
+
&:focus {
|
54
|
+
border-color: $color;
|
55
|
+
outline: 0;
|
56
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// Form control sizing
|
61
|
+
//
|
62
|
+
// Relative text size, padding, and border-radii changes for form controls. For
|
63
|
+
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
64
|
+
// element gets special love because it's special, and that's a fact!
|
65
|
+
// [converter] $parent hack
|
66
|
+
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
67
|
+
#{$parent} {
|
68
|
+
height: $input-height;
|
69
|
+
padding: $padding-vertical $padding-horizontal;
|
70
|
+
font-size: $font-size;
|
71
|
+
line-height: $line-height;
|
72
|
+
border-radius: $border-radius;
|
73
|
+
}
|
74
|
+
|
75
|
+
select#{$parent} {
|
76
|
+
height: $input-height;
|
77
|
+
line-height: $input-height;
|
78
|
+
}
|
79
|
+
|
80
|
+
textarea#{$parent},
|
81
|
+
select[multiple]#{$parent} {
|
82
|
+
height: auto;
|
83
|
+
}
|
84
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
// Gradients
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
// Horizontal gradient, from left to right
|
6
|
+
//
|
7
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
8
|
+
// Color stops are not available in IE9 and below.
|
9
|
+
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
10
|
+
background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
11
|
+
background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
|
12
|
+
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
13
|
+
background-repeat: repeat-x;
|
14
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
|
15
|
+
}
|
16
|
+
|
17
|
+
// Vertical gradient, from top to bottom
|
18
|
+
//
|
19
|
+
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
20
|
+
// Color stops are not available in IE9 and below.
|
21
|
+
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
22
|
+
background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
23
|
+
background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
|
24
|
+
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
25
|
+
background-repeat: repeat-x;
|
26
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
30
|
+
background-repeat: repeat-x;
|
31
|
+
background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
|
32
|
+
background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
|
33
|
+
background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
34
|
+
}
|
35
|
+
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
36
|
+
background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
|
37
|
+
background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
|
38
|
+
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
39
|
+
background-repeat: no-repeat;
|
40
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
|
41
|
+
}
|
42
|
+
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
43
|
+
background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
44
|
+
background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
45
|
+
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
46
|
+
background-repeat: no-repeat;
|
47
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
|
48
|
+
}
|
49
|
+
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
50
|
+
background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
|
51
|
+
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
52
|
+
background-repeat: no-repeat;
|
53
|
+
}
|
54
|
+
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
55
|
+
background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
56
|
+
background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
57
|
+
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
58
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
// Framework grid generation
|
2
|
+
//
|
3
|
+
// Used only by Bootstrap to generate the correct number of grid classes given
|
4
|
+
// any value of `$grid-columns`.
|
5
|
+
|
6
|
+
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
7
|
+
@mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
|
8
|
+
@for $i from (1 + 1) through $grid-columns {
|
9
|
+
$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
|
10
|
+
}
|
11
|
+
#{$list} {
|
12
|
+
position: relative;
|
13
|
+
// Prevent columns from collapsing when empty
|
14
|
+
min-height: 1px;
|
15
|
+
// Inner gutter via padding
|
16
|
+
padding-left: ($grid-gutter-width / 2);
|
17
|
+
padding-right: ($grid-gutter-width / 2);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
23
|
+
@mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
|
24
|
+
@for $i from (1 + 1) through $grid-columns {
|
25
|
+
$list: "#{$list}, .col-#{$class}-#{$i}";
|
26
|
+
}
|
27
|
+
#{$list} {
|
28
|
+
float: left;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
@mixin calc-grid-column($index, $class, $type) {
|
34
|
+
@if ($type == width) and ($index > 0) {
|
35
|
+
.col-#{$class}-#{$index} {
|
36
|
+
width: percentage(($index / $grid-columns));
|
37
|
+
}
|
38
|
+
}
|
39
|
+
@if ($type == push) and ($index > 0) {
|
40
|
+
.col-#{$class}-push-#{$index} {
|
41
|
+
left: percentage(($index / $grid-columns));
|
42
|
+
}
|
43
|
+
}
|
44
|
+
@if ($type == push) and ($index == 0) {
|
45
|
+
.col-#{$class}-push-0 {
|
46
|
+
left: auto;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
@if ($type == pull) and ($index > 0) {
|
50
|
+
.col-#{$class}-pull-#{$index} {
|
51
|
+
right: percentage(($index / $grid-columns));
|
52
|
+
}
|
53
|
+
}
|
54
|
+
@if ($type == pull) and ($index == 0) {
|
55
|
+
.col-#{$class}-pull-0 {
|
56
|
+
right: auto;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
@if ($type == offset) {
|
60
|
+
.col-#{$class}-offset-#{$index} {
|
61
|
+
margin-left: percentage(($index / $grid-columns));
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
67
|
+
@mixin loop-grid-columns($columns, $class, $type) {
|
68
|
+
@for $i from 0 through $columns {
|
69
|
+
@include calc-grid-column($i, $class, $type);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
// Create grid for specific class
|
75
|
+
@mixin make-grid($class) {
|
76
|
+
@include float-grid-columns($class);
|
77
|
+
@include loop-grid-columns($grid-columns, $class, width);
|
78
|
+
@include loop-grid-columns($grid-columns, $class, pull);
|
79
|
+
@include loop-grid-columns($grid-columns, $class, push);
|
80
|
+
@include loop-grid-columns($grid-columns, $class, offset);
|
81
|
+
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
// Grid system
|
2
|
+
//
|
3
|
+
// Generate semantic grid columns with these mixins.
|
4
|
+
|
5
|
+
// Centered container element
|
6
|
+
@mixin container-fixed($gutter: $grid-gutter-width) {
|
7
|
+
margin-right: auto;
|
8
|
+
margin-left: auto;
|
9
|
+
padding-left: ($gutter / 2);
|
10
|
+
padding-right: ($gutter / 2);
|
11
|
+
@include clearfix();
|
12
|
+
}
|
13
|
+
|
14
|
+
// Creates a wrapper for a series of columns
|
15
|
+
@mixin make-row($gutter: $grid-gutter-width) {
|
16
|
+
margin-left: ($gutter / -2);
|
17
|
+
margin-right: ($gutter / -2);
|
18
|
+
@include clearfix();
|
19
|
+
}
|
20
|
+
|
21
|
+
// Generate the extra small columns
|
22
|
+
@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
|
23
|
+
position: relative;
|
24
|
+
float: left;
|
25
|
+
width: percentage(($columns / $grid-columns));
|
26
|
+
min-height: 1px;
|
27
|
+
padding-left: ($gutter / 2);
|
28
|
+
padding-right: ($gutter / 2);
|
29
|
+
}
|
30
|
+
@mixin make-xs-column-offset($columns) {
|
31
|
+
margin-left: percentage(($columns / $grid-columns));
|
32
|
+
}
|
33
|
+
@mixin make-xs-column-push($columns) {
|
34
|
+
left: percentage(($columns / $grid-columns));
|
35
|
+
}
|
36
|
+
@mixin make-xs-column-pull($columns) {
|
37
|
+
right: percentage(($columns / $grid-columns));
|
38
|
+
}
|
39
|
+
|
40
|
+
// Generate the small columns
|
41
|
+
@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
|
42
|
+
position: relative;
|
43
|
+
min-height: 1px;
|
44
|
+
padding-left: ($gutter / 2);
|
45
|
+
padding-right: ($gutter / 2);
|
46
|
+
|
47
|
+
@media (min-width: $screen-sm-min) {
|
48
|
+
float: left;
|
49
|
+
width: percentage(($columns / $grid-columns));
|
50
|
+
}
|
51
|
+
}
|
52
|
+
@mixin make-sm-column-offset($columns) {
|
53
|
+
@media (min-width: $screen-sm-min) {
|
54
|
+
margin-left: percentage(($columns / $grid-columns));
|
55
|
+
}
|
56
|
+
}
|
57
|
+
@mixin make-sm-column-push($columns) {
|
58
|
+
@media (min-width: $screen-sm-min) {
|
59
|
+
left: percentage(($columns / $grid-columns));
|
60
|
+
}
|
61
|
+
}
|
62
|
+
@mixin make-sm-column-pull($columns) {
|
63
|
+
@media (min-width: $screen-sm-min) {
|
64
|
+
right: percentage(($columns / $grid-columns));
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// Generate the medium columns
|
69
|
+
@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
|
70
|
+
position: relative;
|
71
|
+
min-height: 1px;
|
72
|
+
padding-left: ($gutter / 2);
|
73
|
+
padding-right: ($gutter / 2);
|
74
|
+
|
75
|
+
@media (min-width: $screen-md-min) {
|
76
|
+
float: left;
|
77
|
+
width: percentage(($columns / $grid-columns));
|
78
|
+
}
|
79
|
+
}
|
80
|
+
@mixin make-md-column-offset($columns) {
|
81
|
+
@media (min-width: $screen-md-min) {
|
82
|
+
margin-left: percentage(($columns / $grid-columns));
|
83
|
+
}
|
84
|
+
}
|
85
|
+
@mixin make-md-column-push($columns) {
|
86
|
+
@media (min-width: $screen-md-min) {
|
87
|
+
left: percentage(($columns / $grid-columns));
|
88
|
+
}
|
89
|
+
}
|
90
|
+
@mixin make-md-column-pull($columns) {
|
91
|
+
@media (min-width: $screen-md-min) {
|
92
|
+
right: percentage(($columns / $grid-columns));
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
// Generate the large columns
|
97
|
+
@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
|
98
|
+
position: relative;
|
99
|
+
min-height: 1px;
|
100
|
+
padding-left: ($gutter / 2);
|
101
|
+
padding-right: ($gutter / 2);
|
102
|
+
|
103
|
+
@media (min-width: $screen-lg-min) {
|
104
|
+
float: left;
|
105
|
+
width: percentage(($columns / $grid-columns));
|
106
|
+
}
|
107
|
+
}
|
108
|
+
@mixin make-lg-column-offset($columns) {
|
109
|
+
@media (min-width: $screen-lg-min) {
|
110
|
+
margin-left: percentage(($columns / $grid-columns));
|
111
|
+
}
|
112
|
+
}
|
113
|
+
@mixin make-lg-column-push($columns) {
|
114
|
+
@media (min-width: $screen-lg-min) {
|
115
|
+
left: percentage(($columns / $grid-columns));
|
116
|
+
}
|
117
|
+
}
|
118
|
+
@mixin make-lg-column-pull($columns) {
|
119
|
+
@media (min-width: $screen-lg-min) {
|
120
|
+
right: percentage(($columns / $grid-columns));
|
121
|
+
}
|
122
|
+
}
|