publify_core 10.0.3 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +249 -53
  3. data/app/assets/javascripts/publify.js +0 -1
  4. data/app/assets/javascripts/publify_admin.js +10 -9
  5. data/app/assets/stylesheets/accounts.css.scss +0 -2
  6. data/app/assets/stylesheets/administration_structure.css.scss +0 -4
  7. data/app/assets/stylesheets/publify.css.scss +0 -1
  8. data/app/assets/stylesheets/publify_admin.css.scss +0 -2
  9. data/app/assets/stylesheets/sidebar_admin.css.scss +0 -6
  10. data/app/controllers/admin/articles_controller.rb +1 -1
  11. data/app/controllers/admin/base_controller.rb +2 -2
  12. data/app/controllers/admin/redirects_controller.rb +2 -2
  13. data/app/controllers/admin/resources_controller.rb +1 -1
  14. data/app/controllers/admin/seo_controller.rb +2 -2
  15. data/app/controllers/admin/settings_controller.rb +2 -2
  16. data/app/controllers/admin/tags_controller.rb +1 -1
  17. data/app/controllers/admin/users_controller.rb +2 -2
  18. data/app/controllers/articles_controller.rb +2 -5
  19. data/app/controllers/authors_controller.rb +0 -2
  20. data/app/controllers/comments_controller.rb +5 -2
  21. data/app/controllers/content_controller.rb +0 -4
  22. data/app/controllers/notes_controller.rb +1 -6
  23. data/app/controllers/setup_controller.rb +1 -1
  24. data/app/controllers/tags_controller.rb +0 -1
  25. data/app/controllers/users/registrations_controller.rb +1 -0
  26. data/app/helpers/admin/base_helper.rb +20 -13
  27. data/app/helpers/admin/feedback_helper.rb +4 -4
  28. data/app/helpers/base_helper.rb +10 -6
  29. data/app/helpers/xml_helper.rb +4 -0
  30. data/app/models/article.rb +7 -7
  31. data/app/models/blog.rb +3 -3
  32. data/app/models/comment.rb +1 -1
  33. data/app/models/config_manager.rb +1 -3
  34. data/app/models/content.rb +4 -5
  35. data/app/models/content_base.rb +4 -3
  36. data/app/models/feedback.rb +1 -1
  37. data/app/models/note.rb +74 -8
  38. data/app/models/page.rb +1 -1
  39. data/app/models/redirect.rb +0 -4
  40. data/app/models/resource.rb +1 -0
  41. data/app/models/sidebar.rb +6 -14
  42. data/app/models/tag.rb +2 -2
  43. data/app/models/text_filter.rb +2 -2
  44. data/app/models/trigger.rb +1 -1
  45. data/app/models/user.rb +12 -21
  46. data/app/uploaders/resource_uploader.rb +11 -4
  47. data/app/views/admin/articles/_form.html.erb +99 -105
  48. data/app/views/admin/articles/index.html.erb +15 -23
  49. data/app/views/admin/dashboard/_comment.html.erb +1 -1
  50. data/app/views/admin/dashboard/_comments.html.erb +4 -6
  51. data/app/views/admin/dashboard/_drafts.html.erb +4 -6
  52. data/app/views/admin/dashboard/_overview.html.erb +2 -5
  53. data/app/views/admin/dashboard/_welcome.html.erb +19 -19
  54. data/app/views/admin/dashboard/index.html.erb +3 -3
  55. data/app/views/admin/feedback/_button.html.erb +7 -13
  56. data/app/views/admin/feedback/article.html.erb +17 -17
  57. data/app/views/admin/feedback/edit.html.erb +17 -21
  58. data/app/views/admin/feedback/index.html.erb +8 -8
  59. data/app/views/admin/notes/_form.html.erb +5 -5
  60. data/app/views/admin/notes/_list.html.erb +1 -1
  61. data/app/views/admin/notes/_note.html.erb +1 -1
  62. data/app/views/admin/notes/edit.html.erb +1 -1
  63. data/app/views/admin/notes/index.html.erb +1 -1
  64. data/app/views/admin/pages/_form.html.erb +23 -27
  65. data/app/views/admin/post_types/_index_and_form.html.erb +5 -5
  66. data/app/views/admin/redirects/_index_and_form.html.erb +2 -2
  67. data/app/views/admin/resources/index.html.erb +20 -8
  68. data/app/views/admin/seo/_general.html.erb +36 -36
  69. data/app/views/admin/seo/_permalinks.html.erb +22 -14
  70. data/app/views/admin/seo/_titles.html.erb +63 -63
  71. data/app/views/admin/settings/display.html.erb +23 -23
  72. data/app/views/admin/settings/feedback.html.erb +29 -29
  73. data/app/views/admin/settings/index.html.erb +21 -21
  74. data/app/views/admin/settings/write.html.erb +18 -18
  75. data/app/views/admin/shared/_flash.html.erb +6 -0
  76. data/app/views/admin/shared/_menu.html.erb +56 -68
  77. data/app/views/admin/sidebar/_config.html.erb +15 -19
  78. data/app/views/admin/sidebar/_target.html.erb +3 -3
  79. data/app/views/admin/sidebar/_target_sidebar.html.erb +14 -13
  80. data/app/views/admin/sidebar/index.html.erb +2 -2
  81. data/app/views/admin/tags/_index_and_form.html.erb +3 -3
  82. data/app/views/admin/themes/index.html.erb +21 -19
  83. data/app/views/admin/users/_form.html.erb +79 -79
  84. data/app/views/articles/search.html.erb +1 -1
  85. data/app/views/layouts/accounts.html.erb +7 -9
  86. data/app/views/layouts/administration.html.erb +2 -2
  87. data/app/views/notes/show.html.erb +15 -0
  88. data/app/views/setup/index.html.erb +1 -1
  89. data/app/views/shared/_atom_item_article.atom.builder +1 -3
  90. data/app/views/shared/_rss_item_article.rss.builder +1 -2
  91. data/config/i18n-tasks.yml +0 -1
  92. data/config/locales/ar.yml +3 -2
  93. data/config/locales/da.yml +3 -2
  94. data/config/locales/de.yml +3 -2
  95. data/config/locales/en.yml +3 -2
  96. data/config/locales/es-MX.yml +3 -2
  97. data/config/locales/fr.yml +3 -2
  98. data/config/locales/he.yml +3 -2
  99. data/config/locales/it.yml +3 -2
  100. data/config/locales/ja.yml +3 -2
  101. data/config/locales/lt.yml +3 -2
  102. data/config/locales/nb.yml +3 -2
  103. data/config/locales/nl.yml +3 -2
  104. data/config/locales/pl.yml +3 -2
  105. data/config/locales/pt-BR.yml +3 -2
  106. data/config/locales/ro.yml +3 -2
  107. data/config/locales/ru.yml +3 -2
  108. data/config/locales/zh-CN.yml +3 -2
  109. data/config/locales/zh-TW.yml +3 -2
  110. data/config/routes.rb +0 -11
  111. data/db/migrate/114_fixes_buggy_articles_and_notes.rb +2 -2
  112. data/db/migrate/20150807134129_simplify_redirect_relations.rb +1 -1
  113. data/db/migrate/20160605154632_remove_profiles.rb +1 -1
  114. data/db/migrate/20190208152646_move_text_filter_to_name.rb +2 -2
  115. data/lib/format.rb +2 -2
  116. data/lib/publify_core/engine.rb +10 -0
  117. data/lib/publify_core/string_ext.rb +1 -13
  118. data/lib/publify_core/testing_support/fixtures/like_plain.html +2 -0
  119. data/lib/publify_core/text_filter/markdown.rb +5 -1
  120. data/lib/publify_core/text_filter/markdown_smartquotes.rb +6 -1
  121. data/lib/publify_core/version.rb +1 -1
  122. data/lib/publify_core.rb +2 -2
  123. data/lib/text_filter_plugin.rb +20 -22
  124. data/lib/theme.rb +56 -37
  125. metadata +101 -397
  126. data/app/assets/javascripts/bootstrap/affix.js +0 -164
  127. data/app/assets/javascripts/bootstrap/alert.js +0 -95
  128. data/app/assets/javascripts/bootstrap/button.js +0 -125
  129. data/app/assets/javascripts/bootstrap/collapse.js +0 -212
  130. data/app/assets/javascripts/bootstrap/dropdown.js +0 -165
  131. data/app/assets/javascripts/bootstrap/modal.js +0 -358
  132. data/app/assets/javascripts/bootstrap/tab.js +0 -155
  133. data/app/assets/javascripts/bootstrap/transition.js +0 -59
  134. data/app/assets/javascripts/bootstrap-sprockets.js +0 -8
  135. data/app/assets/javascripts/lightbox.js +0 -350
  136. data/app/assets/stylesheets/_bootstrap-compass.scss +0 -9
  137. data/app/assets/stylesheets/_bootstrap-mincer.scss +0 -19
  138. data/app/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
  139. data/app/assets/stylesheets/_bootstrap.scss +0 -42
  140. data/app/assets/stylesheets/bootstrap/_alerts.scss +0 -73
  141. data/app/assets/stylesheets/bootstrap/_button-groups.scss +0 -242
  142. data/app/assets/stylesheets/bootstrap/_buttons.scss +0 -168
  143. data/app/assets/stylesheets/bootstrap/_close.scss +0 -37
  144. data/app/assets/stylesheets/bootstrap/_code.scss +0 -69
  145. data/app/assets/stylesheets/bootstrap/_component-animations.scss +0 -38
  146. data/app/assets/stylesheets/bootstrap/_dropdowns.scss +0 -213
  147. data/app/assets/stylesheets/bootstrap/_forms.scss +0 -586
  148. data/app/assets/stylesheets/bootstrap/_grid.scss +0 -94
  149. data/app/assets/stylesheets/bootstrap/_labels.scss +0 -66
  150. data/app/assets/stylesheets/bootstrap/_media.scss +0 -66
  151. data/app/assets/stylesheets/bootstrap/_mixins.scss +0 -37
  152. data/app/assets/stylesheets/bootstrap/_modals.scss +0 -150
  153. data/app/assets/stylesheets/bootstrap/_navbar.scss +0 -479
  154. data/app/assets/stylesheets/bootstrap/_navs.scss +0 -242
  155. data/app/assets/stylesheets/bootstrap/_normalize.scss +0 -427
  156. data/app/assets/stylesheets/bootstrap/_pagination.scss +0 -86
  157. data/app/assets/stylesheets/bootstrap/_panels.scss +0 -222
  158. data/app/assets/stylesheets/bootstrap/_print.scss +0 -99
  159. data/app/assets/stylesheets/bootstrap/_scaffolding.scss +0 -160
  160. data/app/assets/stylesheets/bootstrap/_tables.scss +0 -234
  161. data/app/assets/stylesheets/bootstrap/_theme.scss +0 -224
  162. data/app/assets/stylesheets/bootstrap/_type.scss +0 -296
  163. data/app/assets/stylesheets/bootstrap/_utilities.scss +0 -55
  164. data/app/assets/stylesheets/bootstrap/_variables.scss +0 -638
  165. data/app/assets/stylesheets/bootstrap/_wells.scss +0 -29
  166. data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -15
  167. data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -12
  168. data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +0 -18
  169. data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +0 -56
  170. data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  171. data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +0 -22
  172. data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +0 -82
  173. data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +0 -56
  174. data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -81
  175. data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +0 -122
  176. data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
  177. data/app/assets/stylesheets/bootstrap/mixins/_image.scss +0 -28
  178. data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
  179. data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  180. data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
  181. data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -7
  182. data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +0 -24
  183. data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -20
  184. data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  185. data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +0 -6
  186. data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -17
  187. data/app/assets/stylesheets/bootstrap/mixins/_size.scss +0 -10
  188. data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  189. data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -28
  190. data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -12
  191. data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -8
  192. data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
  193. data/app/assets/stylesheets/lightbox.css +0 -63
  194. data/app/controllers/theme_controller.rb +0 -63
  195. data/app/views/notes/show_in_reply.html.erb +0 -18
  196. data/app/views/theme/static_view_test.html.erb +0 -1
  197. data/lib/publify_core/text_filter/twitterfilter.rb +0 -55
  198. data/lib/tasks/manifest.rake +0 -30
  199. /data/app/views/layouts/{default.html.erb → application.html.erb} +0 -0
  200. /data/themes/plain/javascripts/{theme.js → plain/theme.js} +0 -0
  201. /data/themes/plain/stylesheets/{theme.css → plain/theme.css} +0 -0
