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,18 +0,0 @@
1
- // Single side border-radius
2
-
3
- @mixin border-top-radius($radius) {
4
- border-top-left-radius: $radius;
5
- border-top-right-radius: $radius;
6
- }
7
- @mixin border-right-radius($radius) {
8
- border-top-right-radius: $radius;
9
- border-bottom-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-top-left-radius: $radius;
17
- border-bottom-left-radius: $radius;
18
- }
@@ -1,56 +0,0 @@
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
- &:focus,
12
- &.focus {
13
- color: $color;
14
- background-color: darken($background, 10%);
15
- border-color: darken($border, 25%);
16
- }
17
- &:hover {
18
- color: $color;
19
- background-color: darken($background, 10%);
20
- border-color: darken($border, 12%);
21
- }
22
- &:active,
23
- &.active,
24
- .open > &.dropdown-toggle {
25
- color: $color;
26
- background-color: darken($background, 10%);
27
- background-image: none;
28
- border-color: darken($border, 12%);
29
-
30
- &:hover,
31
- &:focus,
32
- &.focus {
33
- color: $color;
34
- background-color: darken($background, 17%);
35
- border-color: darken($border, 25%);
36
- }
37
- }
38
- &.disabled,
39
- &[disabled],
40
- fieldset[disabled] & {
41
- &:hover,
42
- &:focus,
43
- &.focus {
44
- background-color: $background;
45
- border-color: $border;
46
- }
47
- }
48
- }
49
-
50
- // Button sizes
51
- @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
52
- padding: $padding-vertical $padding-horizontal;
53
- font-size: $font-size;
54
- line-height: $line-height;
55
- border-radius: $border-radius;
56
- }
@@ -1,7 +0,0 @@
1
- // Center-align a block level element
2
-
3
- @mixin center-block() {
4
- display: block;
5
- margin-right: auto;
6
- margin-left: auto;
7
- }
@@ -1,22 +0,0 @@
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
- display: table; // 2
17
- content: " "; // 1
18
- }
19
- &:after {
20
- clear: both;
21
- }
22
- }
@@ -1,82 +0,0 @@
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
- &.radio label,
15
- &.checkbox label,
16
- &.radio-inline label,
17
- &.checkbox-inline label {
18
- color: $text-color;
19
- }
20
- // Set the border and box shadow on specific inputs to match
21
- .form-control {
22
- border-color: $border-color;
23
- @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); // Redeclare so transitions work
24
- &:focus {
25
- border-color: darken($border-color, 10%);
26
- $shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten($border-color, 20%);
27
- @include box-shadow($shadow);
28
- }
29
- }
30
- // Optional feedback icon
31
- .form-control-feedback {
32
- color: $text-color;
33
- }
34
- }
35
-
36
-
37
- // Form control focus state
38
- //
39
- // Generate a customized focus state and for any input with the specified color,
40
- // which defaults to the `$input-border-focus` variable.
41
- //
42
- // We highly encourage you to not customize the default value, but instead use
43
- // this to tweak colors on an as-needed basis. This aesthetic change is based on
44
- // WebKit's default styles, but applicable to a wider range of browsers. Its
45
- // usability and accessibility should be taken into account with any change.
46
- //
47
- // Example usage: change the default blue border and shadow to white for better
48
- // contrast against a dark gray background.
49
- @mixin form-control-focus($color: $input-border-focus) {
50
- $color-rgba: rgba(red($color), green($color), blue($color), .6);
51
- &:focus {
52
- border-color: $color;
53
- outline: 0;
54
- @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px $color-rgba);
55
- }
56
- }
57
-
58
- // Form control sizing
59
- //
60
- // Relative text size, padding, and border-radii changes for form controls. For
61
- // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
62
- // element gets special love because it's special, and that's a fact!
63
- // [converter] $parent hack
64
- @mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
65
- #{$parent} {
66
- height: $input-height;
67
- padding: $padding-vertical $padding-horizontal;
68
- font-size: $font-size;
69
- line-height: $line-height;
70
- border-radius: $border-radius;
71
- }
72
-
73
- select#{$parent} {
74
- height: $input-height;
75
- line-height: $input-height;
76
- }
77
-
78
- textarea#{$parent},
79
- select[multiple]#{$parent} {
80
- height: auto;
81
- }
82
- }
@@ -1,56 +0,0 @@
1
-
2
-
3
- // Horizontal gradient, from left to right
4
- //
5
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
6
- // Color stops are not available in IE9 and below.
7
- @mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
8
- background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
9
- background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
10
- 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+
11
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
12
- background-repeat: repeat-x;
13
- }
14
-
15
- // Vertical gradient, from top to bottom
16
- //
17
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
18
- // Color stops are not available in IE9 and below.
19
- @mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
20
- background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
21
- background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
22
- 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+
23
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
24
- background-repeat: repeat-x;
25
- }
26
-
27
- @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
28
- background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
29
- background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
30
- background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
31
- background-repeat: repeat-x;
32
- }
33
- @mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
34
- background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
35
- background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
36
- background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
37
- 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
38
- background-repeat: no-repeat;
39
- }
40
- @mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
41
- background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
42
- background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
43
- background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
44
- 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
45
- background-repeat: no-repeat;
46
- }
47
- @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
48
- background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
49
- background-image: radial-gradient(circle, $inner-color, $outer-color);
50
- background-repeat: no-repeat;
51
- }
52
- @mixin gradient-striped($color: rgba(255, 255, 255, .15), $angle: 45deg) {
53
- background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
54
- background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
55
- background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
56
- }
@@ -1,81 +0,0 @@
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-right: floor(($grid-gutter-width / 2));
17
- padding-left: ceil(($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
- }
@@ -1,122 +0,0 @@
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
- padding-right: ceil(($gutter / 2));
8
- padding-left: floor(($gutter / 2));
9
- margin-right: auto;
10
- margin-left: auto;
11
- @include clearfix;
12
- }
13
-
14
- // Creates a wrapper for a series of columns
15
- @mixin make-row($gutter: $grid-gutter-width) {
16
- margin-right: floor(($gutter / -2));
17
- margin-left: ceil(($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-right: ($gutter / 2);
28
- padding-left: ($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-right: ($gutter / 2);
45
- padding-left: ($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-right: ($gutter / 2);
73
- padding-left: ($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-right: ($gutter / 2);
101
- padding-left: ($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
- }
@@ -1,21 +0,0 @@
1
- // CSS image replacement
2
- //
3
- // Heads up! v3 launched with only `.hide-text()`, but per our pattern for
4
- // mixins being reused as classes with the same name, this doesn't hold up. As
5
- // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
6
- //
7
- // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
8
-
9
- // Deprecated as of v3.0.1 (has been removed in v4)
10
- @mixin hide-text() {
11
- font: 0/0 a;
12
- color: transparent;
13
- text-shadow: none;
14
- background-color: transparent;
15
- border: 0;
16
- }
17
-
18
- // New mixin to use as of v3.0.1
19
- @mixin text-hide() {
20
- @include hide-text;
21
- }
@@ -1,28 +0,0 @@
1
- // Responsive image
2
- //
3
- // Keep images from scaling beyond the width of their parents.
4
- @mixin img-responsive($display: block) {
5
- display: $display;
6
- max-width: 100%; // Part 1: Set a maximum relative to the parent
7
- height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
8
- }
9
-
10
-
11
- // Retina image
12
- //
13
- // Short retina mixin for setting background-image and -size. Note that the
14
- // spelling of `min--moz-device-pixel-ratio` is intentional.
15
- @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
16
- background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
17
-
18
- @media
19
- only screen and (-webkit-min-device-pixel-ratio: 2),
20
- only screen and ( min--moz-device-pixel-ratio: 2),
21
- only screen and ( -o-min-device-pixel-ratio: 2/1),
22
- only screen and ( min-device-pixel-ratio: 2),
23
- only screen and ( min-resolution: 192dpi),
24
- only screen and ( min-resolution: 2dppx) {
25
- background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
26
- background-size: $width-1x $height-1x;
27
- }
28
- }
@@ -1,12 +0,0 @@
1
- // Labels
2
-
3
- @mixin label-variant($color) {
4
- background-color: $color;
5
-
6
- &[href] {
7
- &:hover,
8
- &:focus {
9
- background-color: darken($color, 10%);
10
- }
11
- }
12
- }
@@ -1,10 +0,0 @@
1
- // Horizontal dividers
2
- //
3
- // Dividers (basically an hr) within dropdowns and nav lists
4
-
5
- @mixin nav-divider($color: #e5e5e5) {
6
- height: 1px;
7
- margin: (($line-height-computed / 2) - 1) 0;
8
- overflow: hidden;
9
- background-color: $color;
10
- }
@@ -1,9 +0,0 @@
1
- // Navbar vertical align
2
- //
3
- // Vertically center elements in the navbar.
4
- // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
5
-
6
- @mixin navbar-vertical-align($element-height) {
7
- margin-top: (($navbar-height - $element-height) / 2);
8
- margin-bottom: (($navbar-height - $element-height) / 2);
9
- }
@@ -1,7 +0,0 @@
1
- // Opacity
2
-
3
- @mixin opacity($opacity) {
4
- $opacity-ie: ($opacity * 100); // IE8 filter
5
- filter: alpha(opacity=$opacity-ie);
6
- opacity: $opacity;
7
- }
@@ -1,24 +0,0 @@
1
- // Pagination
2
-
3
- @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
4
- > li {
5
- > a,
6
- > span {
7
- padding: $padding-vertical $padding-horizontal;
8
- font-size: $font-size;
9
- line-height: $line-height;
10
- }
11
- &:first-child {
12
- > a,
13
- > span {
14
- @include border-left-radius($border-radius);
15
- }
16
- }
17
- &:last-child {
18
- > a,
19
- > span {
20
- @include border-right-radius($border-radius);
21
- }
22
- }
23
- }
24
- }
@@ -1,20 +0,0 @@
1
- // Panels
2
-
3
- @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
4
- border-color: $border;
5
-
6
- & > .panel-heading {
7
- color: $heading-text-color;
8
- background-color: $heading-bg-color;
9
- border-color: $heading-border;
10
-
11
- + .panel-collapse > .panel-body {
12
- border-top-color: $border;
13
- }
14
- }
15
- & > .panel-footer {
16
- + .panel-collapse > .panel-body {
17
- border-bottom-color: $border;
18
- }
19
- }
20
- }
@@ -1,8 +0,0 @@
1
- // Reset filters for IE
2
- //
3
- // When you need to remove a gradient background, do not forget to use this to reset
4
- // the IE filter for IE9 and below.
5
-
6
- @mixin reset-filter() {
7
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
8
- }
@@ -1,6 +0,0 @@
1
- // Resize anything
2
-
3
- @mixin resizable($direction) {
4
- overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5
- resize: $direction; // Options: horizontal, vertical, both
6
- }
@@ -1,17 +0,0 @@
1
- // [converter] $parent hack
2
- @mixin responsive-visibility($parent) {
3
- #{$parent} {
4
- display: block !important;
5
- }
6
- table#{$parent} { display: table !important; }
7
- tr#{$parent} { display: table-row !important; }
8
- th#{$parent},
9
- td#{$parent} { display: table-cell !important; }
10
- }
11
-
12
- // [converter] $parent hack
13
- @mixin responsive-invisibility($parent) {
14
- #{$parent} {
15
- display: none !important;
16
- }
17
- }
@@ -1,10 +0,0 @@
1
- // Sizing shortcuts
2
-
3
- @mixin size($width, $height) {
4
- width: $width;
5
- height: $height;
6
- }
7
-
8
- @mixin square($size) {
9
- @include size($size, $size);
10
- }
@@ -1,9 +0,0 @@
1
- // WebKit-style focus
2
-
3
- @mixin tab-focus() {
4
- // WebKit-specific. Other browsers will keep their default outline style.
5
- // (Initially tried to also force default via `outline: initial`,
6
- // but that seems to erroneously remove the outline in Firefox altogether.)
7
- outline: 5px auto -webkit-focus-ring-color;
8
- outline-offset: -2px;
9
- }
@@ -1,28 +0,0 @@
1
- // Tables
2
-
3
- @mixin table-row-variant($state, $background) {
4
- // Exact selectors below required to override `.table-striped` and prevent
5
- // inheritance to nested tables.
6
- .table > thead > tr,
7
- .table > tbody > tr,
8
- .table > tfoot > tr {
9
- > td.#{$state},
10
- > th.#{$state},
11
- &.#{$state} > td,
12
- &.#{$state} > th {
13
- background-color: $background;
14
- }
15
- }
16
-
17
- // Hover states for `.table-hover`
18
- // Note: this is not available for cells or rows within `thead` or `tfoot`.
19
- .table-hover > tbody > tr {
20
- > td.#{$state}:hover,
21
- > th.#{$state}:hover,
22
- &.#{$state}:hover > td,
23
- &:hover > .#{$state},
24
- &.#{$state}:hover > th {
25
- background-color: darken($background, 5%);
26
- }
27
- }
28
- }