adhoq 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +80 -0
  4. data/Rakefile +28 -0
  5. data/app/assets/javascripts/adhoq/application.js +19 -0
  6. data/app/assets/javascripts/adhoq/bootstrap-sprockets.js +12 -0
  7. data/app/assets/javascripts/adhoq/bootstrap.js +2107 -0
  8. data/app/assets/javascripts/adhoq/bootstrap/affix.js +142 -0
  9. data/app/assets/javascripts/adhoq/bootstrap/alert.js +92 -0
  10. data/app/assets/javascripts/adhoq/bootstrap/button.js +110 -0
  11. data/app/assets/javascripts/adhoq/bootstrap/carousel.js +223 -0
  12. data/app/assets/javascripts/adhoq/bootstrap/collapse.js +170 -0
  13. data/app/assets/javascripts/adhoq/bootstrap/dropdown.js +151 -0
  14. data/app/assets/javascripts/adhoq/bootstrap/modal.js +280 -0
  15. data/app/assets/javascripts/adhoq/bootstrap/popover.js +113 -0
  16. data/app/assets/javascripts/adhoq/bootstrap/scrollspy.js +170 -0
  17. data/app/assets/javascripts/adhoq/bootstrap/tab.js +128 -0
  18. data/app/assets/javascripts/adhoq/bootstrap/tooltip.js +457 -0
  19. data/app/assets/javascripts/adhoq/bootstrap/transition.js +59 -0
  20. data/app/assets/javascripts/adhoq/previewer.js.coffee +25 -0
  21. data/app/assets/stylesheets/adhoq/_bootstrap-compass.scss +7 -0
  22. data/app/assets/stylesheets/adhoq/_bootstrap-mincer.scss +17 -0
  23. data/app/assets/stylesheets/adhoq/_bootstrap-sprockets.scss +7 -0
  24. data/app/assets/stylesheets/adhoq/adhoq.css.sass +57 -0
  25. data/app/assets/stylesheets/adhoq/application.css +16 -0
  26. data/app/assets/stylesheets/adhoq/bootstrap.scss +50 -0
  27. data/app/assets/stylesheets/adhoq/bootstrap/_alerts.scss +68 -0
  28. data/app/assets/stylesheets/adhoq/bootstrap/_badges.scss +57 -0
  29. data/app/assets/stylesheets/adhoq/bootstrap/_breadcrumbs.scss +26 -0
  30. data/app/assets/stylesheets/adhoq/bootstrap/_button-groups.scss +240 -0
  31. data/app/assets/stylesheets/adhoq/bootstrap/_buttons.scss +157 -0
  32. data/app/assets/stylesheets/adhoq/bootstrap/_carousel.scss +243 -0
  33. data/app/assets/stylesheets/adhoq/bootstrap/_close.scss +35 -0
  34. data/app/assets/stylesheets/adhoq/bootstrap/_code.scss +68 -0
  35. data/app/assets/stylesheets/adhoq/bootstrap/_component-animations.scss +35 -0
  36. data/app/assets/stylesheets/adhoq/bootstrap/_dropdowns.scss +215 -0
  37. data/app/assets/stylesheets/adhoq/bootstrap/_forms.scss +538 -0
  38. data/app/assets/stylesheets/adhoq/bootstrap/_glyphicons.scss +237 -0
  39. data/app/assets/stylesheets/adhoq/bootstrap/_grid.scss +84 -0
  40. data/app/assets/stylesheets/adhoq/bootstrap/_input-groups.scss +166 -0
  41. data/app/assets/stylesheets/adhoq/bootstrap/_jumbotron.scss +48 -0
  42. data/app/assets/stylesheets/adhoq/bootstrap/_labels.scss +66 -0
  43. data/app/assets/stylesheets/adhoq/bootstrap/_list-group.scss +131 -0
  44. data/app/assets/stylesheets/adhoq/bootstrap/_media.scss +56 -0
  45. data/app/assets/stylesheets/adhoq/bootstrap/_mixins.scss +39 -0
  46. data/app/assets/stylesheets/adhoq/bootstrap/_modals.scss +150 -0
  47. data/app/assets/stylesheets/adhoq/bootstrap/_navbar.scss +659 -0
  48. data/app/assets/stylesheets/adhoq/bootstrap/_navs.scss +242 -0
  49. data/app/assets/stylesheets/adhoq/bootstrap/_normalize.scss +425 -0
  50. data/app/assets/stylesheets/adhoq/bootstrap/_pager.scss +55 -0
  51. data/app/assets/stylesheets/adhoq/bootstrap/_pagination.scss +88 -0
  52. data/app/assets/stylesheets/adhoq/bootstrap/_panels.scss +243 -0
  53. data/app/assets/stylesheets/adhoq/bootstrap/_popovers.scss +133 -0
  54. data/app/assets/stylesheets/adhoq/bootstrap/_print.scss +101 -0
  55. data/app/assets/stylesheets/adhoq/bootstrap/_progress-bars.scss +105 -0
  56. data/app/assets/stylesheets/adhoq/bootstrap/_responsive-embed.scss +34 -0
  57. data/app/assets/stylesheets/adhoq/bootstrap/_responsive-utilities.scss +174 -0
  58. data/app/assets/stylesheets/adhoq/bootstrap/_scaffolding.scss +150 -0
  59. data/app/assets/stylesheets/adhoq/bootstrap/_tables.scss +233 -0
  60. data/app/assets/stylesheets/adhoq/bootstrap/_theme.scss +258 -0
  61. data/app/assets/stylesheets/adhoq/bootstrap/_thumbnails.scss +38 -0
  62. data/app/assets/stylesheets/adhoq/bootstrap/_tooltip.scss +95 -0
  63. data/app/assets/stylesheets/adhoq/bootstrap/_type.scss +304 -0
  64. data/app/assets/stylesheets/adhoq/bootstrap/_utilities.scss +57 -0
  65. data/app/assets/stylesheets/adhoq/bootstrap/_variables.scss +850 -0
  66. data/app/assets/stylesheets/adhoq/bootstrap/_wells.scss +29 -0
  67. data/app/assets/stylesheets/adhoq/bootstrap/bootstrap.scss +50 -0
  68. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_alerts.scss +14 -0
  69. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_background-variant.scss +11 -0
  70. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_border-radius.scss +18 -0
  71. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_buttons.scss +50 -0
  72. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_center-block.scss +7 -0
  73. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_clearfix.scss +22 -0
  74. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_forms.scss +84 -0
  75. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_gradients.scss +58 -0
  76. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid-framework.scss +81 -0
  77. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid.scss +122 -0
  78. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_hide-text.scss +21 -0
  79. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_image.scss +34 -0
  80. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_labels.scss +12 -0
  81. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_list-group.scss +31 -0
  82. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-divider.scss +10 -0
  83. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  84. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_opacity.scss +8 -0
  85. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_pagination.scss +23 -0
  86. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_panels.scss +24 -0
  87. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_progress-bar.scss +10 -0
  88. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_reset-filter.scss +8 -0
  89. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_resize.scss +6 -0
  90. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_responsive-visibility.scss +21 -0
  91. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_size.scss +10 -0
  92. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_tab-focus.scss +9 -0
  93. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_table-row.scss +28 -0
  94. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-emphasis.scss +11 -0
  95. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-overflow.scss +8 -0
  96. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_vendor-prefixes.scss +219 -0
  97. data/app/controllers/adhoq/application_controller.rb +5 -0
  98. data/app/controllers/adhoq/authorization_methods.rb +36 -0
  99. data/app/controllers/adhoq/executions_controller.rb +25 -0
  100. data/app/controllers/adhoq/previews_controller.rb +13 -0
  101. data/app/controllers/adhoq/queries_controller.rb +38 -0
  102. data/app/helpers/adhoq/application_helper.rb +11 -0
  103. data/app/models/adhoq/execution.rb +29 -0
  104. data/app/models/adhoq/query.rb +14 -0
  105. data/app/models/adhoq/report.rb +42 -0
  106. data/app/models/adhoq/time_based_orders.rb +9 -0
  107. data/app/views/adhoq/application/_global_nav.html.slim +11 -0
  108. data/app/views/adhoq/application/_sidebar_queries_index.html.slim +10 -0
  109. data/app/views/adhoq/previews/create.html.slim +12 -0
  110. data/app/views/adhoq/previews/statement_invalid.html.slim +5 -0
  111. data/app/views/adhoq/queries/_form.html.slim +38 -0
  112. data/app/views/adhoq/queries/_query.html.slim +43 -0
  113. data/app/views/adhoq/queries/edit.html.slim +2 -0
  114. data/app/views/adhoq/queries/index.html.slim +1 -0
  115. data/app/views/adhoq/queries/new.html.slim +2 -0
  116. data/app/views/adhoq/queries/show.html.slim +1 -0
  117. data/app/views/layouts/adhoq/application.html.slim +18 -0
  118. data/config/routes.rb +9 -0
  119. data/db/migrate/20141003095645_create_adhoq_queries.rb +11 -0
  120. data/db/migrate/20141006014750_create_adhoq_executions.rb +13 -0
  121. data/db/migrate/20141007052308_create_adhoq_reports.rb +12 -0
  122. data/lib/adhoq.rb +13 -0
  123. data/lib/adhoq/configuration.rb +21 -0
  124. data/lib/adhoq/engine.rb +15 -0
  125. data/lib/adhoq/error.rb +4 -0
  126. data/lib/adhoq/executor.rb +27 -0
  127. data/lib/adhoq/global_variable.rb +34 -0
  128. data/lib/adhoq/reporter.rb +5 -0
  129. data/lib/adhoq/reporter/xlsx.rb +32 -0
  130. data/lib/adhoq/result.rb +18 -0
  131. data/lib/adhoq/storage.rb +5 -0
  132. data/lib/adhoq/storage/local_file.rb +45 -0
  133. data/lib/adhoq/version.rb +3 -0
  134. data/lib/tasks/adhoq_tasks.rake +4 -0
  135. data/spec/adhoq/executor_spec.rb +11 -0
  136. data/spec/adhoq/storage_spec.rb +19 -0
  137. data/spec/factories/adhoq_queries.rb +29 -0
  138. data/spec/models/adhoq/execution_spec.rb +4 -0
  139. data/spec/models/adhoq/query_spec.rb +4 -0
  140. data/spec/models/adhoq/report_spec.rb +25 -0
  141. data/spec/spec_helper.rb +36 -0
  142. data/spec/support/have_values_in_xlsx_sheet_matcher.rb +20 -0
  143. 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,11 @@
1
+ // Contextual backgrounds
2
+
3
+ // [converter] $parent hack
4
+ @mixin bg-variant($parent, $color) {
5
+ #{$parent} {
6
+ background-color: $color;
7
+ }
8
+ a#{$parent}:hover {
9
+ background-color: darken($color, 10%);
10
+ }
11
+ }
@@ -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,7 @@
1
+ // Center-align a block level element
2
+
3
+ @mixin center-block() {
4
+ display: block;
5
+ margin-left: auto;
6
+ margin-right: auto;
7
+ }
@@ -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
+ }