publish_my_data 0.0.32 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. data/app/assets/images/publish_my_data/small-spinner.gif +0 -0
  2. data/app/assets/images/publish_my_data/sort-asc.gif +0 -0
  3. data/app/assets/images/publish_my_data/sort-desc.gif +0 -0
  4. data/app/assets/javascripts/bootstrap/affix.js +126 -0
  5. data/app/assets/javascripts/bootstrap/alert.js +98 -0
  6. data/app/assets/javascripts/bootstrap/button.js +109 -0
  7. data/app/assets/javascripts/bootstrap/carousel.js +217 -0
  8. data/app/assets/javascripts/bootstrap/collapse.js +179 -0
  9. data/app/assets/javascripts/bootstrap/dropdown.js +154 -0
  10. data/app/assets/javascripts/bootstrap/modal.js +246 -0
  11. data/app/assets/javascripts/bootstrap/popover.js +117 -0
  12. data/app/assets/javascripts/bootstrap/scrollspy.js +158 -0
  13. data/app/assets/javascripts/bootstrap/tab.js +135 -0
  14. data/app/assets/javascripts/bootstrap/tooltip.js +386 -0
  15. data/app/assets/javascripts/bootstrap/transition.js +56 -0
  16. data/app/assets/javascripts/publish_my_data/grid/10_data-loader.js +142 -0
  17. data/app/assets/javascripts/publish_my_data/grid/20_cube-grid.js +512 -0
  18. data/app/assets/javascripts/publish_my_data/grid/30_cube-dimension.js +77 -0
  19. data/app/assets/javascripts/publish_my_data/grid/40_cube-dimension-dropdown.js +87 -0
  20. data/app/assets/javascripts/publish_my_data/grid/45_cube-dimension-label.js +58 -0
  21. data/app/assets/javascripts/publish_my_data/grid/50_cube-dimensions-controls.js +336 -0
  22. data/app/assets/javascripts/publish_my_data/grid/60_dataset_cube_grid.js +187 -0
  23. data/app/assets/javascripts/publish_my_data/grid/70_sparql_results_grid.js +135 -0
  24. data/app/assets/javascripts/publish_my_data/select_text.js +27 -0
  25. data/app/assets/javascripts/publish_my_data.js +3 -0
  26. data/app/assets/javascripts/slick_grid/10_event-drag.js +402 -0
  27. data/app/assets/javascripts/slick_grid/20_slick-core.js +458 -0
  28. data/app/assets/javascripts/slick_grid/30_slick-grid.js +3295 -0
  29. data/app/assets/stylesheets/bootstrap/_alerts.scss +67 -0
  30. data/app/assets/stylesheets/bootstrap/_badges.scss +51 -0
  31. data/app/assets/stylesheets/bootstrap/_breadcrumbs.scss +23 -0
  32. data/app/assets/stylesheets/bootstrap/_button-groups.scss +248 -0
  33. data/app/assets/stylesheets/bootstrap/_buttons.scss +160 -0
  34. data/app/assets/stylesheets/bootstrap/_carousel.scss +209 -0
  35. data/app/assets/stylesheets/bootstrap/_close.scss +33 -0
  36. data/app/assets/stylesheets/bootstrap/_code.scss +56 -0
  37. data/app/assets/stylesheets/bootstrap/_component-animations.scss +29 -0
  38. data/app/assets/stylesheets/bootstrap/_dropdowns.scss +194 -0
  39. data/app/assets/stylesheets/bootstrap/_forms.scss +350 -0
  40. data/app/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
  41. data/app/assets/stylesheets/bootstrap/_grid.scss +346 -0
  42. data/app/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
  43. data/app/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
  44. data/app/assets/stylesheets/bootstrap/_labels.scss +58 -0
  45. data/app/assets/stylesheets/bootstrap/_list-group.scss +88 -0
  46. data/app/assets/stylesheets/bootstrap/_media.scss +56 -0
  47. data/app/assets/stylesheets/bootstrap/_mixins.scss +728 -0
  48. data/app/assets/stylesheets/bootstrap/_modals.scss +145 -0
  49. data/app/assets/stylesheets/bootstrap/_navbar.scss +625 -0
  50. data/app/assets/stylesheets/bootstrap/_navs.scss +229 -0
  51. data/app/assets/stylesheets/bootstrap/_normalize.scss +396 -0
  52. data/app/assets/stylesheets/bootstrap/_pager.scss +55 -0
  53. data/app/assets/stylesheets/bootstrap/_pagination.scss +83 -0
  54. data/app/assets/stylesheets/bootstrap/_panels.scss +148 -0
  55. data/app/assets/stylesheets/bootstrap/_popovers.scss +133 -0
  56. data/app/assets/stylesheets/bootstrap/_print.scss +100 -0
  57. data/app/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
  58. data/app/assets/stylesheets/bootstrap/_responsive-utilities.scss +209 -0
  59. data/app/assets/stylesheets/bootstrap/_scaffolding.scss +130 -0
  60. data/app/assets/stylesheets/bootstrap/_tables.scss +236 -0
  61. data/app/assets/stylesheets/bootstrap/_theme.scss +232 -0
  62. data/app/assets/stylesheets/bootstrap/_thumbnails.scss +31 -0
  63. data/app/assets/stylesheets/bootstrap/_tooltip.scss +95 -0
  64. data/app/assets/stylesheets/bootstrap/_type.scss +238 -0
  65. data/app/assets/stylesheets/bootstrap/_utilities.scss +42 -0
  66. data/app/assets/stylesheets/bootstrap/_variables.scss +620 -0
  67. data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
  68. data/app/assets/stylesheets/bootstrap/bootstrap.scss +59 -0
  69. data/app/assets/stylesheets/publish_my_data/core.scss +244 -0
  70. data/app/assets/stylesheets/publish_my_data/data_grid.scss +103 -0
  71. data/app/assets/stylesheets/publish_my_data/variables.scss +1 -0
  72. data/app/assets/stylesheets/{publish_my_data.css → publish_my_data.scss} +13 -2
  73. data/app/assets/stylesheets/slick_grid/slick_grid.scss +155 -0
  74. data/app/assets/stylesheets/slick_grid/slick_grid_default_theme.scss +97 -0
  75. data/app/controllers/concerns/publish_my_data/data_cube.rb +42 -0
  76. data/app/controllers/publish_my_data/data_cube/dimensions_controller.rb +58 -0
  77. data/app/controllers/publish_my_data/data_cube/observations_controller.rb +54 -0
  78. data/app/controllers/publish_my_data/datasets_controller.rb +0 -11
  79. data/app/controllers/publish_my_data/example_resources_controller.rb +11 -0
  80. data/app/controllers/publish_my_data/home_controller.rb +4 -0
  81. data/app/controllers/publish_my_data/information_resources_controller.rb +0 -13
  82. data/app/helpers/publish_my_data/application_helper.rb +66 -0
  83. data/app/helpers/publish_my_data/crumb_helper.rb +61 -0
  84. data/app/helpers/publish_my_data/datasets_helper.rb +31 -0
  85. data/app/helpers/publish_my_data/resources_helper.rb +24 -0
  86. data/app/models/concerns/publish_my_data/cube_results.rb +51 -0
  87. data/app/models/concerns/publish_my_data/dataset_powers.rb +13 -0
  88. data/app/models/publish_my_data/data_cube/cube.rb +358 -0
  89. data/app/models/publish_my_data/data_cube/dimension.rb +58 -0
  90. data/app/models/publish_my_data/vocabulary.rb +0 -4
  91. data/app/views/layouts/publish_my_data/application.html.haml +18 -0
  92. data/app/views/layouts/publish_my_data/error.html.haml +21 -0
  93. data/app/views/publish_my_data/classes/show.html.haml +28 -0
  94. data/app/views/publish_my_data/concept_schemes/show.html.haml +79 -0
  95. data/app/views/publish_my_data/concepts/show.html.haml +28 -0
  96. data/app/views/publish_my_data/data_cube/_controls.html.haml +19 -0
  97. data/app/views/publish_my_data/data_cube/_grid.html.haml +37 -0
  98. data/app/views/publish_my_data/datasets/_example_resources.html.haml +47 -0
  99. data/app/views/publish_my_data/datasets/_types_table.html.erb +33 -0
  100. data/app/views/publish_my_data/datasets/index.html.haml +32 -0
  101. data/app/views/publish_my_data/datasets/show.html.haml +186 -0
  102. data/app/views/publish_my_data/errors/not_found.html.haml +18 -0
  103. data/app/views/publish_my_data/errors/response_too_large.html.haml +16 -0
  104. data/app/views/publish_my_data/errors/timeout.html.haml +16 -0
  105. data/app/views/publish_my_data/errors/uncaught.html.haml +16 -0
  106. data/app/views/publish_my_data/example_resources/index.js.erb +1 -0
  107. data/app/views/publish_my_data/home/accessibility.html.haml +1 -0
  108. data/app/views/publish_my_data/home/docs.html.haml +1 -0
  109. data/app/views/publish_my_data/home/home.html.haml +5 -0
  110. data/app/views/publish_my_data/home/privacy.html.haml +1 -0
  111. data/app/views/publish_my_data/ontologies/show.html.haml +100 -0
  112. data/app/views/publish_my_data/properties/show.html.haml +28 -0
  113. data/app/views/publish_my_data/resources/_resource_data.html.haml +16 -0
  114. data/app/views/publish_my_data/resources/_sparql_section.html.haml +22 -0
  115. data/app/views/publish_my_data/resources/index.html.haml +37 -0
  116. data/app/views/publish_my_data/resources/show.html.haml +36 -0
  117. data/app/views/publish_my_data/shared/_browser_warning.html.haml +4 -0
  118. data/app/views/publish_my_data/shared/_deprecation_notice.html.haml +8 -0
  119. data/app/views/publish_my_data/shared/_footer.html.haml +11 -0
  120. data/app/views/publish_my_data/shared/_google_analytics.html.haml +11 -0
  121. data/app/views/publish_my_data/shared/_logo.html.haml +1 -0
  122. data/app/views/publish_my_data/shared/_meta_title.html.haml +2 -0
  123. data/app/views/publish_my_data/sparql/_form.html.haml +28 -0
  124. data/app/views/publish_my_data/sparql/_formats_dropdown.html.haml +11 -0
  125. data/app/views/publish_my_data/sparql/endpoint.html.haml +125 -0
  126. data/app/views/publish_my_data/sparql/formats_dropdowns/_ask.html.haml +7 -0
  127. data/app/views/publish_my_data/sparql/formats_dropdowns/_construct.html.haml +7 -0
  128. data/app/views/publish_my_data/sparql/formats_dropdowns/_describe.html.haml +1 -0
  129. data/app/views/publish_my_data/sparql/formats_dropdowns/_select.html.haml +9 -0
  130. data/app/views/publish_my_data/themes/index.html.haml +30 -0
  131. data/app/views/publish_my_data/themes/show.html.haml +43 -0
  132. data/config/routes.rb +20 -5
  133. data/lib/publish_my_data/version.rb +1 -1
  134. data/lib/publish_my_data.rb +7 -12
  135. data/spec/controllers/publish_my_data/datasets_controller_spec.rb +0 -75
  136. data/spec/controllers/publish_my_data/information_resources_controller_spec.rb +2 -11
  137. data/spec/dummy/config/environments/development.rb +0 -4
  138. data/spec/dummy/config/environments/test.rb +0 -4
  139. data/spec/dummy/log/test.log +62962 -0
  140. data/spec/dummy/tmp/cache/sass/e509ccd4d793d2c162d70125e9f3656b6c28f357/(__TEMPLATE__)c +0 -0
  141. data/spec/features/running_a_sparql_query_spec.rb +1 -1
  142. data/spec/features/uri_dereferencing_spec.rb +1 -1
  143. metadata +200 -58
  144. data/app/controllers/concerns/publish_my_data/data_download.rb +0 -22
  145. data/app/controllers/publish_my_data/vocabularies_controller.rb +0 -18
  146. data/app/views/layouts/publish_my_data/application.html.erb +0 -13
  147. data/app/views/layouts/publish_my_data/error.html.erb +0 -13
  148. data/app/views/publish_my_data/classes/show.html.erb +0 -3
  149. data/app/views/publish_my_data/concept_schemes/_concepts.html.erb +0 -18
  150. data/app/views/publish_my_data/concept_schemes/show.html.erb +0 -11
  151. data/app/views/publish_my_data/concepts/show.html.erb +0 -3
  152. data/app/views/publish_my_data/datasets/index.html.erb +0 -20
  153. data/app/views/publish_my_data/datasets/show.html.erb +0 -18
  154. data/app/views/publish_my_data/errors/not_found.html.erb +0 -1
  155. data/app/views/publish_my_data/errors/response_too_large.html.erb +0 -1
  156. data/app/views/publish_my_data/errors/timeout.html.erb +0 -1
  157. data/app/views/publish_my_data/errors/uncaught.html.erb +0 -6
  158. data/app/views/publish_my_data/ontologies/show.html.erb +0 -17
  159. data/app/views/publish_my_data/properties/show.html.erb +0 -3
  160. data/app/views/publish_my_data/resources/_predicates_table.html.erb +0 -30
  161. data/app/views/publish_my_data/resources/_predicates_table_head.html.erb +0 -6
  162. data/app/views/publish_my_data/resources/_resource_formats.html.erb +0 -4
  163. data/app/views/publish_my_data/resources/_summaries.html.erb +0 -18
  164. data/app/views/publish_my_data/resources/_uri_and_label.html.erb +0 -3
  165. data/app/views/publish_my_data/resources/index.html.erb +0 -40
  166. data/app/views/publish_my_data/resources/show.html.erb +0 -3
  167. data/app/views/publish_my_data/sparql/_ask_formats.html.erb +0 -3
  168. data/app/views/publish_my_data/sparql/_construct_formats.html.erb +0 -3
  169. data/app/views/publish_my_data/sparql/_describe_formats.html.erb +0 -1
  170. data/app/views/publish_my_data/sparql/_error_message.html.erb +0 -3
  171. data/app/views/publish_my_data/sparql/_form.html.erb +0 -4
  172. data/app/views/publish_my_data/sparql/_formats.html.erb +0 -6
  173. data/app/views/publish_my_data/sparql/_pagination.html.erb +0 -6
  174. data/app/views/publish_my_data/sparql/_results.html.erb +0 -5
  175. data/app/views/publish_my_data/sparql/_results_data.html.erb +0 -4
  176. data/app/views/publish_my_data/sparql/_select_formats.html.erb +0 -3
  177. data/app/views/publish_my_data/sparql/endpoint.html.erb +0 -10
  178. data/app/views/publish_my_data/themes/index.html.erb +0 -13
  179. data/app/views/publish_my_data/themes/show.html.erb +0 -15
  180. data/config/initializers/20_s3_setup.rb +0 -4
  181. data/spec/controllers/publish_my_data/vocabularies_controller_spec.rb +0 -14
  182. data/spec/support/data_download.rb +0 -60