@@ -1,586 +0,0 @@
1
- //
2
- // Forms
3
- // --------------------------------------------------
4
-
5
-
6
- // Normalize non-controls
7
- //
8
- // Restyle and baseline non-control form elements.
9
-
10
- fieldset {
11
- // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
12
- // so we reset that to ensure it behaves more like a standard block element.
13
- // See https://github.com/twbs/bootstrap/issues/12359.
14
- min-width: 0;
15
- padding: 0;
16
- margin: 0;
17
- border: 0;
18
- }
19
-
20
- legend {
21
- display: block;
22
- width: 100%;
23
- padding: 0;
24
- margin-bottom: $line-height-computed;
25
- font-size: ($font-size-base * 1.5);
26
- line-height: inherit;
27
- color: $legend-color;
28
- border: 0;
29
- border-bottom: 1px solid $legend-border-color;
30
- }
31
-
32
- label {
33
- display: inline-block;
34
- max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
35
- margin-bottom: 5px;
36
- font-weight: 700;
37
- }
38
-
39
-
40
- // Normalize form controls
41
- //
42
- // While most of our form styles require extra classes, some basic normalization
43
- // is required to ensure optimum display with or without those classes to better
44
- // address browser inconsistencies.
45
-
46
- input[type="search"] {
47
- // Override content-box in Normalize (* isn't specific enough)
48
- @include box-sizing(border-box);
49
-
50
- // Search inputs in iOS
51
- //
52
- // This overrides the extra rounded corners on search inputs in iOS so that our
53
- // `.form-control` class can properly style them. Note that this cannot simply
54
- // be added to `.form-control` as it's not specific enough. For details, see
55
- // https://github.com/twbs/bootstrap/issues/11586.
56
- -webkit-appearance: none;
57
- appearance: none;
58
- }
59
-
60
- // Position radios and checkboxes better
61
- input[type="radio"],
62
- input[type="checkbox"] {
63
- margin: 4px 0 0;
64
- margin-top: 1px \9; // IE8-9
65
- line-height: normal;
66
-
67
- // Apply same disabled cursor tweak as for inputs
68
- // Some special care is needed because <label>s don't inherit their parent's `cursor`.
69
- //
70
- // Note: Neither radios nor checkboxes can be readonly.
71
- &[disabled],
72
- &.disabled,
73
- fieldset[disabled] & {
74
- cursor: $cursor-disabled;
75
- }
76
- }
77
-
78
- input[type="file"] {
79
- display: block;
80
- }
81
-
82
- // Make range inputs behave like textual form controls
83
- input[type="range"] {
84
- display: block;
85
- width: 100%;
86
- }
87
-
88
- // Make multiple select elements height not fixed
89
- select[multiple],
90
- select[size] {
91
- height: auto;
92
- }
93
-
94
- // Focus for file, radio, and checkbox
95
- input[type="file"]:focus,
96
- input[type="radio"]:focus,
97
- input[type="checkbox"]:focus {
98
- @include tab-focus;
99
- }
100
-
101
- // Adjust output element
102
- output {
103
- display: block;
104
- padding-top: ($padding-base-vertical + 1);
105
- font-size: $font-size-base;
106
- line-height: $line-height-base;
107
- color: $input-color;
108
- }
109
-
110
-
111
- // Common form controls
112
- //
113
- // Shared size and type resets for form controls. Apply `.form-control` to any
114
- // of the following form controls:
115
- //
116
- // select
117
- // textarea
118
- // input[type="text"]
119
- // input[type="password"]
120
- // input[type="datetime"]
121
- // input[type="datetime-local"]
122
- // input[type="date"]
123
- // input[type="month"]
124
- // input[type="time"]
125
- // input[type="week"]
126
- // input[type="number"]
127
- // input[type="email"]
128
- // input[type="url"]
129
- // input[type="search"]
130
- // input[type="tel"]
131
- // input[type="color"]
132
-
133
- .form-control {
134
- display: block;
135
- width: 100%;
136
- height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
137
- padding: $padding-base-vertical $padding-base-horizontal;
138
- font-size: $font-size-base;
139
- line-height: $line-height-base;
140
- color: $input-color;
141
- background-color: $input-bg;
142
- background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
143
- border: 1px solid $input-border;
144
- border-radius: $input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
145
- @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075));
146
- @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
147
-
148
- // Customize the `:focus` state to imitate native WebKit styles.
149
- @include form-control-focus;
150
-
151
- // Placeholder
152
- @include placeholder;
153
-
154
- // Unstyle the caret on `<select>`s in IE10+.
155
- &::-ms-expand {
156
- background-color: transparent;
157
- border: 0;
158
- }
159
-
160
- // Disabled and read-only inputs
161
- //
162
- // HTML5 says that controls under a fieldset > legend:first-child won't be
163
- // disabled if the fieldset is disabled. Due to implementation difficulty, we
164
- // don't honor that edge case; we style them as disabled anyway.
165
- &[disabled],
166
- &[readonly],
167
- fieldset[disabled] & {
168
- background-color: $input-bg-disabled;
169
- opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
170
- }
171
-
172
- &[disabled],
173
- fieldset[disabled] & {
174
- cursor: $cursor-disabled;
175
- }
176
-
177
- // [converter] extracted textarea& to textarea.form-control
178
- }
179
-
180
- // Reset height for `textarea`s
181
- textarea.form-control {
182
- height: auto;
183
- }
184
-
185
-
186
- // Special styles for iOS temporal inputs
187
- //
188
- // In Mobile Safari, setting `display: block` on temporal inputs causes the
189
- // text within the input to become vertically misaligned. As a workaround, we
190
- // set a pixel line-height that matches the given height of the input, but only
191
- // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
192
- //
193
- // Note that as of 9.3, iOS doesn't support `week`.
194
-
195
- @media screen and (-webkit-min-device-pixel-ratio: 0) {
196
- input[type="date"],
197
- input[type="time"],
198
- input[type="datetime-local"],
199
- input[type="month"] {
200
- &.form-control {
201
- line-height: $input-height-base;
202
- }
203
-
204
- &.input-sm {
205
- line-height: $input-height-small;
206
- }
207
-
208
- &.input-lg {
209
- line-height: $input-height-large;
210
- }
211
- }
212
- }
213
-
214
-
215
- // Form groups
216
- //
217
- // Designed to help with the organization and spacing of vertical forms. For
218
- // horizontal forms, use the predefined grid classes.
219
-
220
- .form-group {
221
- margin-bottom: $form-group-margin-bottom;
222
- }
223
-
224
-
225
- // Checkboxes and radios
226
- //
227
- // Indent the labels to position radios/checkboxes as hanging controls.
228
-
229
- .radio,
230
- .checkbox {
231
- position: relative;
232
- display: block;
233
- margin-top: 10px;
234
- margin-bottom: 10px;
235
-
236
- // These are used on elements with <label> descendants
237
- &.disabled,
238
- fieldset[disabled] & {
239
- label {
240
- cursor: $cursor-disabled;
241
- }
242
- }
243
-
244
- label {
245
- min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
246
- padding-left: 20px;
247
- margin-bottom: 0;
248
- font-weight: 400;
249
- cursor: pointer;
250
- }
251
- }
252
- .radio input[type="radio"],
253
- .radio-inline input[type="radio"],
254
- .checkbox input[type="checkbox"],
255
- .checkbox-inline input[type="checkbox"] {
256
- position: absolute;
257
- margin-top: 4px \9;
258
- margin-left: -20px;
259
- }
260
-
261
- .radio + .radio,
262
- .checkbox + .checkbox {
263
- margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
264
- }
265
-
266
- // Radios and checkboxes on same line
267
- .radio-inline,
268
- .checkbox-inline {
269
- position: relative;
270
- display: inline-block;
271
- padding-left: 20px;
272
- margin-bottom: 0;
273
- font-weight: 400;
274
- vertical-align: middle;
275
- cursor: pointer;
276
-
277
- // These are used directly on <label>s
278
- &.disabled,
279
- fieldset[disabled] & {
280
- cursor: $cursor-disabled;
281
- }
282
- }
283
- .radio-inline + .radio-inline,
284
- .checkbox-inline + .checkbox-inline {
285
- margin-top: 0;
286
- margin-left: 10px; // space out consecutive inline controls
287
- }
288
-
289
-
290
- // Static form control text
291
- //
292
- // Apply class to a `p` element to make any string of text align with labels in
293
- // a horizontal form layout.
294
-
295
- .form-control-static {
296
- min-height: ($line-height-computed + $font-size-base);
297
- // Size it appropriately next to real form controls
298
- padding-top: ($padding-base-vertical + 1);
299
- padding-bottom: ($padding-base-vertical + 1);
300
- // Remove default margin from `p`
301
- margin-bottom: 0;
302
-
303
- &.input-lg,
304
- &.input-sm {
305
- padding-right: 0;
306
- padding-left: 0;
307
- }
308
- }
309
-
310
-
311
- // Form control sizing
312
- //
313
- // Build on `.form-control` with modifier classes to decrease or increase the
314
- // height and font-size of form controls.
315
- //
316
- // The `.form-group-* form-control` variations are sadly duplicated to avoid the
317
- // issue documented in https://github.com/twbs/bootstrap/issues/15074.
318
-
319
- @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
320
- .form-group-sm {
321
- .form-control {
322
- height: $input-height-small;
323
- padding: $padding-small-vertical $padding-small-horizontal;
324
- font-size: $font-size-small;
325
- line-height: $line-height-small;
326
- border-radius: $input-border-radius-small;
327
- }
328
- select.form-control {
329
- height: $input-height-small;
330
- line-height: $input-height-small;
331
- }
332
- textarea.form-control,
333
- select[multiple].form-control {
334
- height: auto;
335
- }
336
- .form-control-static {
337
- height: $input-height-small;
338
- min-height: ($line-height-computed + $font-size-small);
339
- padding: ($padding-small-vertical + 1) $padding-small-horizontal;
340
- font-size: $font-size-small;
341
- line-height: $line-height-small;
342
- }
343
- }
344
-
345
- @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
346
- .form-group-lg {
347
- .form-control {
348
- height: $input-height-large;
349
- padding: $padding-large-vertical $padding-large-horizontal;
350
- font-size: $font-size-large;
351
- line-height: $line-height-large;
352
- border-radius: $input-border-radius-large;
353
- }
354
- select.form-control {
355
- height: $input-height-large;
356
- line-height: $input-height-large;
357
- }
358
- textarea.form-control,
359
- select[multiple].form-control {
360
- height: auto;
361
- }
362
- .form-control-static {
363
- height: $input-height-large;
364
- min-height: ($line-height-computed + $font-size-large);
365
- padding: ($padding-large-vertical + 1) $padding-large-horizontal;
366
- font-size: $font-size-large;
367
- line-height: $line-height-large;
368
- }
369
- }
370
-
371
-
372
- // Form control feedback states
373
- //
374
- // Apply contextual and semantic states to individual form controls.
375
-
376
- .has-feedback {
377
- // Enable absolute positioning
378
- position: relative;
379
-
380
- // Ensure icons don't overlap text
381
- .form-control {
382
- padding-right: ($input-height-base * 1.25);
383
- }
384
- }
385
- // Feedback icon (requires .glyphicon classes)
386
- .form-control-feedback {
387
- position: absolute;
388
- top: 0;
389
- right: 0;
390
- z-index: 2; // Ensure icon is above input groups
391
- display: block;
392
- width: $input-height-base;
393
- height: $input-height-base;
394
- line-height: $input-height-base;
395
- text-align: center;
396
- pointer-events: none;
397
- }
398
- .input-lg + .form-control-feedback,
399
- .form-group-lg .form-control + .form-control-feedback {
400
- width: $input-height-large;
401
- height: $input-height-large;
402
- line-height: $input-height-large;
403
- }
404
- .input-sm + .form-control-feedback,
405
- .form-group-sm .form-control + .form-control-feedback {
406
- width: $input-height-small;
407
- height: $input-height-small;
408
- line-height: $input-height-small;
409
- }
410
-
411
- // Feedback states
412
- .has-success {
413
- @include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
414
- }
415
- .has-warning {
416
- @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
417
- }
418
- .has-error {
419
- @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
420
- }
421
-
422
- // Reposition feedback icon if input has visible label above
423
- .has-feedback label {
424
-
425
- & ~ .form-control-feedback {
426
- top: ($line-height-computed + 5); // Height of the `label` and its margin
427
- }
428
- &.sr-only ~ .form-control-feedback {
429
- top: 0;
430
- }
431
- }
432
-
433
-
434
- // Help text
435
- //
436
- // Apply to any element you wish to create light text for placement immediately
437
- // below a form control. Use for general help, formatting, or instructional text.
438
-
439
- .help-block {
440
- display: block; // account for any element using help-block
441
- margin-top: 5px;
442
- margin-bottom: 10px;
443
- color: lighten($text-color, 25%); // lighten the text some for contrast
444
- }
445
-
446
-
447
- // Inline forms
448
- //
449
- // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
450
- // forms begin stacked on extra small (mobile) devices and then go inline when
451
- // viewports reach <768px.
452
- //
453
- // Requires wrapping inputs and labels with `.form-group` for proper display of
454
- // default HTML form controls and our custom form controls (e.g., input groups).
455
- //
456
-
457
- // [converter] extracted from `.form-inline` for libsass compatibility
458
- @mixin form-inline {
459
-
460
- // Kick in the inline
461
- @media (min-width: $screen-sm-min) {
462
- // Inline-block all the things for "inline"
463
- .form-group {
464
- display: inline-block;
465
- margin-bottom: 0;
466
- vertical-align: middle;
467
- }
468
-
469
- // In navbar-form, allow folks to *not* use `.form-group`
470
- .form-control {
471
- display: inline-block;
472
- width: auto; // Prevent labels from stacking above inputs in `.form-group`
473
- vertical-align: middle;
474
- }
475
-
476
- // Make static controls behave like regular ones
477
- .form-control-static {
478
- display: inline-block;
479
- }
480
-
481
- .control-label {
482
- margin-bottom: 0;
483
- vertical-align: middle;
484
- }
485
-
486
- // Remove default margin on radios/checkboxes that were used for stacking, and
487
- // then undo the floating of radios and checkboxes to match.
488
- .radio,
489
- .checkbox {
490
- display: inline-block;
491
- margin-top: 0;
492
- margin-bottom: 0;
493
- vertical-align: middle;
494
-
495
- label {
496
- padding-left: 0;
497
- }
498
- }
499
- .radio input[type="radio"],
500
- .checkbox input[type="checkbox"] {
501
- position: relative;
502
- margin-left: 0;
503
- }
504
-
505
- // Re-override the feedback icon.
506
- .has-feedback .form-control-feedback {
507
- top: 0;
508
- }
509
- }
510
- }
511
- // [converter] extracted as `@mixin form-inline` for libsass compatibility
512
- .form-inline {
513
- @include form-inline;
514
- }
515
-
516
-
517
-
518
- // Horizontal forms
519
- //
520
- // Horizontal forms are built on grid classes and allow you to create forms with
521
- // labels on the left and inputs on the right.
522
-
523
- .form-horizontal {
524
-
525
- // Consistent vertical alignment of radios and checkboxes
526
- //
527
- // Labels also get some reset styles, but that is scoped to a media query below.
528
- .radio,
529
- .checkbox,
530
- .radio-inline,
531
- .checkbox-inline {
532
- padding-top: ($padding-base-vertical + 1); // Default padding plus a border
533
- margin-top: 0;
534
- margin-bottom: 0;
535
- }
536
- // Account for padding we're adding to ensure the alignment and of help text
537
- // and other content below items
538
- .radio,
539
- .checkbox {
540
- min-height: ($line-height-computed + ($padding-base-vertical + 1));
541
- }
542
-
543
- // Make form groups behave like rows
544
- .form-group {
545
- @include make-row;
546
- }
547
-
548
- // Reset spacing and right align labels, but scope to media queries so that
549
- // labels on narrow viewports stack the same as a default form example.
550
- @media (min-width: $screen-sm-min) {
551
- .control-label {
552
- padding-top: ($padding-base-vertical + 1); // Default padding plus a border
553
- margin-bottom: 0;
554
- text-align: right;
555
- }
556
- }
557
-
558
- // Validation states
559
- //
560
- // Reposition the icon because it's now within a grid column and columns have
561
- // `position: relative;` on them. Also accounts for the grid gutter padding.
562
- .has-feedback .form-control-feedback {
563
- right: floor(($grid-gutter-width / 2));
564
- }
565
-
566
- // Form group sizes
567
- //
568
- // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
569
- // inputs and labels within a `.form-group`.
570
- .form-group-lg {
571
- @media (min-width: $screen-sm-min) {
572
- .control-label {
573
- padding-top: ($padding-large-vertical + 1);
574
- font-size: $font-size-large;
575
- }
576
- }
577
- }
578
- .form-group-sm {
579
- @media (min-width: $screen-sm-min) {
580
- .control-label {
581
- padding-top: ($padding-small-vertical + 1);
582
- font-size: $font-size-small;
583
- }
584
- }
585
- }
586
- }
@@ -1,94 +0,0 @@
1
- //
2
- // Grid system
3
- // --------------------------------------------------
4
-
5
-
6
- // Container widths
7
- //
8
- // Set the container width, and override it for fixed navbars in media queries.
9
-
10
- .container {
11
- @include container-fixed;
12
-
13
- @media (min-width: $screen-sm-min) {
14
- width: $container-sm;
15
- }
16
- @media (min-width: $screen-md-min) {
17
- width: $container-md;
18
- }
19
- @media (min-width: $screen-lg-min) {
20
- width: $container-lg;
21
- }
22
- }
23
-
24
-
25
- // Fluid container
26
- //
27
- // Utilizes the mixin meant for fixed width containers, but without any defined
28
- // width for fluid, full width layouts.
29
-
30
- .container-fluid {
31
- @include container-fixed;
32
- }
33
-
34
-
35
- // Row
36
- //
37
- // Rows contain and clear the floats of your columns.
38
-
39
- .row {
40
- @include make-row;
41
- }
42
-
43
- .row-no-gutters {
44
- margin-right: 0;
45
- margin-left: 0;
46
-
47
- [class*="col-"] {
48
- padding-right: 0;
49
- padding-left: 0;
50
- }
51
- }
52
-
53
-
54
- // Columns
55
- //
56
- // Common styles for small and large grid columns
57
-
58
- @include make-grid-columns;
59
-
60
-
61
- // Extra small grid
62
- //
63
- // Columns, offsets, pushes, and pulls for extra small devices like
64
- // smartphones.
65
-
66
- @include make-grid(xs);
67
-
68
-
69
- // Small grid
70
- //
71
- // Columns, offsets, pushes, and pulls for the small device range, from phones
72
- // to tablets.
73
-
74
- @media (min-width: $screen-sm-min) {
75
- @include make-grid(sm);
76
- }
77
-
78
-
79
- // Medium grid
80
- //
81
- // Columns, offsets, pushes, and pulls for the desktop device range.
82
-
83
- @media (min-width: $screen-md-min) {
84
- @include make-grid(md);
85
- }
86
-
87
-
88
- // Large grid
89
- //
90
- // Columns, offsets, pushes, and pulls for the large desktop device range.
91
-
92
- @media (min-width: $screen-lg-min) {
93
- @include make-grid(lg);
94
- }