@@ -0,0 +1,209 @@
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
4
+
5
+
6
+ // IE10 Metro responsive
7
+ // Required for Windows 8 Metro split-screen snapping with IE10
8
+ //
9
+ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
10
+ @-ms-viewport{
11
+ width: device-width;
12
+ }
13
+
14
+ // IE10 on Windows Phone 8
15
+ // IE10 on WP8 doesn't report CSS pixels, but actual device pixels. In
16
+ // other words, say on a Lumia, you'll get 768px as the device width,
17
+ // meaning users will see the tablet styles and not phone styles.
18
+ //
19
+ // Alternatively you can override this with JS (see source below), but
20
+ // we won't be doing that here given our limited scope.
21
+ //
22
+ // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
23
+ @media screen and (max-width: 400px) {
24
+ @-ms-viewport{
25
+ width: 320px;
26
+ }
27
+ }
28
+
29
+ // Hide from screenreaders and browsers
30
+ // Credit: HTML5 Boilerplate
31
+ .hidden {
32
+ display: none !important;
33
+ visibility: hidden !important;
34
+ }
35
+
36
+ // Visibility utilities
37
+
38
+ @include responsive-invisibility('.visible-xs');
39
+ @media (max-width: $screen-xs-max) {
40
+ @include responsive-visibility('.visible-xs');
41
+ }
42
+
43
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
44
+ @include responsive-visibility('.visible-xs.visible-sm');
45
+ }
46
+
47
+
48
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
49
+ @include responsive-visibility('.visible-xs.visible-md');
50
+ }
51
+
52
+
53
+ @media (min-width: $screen-lg) {
54
+ @include responsive-visibility('.visible-xs.visible-lg');
55
+ }
56
+
57
+
58
+ @include responsive-invisibility('.visible-sm');
59
+
60
+ @media (max-width: $screen-xs-max) {
61
+ @include responsive-visibility('.visible-sm.visible-xs');
62
+ }
63
+
64
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
65
+ @include responsive-visibility('.visible-sm');
66
+ }
67
+
68
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
69
+ @include responsive-visibility('.visible-sm.visible-md');
70
+ }
71
+
72
+
73
+ @media (min-width: $screen-lg) {
74
+ @include responsive-visibility('.visible-sm.visible-lg');
75
+ }
76
+
77
+
78
+ @include responsive-invisibility('.visible-md');
79
+
80
+ @media (max-width: $screen-xs-max) {
81
+ @include responsive-visibility('.visible-md.visible-xs');
82
+ }
83
+
84
+
85
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
86
+ @include responsive-visibility('.visible-md.visible-sm');
87
+ }
88
+
89
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
90
+ @include responsive-visibility('.visible-md');
91
+ }
92
+
93
+ @media (min-width: $screen-lg) {
94
+ @include responsive-visibility('.visible-md.visible-lg');
95
+ }
96
+
97
+
98
+ @include responsive-invisibility('.visible-lg');
99
+
100
+ @media (max-width: $screen-xs-max) {
101
+ @include responsive-visibility('.visible-lg.visible-xs');
102
+ }
103
+
104
+
105
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
106
+ @include responsive-visibility('.visible-lg.visible-sm');
107
+ }
108
+
109
+
110
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
111
+ @include responsive-visibility('.visible-lg.visible-md');
112
+ }
113
+
114
+ @media (min-width: $screen-lg) {
115
+ @include responsive-visibility('.visible-lg');
116
+ }
117
+
118
+ @include responsive-visibility('.hidden-xs');
119
+ @media (max-width: $screen-xs-max) {
120
+ @include responsive-invisibility('.hidden-xs');
121
+ }
122
+
123
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
124
+ @include responsive-invisibility('.hidden-xs.hidden-sm');
125
+ }
126
+
127
+
128
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
129
+ @include responsive-invisibility('.hidden-xs.hidden-md');
130
+ }
131
+
132
+
133
+ @media (min-width: $screen-lg) {
134
+ @include responsive-invisibility('.hidden-xs.hidden-lg');
135
+ }
136
+
137
+
138
+ @include responsive-visibility('.hidden-sm');
139
+
140
+ @media (max-width: $screen-xs-max) {
141
+ @include responsive-invisibility('.hidden-sm.hidden-xs');
142
+ }
143
+
144
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
145
+ @include responsive-invisibility('.hidden-sm');
146
+ }
147
+
148
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
149
+ @include responsive-invisibility('.hidden-sm.hidden-md');
150
+ }
151
+
152
+
153
+ @media (min-width: $screen-lg) {
154
+ @include responsive-invisibility('.hidden-sm.hidden-lg');
155
+ }
156
+
157
+
158
+ @include responsive-visibility('.hidden-md');
159
+
160
+ @media (max-width: $screen-xs-max) {
161
+ @include responsive-invisibility('.hidden-md.hidden-xs');
162
+ }
163
+
164
+
165
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
166
+ @include responsive-invisibility('.hidden-md.hidden-sm');
167
+ }
168
+
169
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
170
+ @include responsive-invisibility('.hidden-md');
171
+ }
172
+
173
+ @media (min-width: $screen-lg) {
174
+ @include responsive-invisibility('.hidden-md.hidden-lg');
175
+ }
176
+
177
+
178
+ @include responsive-visibility('.hidden-lg');
179
+
180
+ @media (max-width: $screen-xs-max) {
181
+ @include responsive-invisibility('.hidden-lg.hidden-xs');
182
+ }
183
+
184
+
185
+ @media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
186
+ @include responsive-invisibility('.hidden-lg.hidden-sm');
187
+ }
188
+
189
+
190
+ @media (min-width: $screen-md) and (max-width: $screen-md-max) {
191
+ @include responsive-invisibility('.hidden-lg.hidden-md');
192
+ }
193
+
194
+ @media (min-width: $screen-lg) {
195
+ @include responsive-invisibility('.hidden-lg');
196
+ }
197
+
198
+ // Print utilities
199
+
200
+ @include responsive-invisibility('.visible-print');
201
+
202
+ @media print {
203
+
204
+ @include responsive-visibility('.visible-print');
205
+
206
+
207
+ @include responsive-invisibility('.hidden-print');
208
+
209
+ }
@@ -0,0 +1,130 @@
1
+ //
2
+ // Scaffolding
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Reset the box-sizing
7
+
8
+ *,
9
+ *:before,
10
+ *:after {
11
+ @include box-sizing(border-box);
12
+ }
13
+
14
+
15
+ // Body reset
16
+
17
+ html {
18
+ font-size: 62.5%;
19
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
20
+ }
21
+
22
+ body {
23
+ font-family: $font-family-base;
24
+ font-size: $font-size-base;
25
+ line-height: $line-height-base;
26
+ color: $text-color;
27
+ background-color: $body-bg;
28
+ }
29
+
30
+ // Reset fonts for relevant elements
31
+ input,
32
+ button,
33
+ select,
34
+ textarea {
35
+ font-family: inherit;
36
+ font-size: inherit;
37
+ line-height: inherit;
38
+ }
39
+
40
+ // Reset unusual Firefox-on-Android default style.
41
+ //
42
+ // See https://github.com/necolas/normalize.css/issues/214
43
+
44
+ button,
45
+ input,
46
+ select[multiple],
47
+ textarea {
48
+ background-image: none;
49
+ }
50
+
51
+
52
+ // Links
53
+
54
+ a {
55
+ color: $link-color;
56
+ text-decoration: none;
57
+
58
+ &:hover,
59
+ &:focus {
60
+ color: $link-hover-color;
61
+ text-decoration: underline;
62
+ }
63
+
64
+ &:focus {
65
+ @include tab-focus();
66
+ }
67
+ }
68
+
69
+
70
+ // Images
71
+
72
+ img {
73
+ vertical-align: middle;
74
+ }
75
+
76
+ // Responsive images (ensure images don't scale beyond their parents)
77
+ .img-responsive {
78
+ @include img-responsive();
79
+ }
80
+
81
+ // Rounded corners
82
+ .img-rounded {
83
+ border-radius: $border-radius-large;
84
+ }
85
+
86
+ // Image thumbnails
87
+ //
88
+ // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
89
+ .img-thumbnail {
90
+ padding: $thumbnail-padding;
91
+ line-height: $line-height-base;
92
+ background-color: $thumbnail-bg;
93
+ border: 1px solid $thumbnail-border;
94
+ border-radius: $thumbnail-border-radius;
95
+ @include transition(all .2s ease-in-out);
96
+
97
+ // Keep them at most 100% wide
98
+ @include img-responsive(inline-block);
99
+ }
100
+
101
+ // Perfect circle
102
+ .img-circle {
103
+ border-radius: 50%; // set radius in percents
104
+ }
105
+
106
+
107
+ // Horizontal rules
108
+
109
+ hr {
110
+ margin-top: $line-height-computed;
111
+ margin-bottom: $line-height-computed;
112
+ border: 0;
113
+ border-top: 1px solid $hr-border;
114
+ }
115
+
116
+
117
+ // Only display content to screen readers
118
+ //
119
+ // See: http://a11yproject.com/posts/how-to-hide-content/
120
+
121
+ .sr-only {
122
+ position: absolute;
123
+ width: 1px;
124
+ height: 1px;
125
+ margin: -1px;
126
+ padding: 0;
127
+ overflow: hidden;
128
+ clip: rect(0 0 0 0);
129
+ border: 0;
130
+ }
@@ -0,0 +1,236 @@
1
+ //
2
+ // Tables
3
+ // --------------------------------------------------
4
+
5
+
6
+ table {
7
+ max-width: 100%;
8
+ background-color: $table-bg;
9
+ }
10
+ th {
11
+ text-align: left;
12
+ }
13
+
14
+
15
+ // Baseline styles
16
+
17
+ .table {
18
+ width: 100%;
19
+ margin-bottom: $line-height-computed;
20
+ // Cells
21
+ thead,
22
+ tbody,
23
+ tfoot {
24
+ > tr {
25
+ > th,
26
+ > td {
27
+ padding: $table-cell-padding;
28
+ line-height: $line-height-base;
29
+ vertical-align: top;
30
+ border-top: 1px solid $table-border-color;
31
+ }
32
+ }
33
+ }
34
+ // Bottom align for column headings
35
+ thead > tr > th {
36
+ vertical-align: bottom;
37
+ border-bottom: 2px solid $table-border-color;
38
+ }
39
+ // Remove top border from thead by default
40
+ caption + thead,
41
+ colgroup + thead,
42
+ thead:first-child {
43
+ tr:first-child {
44
+ th, td {
45
+ border-top: 0;
46
+ }
47
+ }
48
+ }
49
+ // Account for multiple tbody instances
50
+ tbody + tbody {
51
+ border-top: 2px solid $table-border-color;
52
+ }
53
+
54
+ // Nesting
55
+ .table {
56
+ background-color: $body-bg;
57
+ }
58
+ }
59
+
60
+
61
+ // Condensed table w/ half padding
62
+
63
+ .table-condensed {
64
+ thead,
65
+ tbody,
66
+ tfoot {
67
+ > tr {
68
+ > th,
69
+ > td {
70
+ padding: $table-condensed-cell-padding;
71
+ }
72
+ }
73
+ }
74
+ }
75
+
76
+
77
+ // Bordered version
78
+ //
79
+ // Add borders all around the table and between all the columns.
80
+
81
+ .table-bordered {
82
+ border: 1px solid $table-border-color;
83
+ > thead,
84
+ > tbody,
85
+ > tfoot {
86
+ > tr {
87
+ > th,
88
+ > td {
89
+ border: 1px solid $table-border-color;
90
+ }
91
+ }
92
+ }
93
+ > thead {
94
+ > tr {
95
+ > th,
96
+ > td {
97
+ border-bottom-width: 2px;
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+
104
+ // Zebra-striping
105
+ //
106
+ // Default zebra-stripe styles (alternating gray and transparent backgrounds)
107
+
108
+ .table-striped {
109
+ > tbody {
110
+ > tr:nth-child(odd) {
111
+ > td,
112
+ > th {
113
+ background-color: $table-bg-accent;
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+
120
+ // Hover effect
121
+ //
122
+ // Placed here since it has to come after the potential zebra striping
123
+
124
+ .table-hover {
125
+ > tbody {
126
+ > tr:hover {
127
+ > td,
128
+ > th {
129
+ background-color: $table-bg-hover;
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
+
136
+ // Table cell sizing
137
+ //
138
+ // Reset default table behavior
139
+
140
+ table col[class*="col-"] {
141
+ float: none;
142
+ display: table-column;
143
+ }
144
+ table {
145
+ td,
146
+ th {
147
+ &[class*="col-"] {
148
+ float: none;
149
+ display: table-cell;
150
+ }
151
+ }
152
+ }
153
+
154
+
155
+ // Table backgrounds
156
+ //
157
+ // Exact selectors below required to override `.table-striped` and prevent
158
+ // inheritance to nested tables.
159
+
160
+ .table > thead > tr,
161
+ .table > tbody > tr,
162
+ .table > tfoot > tr {
163
+ > td.active,
164
+ > th.active,
165
+ &.active > td,
166
+ &.active > th {
167
+ background-color: $table-bg-active;
168
+ }
169
+ }
170
+
171
+ // Generate the contextual variants
172
+ @include table-row-variant('success', $state-success-bg, $state-success-border);
173
+ @include table-row-variant('danger', $state-danger-bg, $state-danger-border);
174
+ @include table-row-variant('warning', $state-warning-bg, $state-warning-border);
175
+
176
+
177
+ // Responsive tables
178
+ //
179
+ // Wrap your tables in `.table-scrollable` and we'll make them mobile friendly
180
+ // by enabling horizontal scrolling. Only applies <768px. Everything above that
181
+ // will display normally.
182
+
183
+ @media (max-width: $screen-sm) {
184
+ .table-responsive {
185
+ width: 100%;
186
+ margin-bottom: 15px;
187
+ overflow-y: hidden;
188
+ overflow-x: scroll;
189
+ border: 1px solid $table-border-color;
190
+
191
+ // Tighten up spacing and give a background color
192
+ > .table {
193
+ margin-bottom: 0;
194
+ background-color: #fff;
195
+
196
+ // Ensure the content doesn't wrap
197
+ > thead,
198
+ > tbody,
199
+ > tfoot {
200
+ > tr {
201
+ > th,
202
+ > td {
203
+ white-space: nowrap;
204
+ }
205
+ }
206
+ }
207
+ }
208
+
209
+ // Special overrides for the bordered tables
210
+ > .table-bordered {
211
+ border: 0;
212
+
213
+ // Nuke the appropriate borders so that the parent can handle them
214
+ > thead,
215
+ > tbody,
216
+ > tfoot {
217
+ > tr {
218
+ > th:first-child,
219
+ > td:first-child {
220
+ border-left: 0;
221
+ }
222
+ > th:last-child,
223
+ > td:last-child {
224
+ border-right: 0;
225
+ }
226
+ }
227
+ > tr:last-child {
228
+ > th,
229
+ > td {
230
+ border-bottom: 0;
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }