decidim-core 0.9.3 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/append_redirect_url_to_modals.js.es6 +1 -1
  3. data/app/assets/javascripts/decidim/data_picker.js.es6 +32 -28
  4. data/app/assets/javascripts/decidim/form_filter.component.js.es6 +2 -2
  5. data/app/assets/javascripts/decidim/foundation.js.es6 +1 -2
  6. data/app/assets/stylesheets/decidim/_decidim.scss +6 -1
  7. data/app/assets/stylesheets/decidim/modules/_address.scss +4 -0
  8. data/app/assets/stylesheets/decidim/modules/_block-banner.scss +39 -0
  9. data/app/assets/stylesheets/decidim/modules/_buttons.scss +76 -1
  10. data/app/assets/stylesheets/decidim/modules/_callout.scss +4 -0
  11. data/app/assets/stylesheets/decidim/modules/_cards.scss +117 -16
  12. data/app/assets/stylesheets/decidim/modules/_collapsible-list.scss +19 -0
  13. data/app/assets/stylesheets/decidim/modules/_data-picker.scss +0 -1
  14. data/app/assets/stylesheets/decidim/modules/_docs-manager.scss +16 -0
  15. data/app/assets/stylesheets/decidim/modules/_icons.scss +13 -4
  16. data/app/assets/stylesheets/decidim/modules/_margins.scss +39 -0
  17. data/app/assets/stylesheets/decidim/modules/_modules.scss +4 -0
  18. data/app/assets/stylesheets/decidim/modules/_navbar.scss +26 -0
  19. data/app/assets/stylesheets/decidim/modules/_process-phase.scss +49 -0
  20. data/app/assets/stylesheets/decidim/modules/_reveal.scss +39 -0
  21. data/app/assets/stylesheets/decidim/modules/_typography.scss +45 -0
  22. data/app/assets/stylesheets/decidim/modules/_wizard-steps.scss +45 -0
  23. data/app/assets/stylesheets/decidim/utils/_helpers.scss +14 -0
  24. data/app/assets/stylesheets/decidim/utils/_mixins.scss +34 -0
  25. data/app/assets/stylesheets/decidim/utils/_settings.scss +6 -3
  26. data/app/commands/decidim/create_report.rb +2 -2
  27. data/app/controllers/decidim/devise/invitations_controller.rb +1 -1
  28. data/app/controllers/decidim/features/base_controller.rb +1 -1
  29. data/app/controllers/decidim/locales_controller.rb +1 -1
  30. data/app/forms/decidim/registration_form.rb +1 -1
  31. data/app/helpers/decidim/decidim_form_helper.rb +26 -1
  32. data/app/helpers/decidim/meta_tags_helper.rb +2 -0
  33. data/app/helpers/decidim/resource_reference_helper.rb +24 -0
  34. data/app/helpers/decidim/scopes_helper.rb +22 -4
  35. data/app/helpers/decidim/view_hooks_helper.rb +6 -3
  36. data/app/mailers/decidim/messaging/conversation_mailer.rb +2 -0
  37. data/app/models/decidim/abilities/base_ability.rb +1 -1
  38. data/app/models/decidim/action_log.rb +57 -0
  39. data/app/models/decidim/area.rb +25 -0
  40. data/app/models/decidim/area_type.rb +20 -0
  41. data/app/models/decidim/attachment.rb +3 -0
  42. data/app/models/decidim/attachment_collection.rb +16 -0
  43. data/app/models/decidim/authorization.rb +1 -0
  44. data/app/models/decidim/categorization.rb +2 -0
  45. data/app/models/decidim/category.rb +8 -0
  46. data/app/models/decidim/feature.rb +6 -1
  47. data/app/models/decidim/moderation.rb +7 -0
  48. data/app/models/decidim/newsletter.rb +7 -0
  49. data/app/models/decidim/organization.rb +9 -0
  50. data/app/models/decidim/participatory_process_user_role.rb +9 -0
  51. data/app/models/decidim/resource_link.rb +8 -1
  52. data/app/models/decidim/scope.rb +7 -0
  53. data/app/models/decidim/static_page.rb +7 -0
  54. data/app/models/decidim/user.rb +5 -1
  55. data/app/models/decidim/user_group.rb +7 -0
  56. data/app/presenters/decidim/admin_log/feature_presenter.rb +43 -0
  57. data/app/presenters/decidim/admin_log/moderation_presenter.rb +48 -0
  58. data/app/presenters/decidim/admin_log/newsletter_presenter.rb +47 -0
  59. data/app/presenters/decidim/admin_log/newsletter_resource_presenter.rb +18 -0
  60. data/app/presenters/decidim/admin_log/organization_presenter.rb +84 -0
  61. data/app/presenters/decidim/admin_log/scope_presenter.rb +54 -0
  62. data/app/presenters/decidim/admin_log/static_page_presenter.rb +48 -0
  63. data/app/presenters/decidim/admin_log/static_page_resource_presenter.rb +18 -0
  64. data/app/presenters/decidim/admin_log/user_group_presenter.rb +31 -0
  65. data/app/presenters/decidim/admin_log/user_presenter.rb +59 -0
  66. data/app/presenters/decidim/area_presenter.rb +14 -0
  67. data/app/presenters/decidim/area_type_presenter.rb +14 -0
  68. data/app/presenters/decidim/category_presenter.rb +14 -0
  69. data/app/presenters/decidim/log/base_presenter.rb +253 -0
  70. data/app/presenters/decidim/log/diff_presenter.rb +120 -0
  71. data/app/presenters/decidim/log/resource_presenter.rb +71 -0
  72. data/app/presenters/decidim/log/space_presenter.rb +63 -0
  73. data/app/presenters/decidim/log/user_presenter.rb +85 -0
  74. data/app/presenters/decidim/log/value_types/area_presenter.rb +28 -0
  75. data/app/presenters/decidim/log/value_types/date_presenter.rb +20 -0
  76. data/app/presenters/decidim/log/value_types/default_presenter.rb +43 -0
  77. data/app/presenters/decidim/log/value_types/locale_presenter.rb +20 -0
  78. data/app/presenters/decidim/log/value_types/percentage_presenter.rb +21 -0
  79. data/app/presenters/decidim/log/value_types/scope_presenter.rb +28 -0
  80. data/app/presenters/decidim/log/value_types/scope_type_presenter.rb +28 -0
  81. data/app/presenters/decidim/user_presenter.rb +1 -1
  82. data/app/services/decidim/action_authorizer.rb +1 -1
  83. data/app/services/decidim/action_logger.rb +108 -0
  84. data/app/services/decidim/events_manager.rb +1 -1
  85. data/app/services/decidim/log/diff_changeset_calculator.rb +135 -0
  86. data/app/services/decidim/resource_search.rb +2 -8
  87. data/app/services/decidim/settings_change.rb +31 -0
  88. data/app/services/decidim/traceability.rb +57 -11
  89. data/app/types/decidim/core/component_type.rb +12 -0
  90. data/app/types/decidim/core/date_time_type.rb +12 -0
  91. data/app/types/decidim/core/date_type.rb +13 -0
  92. data/app/types/decidim/core/decidim_type.rb +23 -0
  93. data/app/types/decidim/core/localized_string_type.rb +14 -0
  94. data/app/types/decidim/core/organization_type.rb +20 -0
  95. data/app/types/decidim/core/participatory_space_type.rb +12 -0
  96. data/app/types/decidim/core/session_type.rb +19 -0
  97. data/app/types/decidim/core/statistic_type.rb +22 -0
  98. data/app/types/decidim/core/translated_field_type.rb +45 -0
  99. data/app/types/decidim/core/user_group_type.rb +39 -0
  100. data/app/types/decidim/core/user_type.rb +41 -0
  101. data/app/validators/etiquette_validator.rb +1 -1
  102. data/app/views/decidim/application/_attachments.html.erb +4 -0
  103. data/app/views/decidim/application/_collection.html.erb +14 -0
  104. data/app/views/decidim/application/_document.html.erb +19 -0
  105. data/app/views/decidim/application/_documents.html.erb +8 -23
  106. data/app/views/decidim/shared/_announcement.html.erb +3 -2
  107. data/app/views/decidim/shared/_tags.html.erb +1 -0
  108. data/app/views/decidim/widgets/_data_picker.html.erb +6 -0
  109. data/app/views/layouts/decidim/mailer.html.erb +2 -2
  110. data/config/initializers/devise.rb +3 -3
  111. data/config/locales/ca.yml +65 -11
  112. data/config/locales/en.yml +64 -10
  113. data/config/locales/es.yml +66 -12
  114. data/config/locales/eu.yml +61 -10
  115. data/config/locales/fi.yml +64 -10
  116. data/config/locales/fr.yml +64 -10
  117. data/config/locales/gl.yml +64 -10
  118. data/config/locales/it.yml +64 -10
  119. data/config/locales/nl.yml +64 -10
  120. data/config/locales/pl.yml +60 -10
  121. data/config/locales/pt-BR.yml +64 -10
  122. data/config/locales/pt.yml +64 -10
  123. data/config/locales/sv.yml +64 -10
  124. data/config/locales/uk.yml +72 -0
  125. data/db/migrate/20170215115407_add_organization_custom_reference.rb +1 -1
  126. data/db/migrate/20170313095436_add_available_authorizations_to_organization.rb +1 -1
  127. data/db/migrate/20171207182729_create_decidim_attachment_collections.rb +12 -0
  128. data/db/migrate/20180130093153_add_action_log.rb +18 -0
  129. data/db/migrate/20180206143340_fix_reference_for_all_resources.rb +13 -0
  130. data/db/migrate/20180215104821_create_decidim_area_types.rb +11 -0
  131. data/db/migrate/20180215104945_create_decidim_areas.rb +12 -0
  132. data/db/migrate/20180221101934_fix_nickname_index.rb +1 -1
  133. data/db/migrate/20180226140756_add_version_to_action_logs.rb +19 -0
  134. data/db/migrate/20180314085339_rename_maximum_votes_per_proposal_to_threshold_per_proposal.rb +27 -0
  135. data/db/migrate/20180326075746_change_event_name_and_class_to_rename_to_publish_proposal_event.rb +17 -0
  136. data/db/seeds.rb +28 -0
  137. data/lib/decidim/abilities/participatory_process_role_ability.rb +2 -2
  138. data/lib/decidim/api/author_interface.rb +25 -0
  139. data/lib/decidim/api/component_interface.rb +16 -0
  140. data/lib/decidim/api/participatory_space_interface.rb +38 -0
  141. data/lib/decidim/authorable.rb +8 -0
  142. data/lib/decidim/core.rb +27 -9
  143. data/lib/decidim/core/engine.rb +3 -4
  144. data/lib/decidim/core/test.rb +2 -0
  145. data/lib/decidim/core/test/factories.rb +62 -6
  146. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +1 -1
  147. data/lib/decidim/core/test/shared_examples/comments_examples.rb +47 -5
  148. data/lib/decidim/core/test/shared_examples/component_type.rb +7 -0
  149. data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +63 -0
  150. data/lib/decidim/core/test/shared_examples/has_attachments.rb +21 -0
  151. data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
  152. data/lib/decidim/core/test/shared_examples/simple_event.rb +27 -1
  153. data/lib/decidim/core/version.rb +1 -1
  154. data/lib/decidim/events/author_event.rb +1 -1
  155. data/lib/decidim/events/base_event.rb +1 -1
  156. data/lib/decidim/events/simple_event.rb +21 -0
  157. data/lib/decidim/exporters/excel.rb +1 -1
  158. data/lib/decidim/feature_manifest.rb +2 -0
  159. data/lib/decidim/form_builder.rb +37 -3
  160. data/lib/decidim/has_attachment_collections.rb +18 -0
  161. data/lib/decidim/has_attachments.rb +14 -0
  162. data/lib/decidim/has_category.rb +5 -0
  163. data/lib/decidim/has_reference.rb +4 -4
  164. data/lib/decidim/loggable.rb +32 -0
  165. data/lib/decidim/participable.rb +0 -2
  166. data/lib/decidim/participatory_space_manifest.rb +2 -0
  167. data/lib/decidim/publicable.rb +2 -2
  168. data/lib/decidim/query_extensions.rb +46 -14
  169. data/lib/decidim/resourceable.rb +15 -6
  170. data/lib/decidim/scopable.rb +35 -1
  171. data/lib/decidim/scopable_feature.rb +16 -0
  172. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ca.js +0 -0
  173. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.es.js +0 -0
  174. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.eu.js +0 -0
  175. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.fi.js +0 -0
  176. data/vendor/assets/javascripts/leaflet.markercluster.js +0 -0
  177. metadata +91 -38
  178. data/app/commands/decidim/remove_admin.rb +0 -25
  179. data/app/helpers/decidim/feature_reference_helper.rb +0 -25
  180. data/lib/decidim/core/api.rb +0 -13
  181. data/lib/decidim/core/api/author_interface.rb +0 -18
  182. data/lib/decidim/core/api/decidim_type.rb +0 -17
  183. data/lib/decidim/core/api/localized_string_type.rb +0 -12
  184. data/lib/decidim/core/api/process_step_type.rb +0 -19
  185. data/lib/decidim/core/api/process_type.rb +0 -17
  186. data/lib/decidim/core/api/session_type.rb +0 -17
  187. data/lib/decidim/core/api/translated_field_type.rb +0 -43
  188. data/lib/decidim/core/api/user_group_type.rb +0 -37
  189. data/lib/decidim/core/api/user_type.rb +0 -39
  190. data/lib/decidim/devise_failure_app.rb +0 -36
  191. data/lib/decidim/has_scope.rb +0 -25
  192. data/lib/decidim/i18n_exceptions.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb155e8d59a117cddb772f80d367de9d7abe021ea6d37af2f8d6b080a7f94bf8
4
- data.tar.gz: a429cb952493c92af576ab9253dbc66884c87cbc1de2f2d4a743d5006828a027
3
+ metadata.gz: b32e3bb559542783d6a9740b4085fd8eeb759f73f8abf90f5757ca0637df8f10
4
+ data.tar.gz: 96b403539d296a203d68be022bb15bbd174615f7958348682fa41c5552a96151
5
5
  SHA512:
6
- metadata.gz: 9fb306e7dcee5e6124143546150283368face417e8774244cf7893d72900316fb98a7cde6a3c66adb951eea4ae49581963a9ef79c2ebcadb534f26c9a594d01b
7
- data.tar.gz: '041917204f85f7af4d8d0269934a23c06ee19a3223b26295eafb8213f22eebd44cd5bedce0df6148fe9eed59c4403dc70b78ede416531476b81af830c351bf96'
6
+ metadata.gz: 83330d25850c105e3335e7928314c7825122928e7b187e4e5527d46411c44580b2fd1b6301ec00c999c017ef4adb340fdc0642bc55b3818da856851c4e19d093
7
+ data.tar.gz: ee8b45ecc831028ccaafa868cf77352064b810e6b4dbb668945ac91a66f7840b75c5aa7cc7a193c8bcc7698f4611f6105f07b699f2367390f80aa9dcd0bec535
@@ -36,7 +36,7 @@ $(() => {
36
36
  const parts = queryString.split(/[&;]/g);
37
37
 
38
38
  // Reverse iteration as may be destructive
39
- for (let index = parts.length; index > 0; index -= 1) {
39
+ for (let index = parts.length - 1; index >= 0; index -= 1) {
40
40
  // Idiom for string.startsWith
41
41
  if (parts[index].lastIndexOf(prefix, 0) !== -1) {
42
42
  parts.splice(index, 1);
@@ -9,32 +9,36 @@
9
9
  this.current = null;
10
10
 
11
11
  elements.each((_index, element) => {
12
- let $element = $(element);
13
- let input = "hidden",
14
- name = $element.data('picker-name'),
15
- values = $(".picker-values", $element);
12
+ this.activate(element);
13
+ });
14
+ }
16
15
 
17
- if ($element.hasClass("picker-multiple")) {
18
- input = "checkbox";
19
- name += "[]";
20
- }
16
+ activate(picker) {
17
+ let $element = $(picker);
18
+ let input = "hidden",
19
+ name = $element.data('picker-name'),
20
+ values = $(".picker-values", $element);
21
21
 
22
- $("div", values).each((_index2, div) => {
23
- let value = $("a", div).data("picker-value");
24
- $(div).prepend($(`<input type="${input}" checked name="${name}" value="${value}"/>`));
25
- });
22
+ if ($element.hasClass("picker-multiple")) {
23
+ input = "checkbox";
24
+ name += "[]";
25
+ }
26
26
 
27
- $element.on("click", "a", (event) => {
28
- event.preventDefault();
29
- if ($element.hasClass('disabled')) {
30
- return;
31
- }
32
- this._openPicker($element, event.target.parentNode);
33
- });
27
+ $("div", values).each((_index2, div) => {
28
+ let value = $("a", div).data("picker-value");
29
+ $(div).prepend($(`<input type="${input}" checked name="${name}" value="${value}"/>`));
30
+ });
34
31
 
35
- $element.on("click", "input", (event) => {
36
- this._removeValue($element, event.target.parentNode);
37
- });
32
+ $element.on("click", "a", (event) => {
33
+ event.preventDefault();
34
+ if ($element.hasClass('disabled')) {
35
+ return;
36
+ }
37
+ this._openPicker($element, event.target.parentNode);
38
+ });
39
+
40
+ $element.on("click", "input", (event) => {
41
+ this._removeValue($element, event.target.parentNode);
38
42
  });
39
43
  }
40
44
 
@@ -84,12 +88,12 @@
84
88
  }
85
89
 
86
90
  this.current = {
87
- multiple: $picker.hasClass("picker-multiple"),
88
- picker: $picker,
89
- name: $picker.data('picker-name'),
90
- values: $picker.find(".picker-values"),
91
- div: currentDiv
92
- };
91
+ multiple: $picker.hasClass("picker-multiple"),
92
+ picker: $picker,
93
+ name: $picker.data('picker-name'),
94
+ values: $picker.find(".picker-values"),
95
+ div: currentDiv
96
+ };
93
97
  }
94
98
 
95
99
  _load(url) {
@@ -93,7 +93,7 @@
93
93
  const [, key, array, value] = result.match(/filter\[([^\]]*)\](\[\])?=([^&]*)/);
94
94
  if (array) {
95
95
  if (!acc[key]) {
96
- acc[key]=[];
96
+ acc[key] = [];
97
97
  }
98
98
  acc[key].push(value);
99
99
  } else {
@@ -108,7 +108,7 @@
108
108
  return null;
109
109
  }
110
110
 
111
- /**
111
+ /**
112
112
  * Parse current location and get the current order.
113
113
  * @private
114
114
  * @returns {string} - The current order
@@ -6,7 +6,6 @@
6
6
  // = require foundation.util.motion.js
7
7
  // = require foundation.util.nest.js
8
8
  // = require foundation.util.timer.js
9
- // = require foundation.util.timerAndImageLoader.js
10
9
  // = require foundation.util.touch.js
11
10
  // = require foundation.util.triggers.js
12
11
  // = require foundation.abide.js
@@ -26,4 +25,4 @@
26
25
  // = require foundation.tabs.js
27
26
  // = require foundation.toggler.js
28
27
  // = require foundation.tooltip.js
29
- // = require foundation.zf.responsiveAccordionTabs.js
28
+ // = require foundation.responsiveAccordionTabs.js
@@ -1,9 +1,14 @@
1
1
  @import "variables";
2
2
  @import "foundation";
3
- @import "utils/*";
3
+ @import "utils/settings";
4
4
 
5
5
  @include foundation-everything($flex: false);
6
6
 
7
+ @import "utils/fontface";
8
+ @import "utils/helpers";
9
+ @import "utils/keyframes";
10
+ @import "utils/mixins";
11
+ @import "utils/toggle-expand";
7
12
  @import "modules/modules";
8
13
  @import "layouts/*";
9
14
  @import "extras/*";
@@ -7,6 +7,10 @@
7
7
  display: flex;
8
8
  }
9
9
 
10
+ .address--alone{
11
+ flex-grow: 1;
12
+ }
13
+
10
14
  .address__info{
11
15
  display: flex;
12
16
  flex-grow: 1;
@@ -0,0 +1,39 @@
1
+ .block-banner{
2
+ background-repeat: no-repeat;
3
+ padding: 1rem;
4
+
5
+ @include breakpoint(medium down){
6
+ background-image: none !important;
7
+ padding-bottom: 1rem;
8
+
9
+ .card__content{
10
+ padding-bottom: 0;
11
+ }
12
+ }
13
+
14
+ @include breakpoint(medium){
15
+ background-position: right -400px center;
16
+ padding-left: 1.5rem;
17
+ padding-right: 1.5rem;
18
+
19
+ .card__content{
20
+ height: 100%;
21
+ display: flex;
22
+ flex-direction: column;
23
+ justify-content: center;
24
+ }
25
+ }
26
+
27
+ @include breakpoint(large){
28
+ padding-left: 4rem;
29
+ padding-right: 4rem;
30
+
31
+ .card__content{
32
+ padding-left: 0;
33
+ }
34
+ }
35
+
36
+ p:last-child{
37
+ margin-bottom: 0;
38
+ }
39
+ }
@@ -1,14 +1,25 @@
1
1
  /* Foundation button overrides */
2
-
3
2
  .button{
4
3
  &.small{
5
4
  padding-top: .5rem;
6
5
  padding-bottom: .5rem;
6
+
7
+ &.compact{
8
+ padding-left: .5rem;
9
+ padding-right: .5rem;
10
+ letter-spacing: 0;
11
+ }
7
12
  }
8
13
 
9
14
  &.tiny{
10
15
  padding-top: .25rem;
11
16
  padding-bottom: .25rem;
17
+
18
+ &.compact{
19
+ padding-left: .25rem;
20
+ padding-right: .25rem;
21
+ letter-spacing: 0;
22
+ }
12
23
  }
13
24
  }
14
25
 
@@ -36,8 +47,68 @@
36
47
  }
37
48
  }
38
49
 
50
+ .button.light:not(.hollow){
51
+ @include modifiers(color, (success: $white, secondary: $white));
52
+ }
53
+
54
+ // Button groups
55
+ .button-group--collapse{
56
+ text-align: left;
57
+ margin-bottom: 0;
58
+ display: flex;
59
+
60
+ > :last-child{
61
+ flex: 1;
62
+ }
63
+
64
+ .button{
65
+ margin-right: 0;
66
+ }
67
+
68
+ > :first-child,
69
+ > :first-child *{
70
+ border-top-right-radius: 0;
71
+ border-bottom-right-radius: 0;
72
+ }
73
+
74
+ > :last-child,
75
+ > :last-child *{
76
+ border-top-left-radius: 0;
77
+ border-bottom-left-radius: 0;
78
+ }
79
+
80
+ > :not(:first-child):not(:last-child),
81
+ > :not(:first-child):not(:last-child) *{
82
+ border-radius: 0;
83
+ }
84
+ }
85
+
86
+ // buttons layout
87
+ .buttons__row{
88
+ @include flexgap(.5rem);
89
+ }
90
+
91
+ .buttons__column{
92
+ @include flexgap(.5rem, column);
93
+ }
94
+
39
95
  /* Extra buttons styles */
40
96
 
97
+ .button--shadow{
98
+ $shadows:(
99
+ primary: shade($primary, 50),
100
+ secondary: shade($secondary, 50),
101
+ success: shade($success, 50),
102
+ warning: shade($warning, 50),
103
+ alert: shade($alert, 50),
104
+ muted: shade($muted, 50)
105
+ );
106
+
107
+ @include modifiers(background-color, $shadows){
108
+ color: $white;
109
+ }
110
+ }
111
+
41
112
  .button--icon{
42
113
  display: flex;
43
114
  align-items: center;
@@ -54,6 +125,10 @@
54
125
  }
55
126
  }
56
127
 
128
+ .button--nomargin{
129
+ margin: 0;
130
+ }
131
+
57
132
  .button--frosted{
58
133
  background-color: rgba($white, .65);
59
134
  color: $primary;
@@ -27,3 +27,7 @@
27
27
  border-left: 8px solid $alert;
28
28
  }
29
29
  }
30
+
31
+ .callout.flash{
32
+ margin-bottom: 0;
33
+ }
@@ -5,6 +5,7 @@ $card-secondary-bg: $light-gray-dark;
5
5
  $card-border: $border;
6
6
  $card-border-radius: $global-radius;
7
7
  $card-shadow: 0 2px 7px rgba(black, .1);
8
+ $card-id: $medium-gray;
8
9
 
9
10
  $card-padding-small: 1rem;
10
11
  $card-padding: 1.5rem;
@@ -47,9 +48,11 @@ $datetime-bg: $primary;
47
48
 
48
49
  .card__content{
49
50
  padding: $card-padding-small;
51
+ padding-bottom: $card-padding-small / 2;
50
52
 
51
53
  @include breakpoint(medium){
52
54
  padding: $card-padding;
55
+ padding-bottom: $card-padding / 2;
53
56
  }
54
57
  }
55
58
 
@@ -72,7 +75,7 @@ $datetime-bg: $primary;
72
75
  }
73
76
 
74
77
  .card__header{
75
- margin-bottom: 1rem;
78
+ margin-bottom: $card-padding / 2;
76
79
  }
77
80
 
78
81
  .card__button{
@@ -101,20 +104,32 @@ $datetime-bg: $primary;
101
104
  }
102
105
  }
103
106
 
104
- /* Card meetings */
105
- .card--meeting{
106
- .card__content{
107
- display: flex;
108
- flex-direction: column;
109
- flex-grow: 1;
107
+ .card__text{
108
+ .card__text--status{
109
+ font-weight: bold;
110
+ text-transform: uppercase;
110
111
 
111
- .address{
112
- margin-top: auto;
112
+ &::after{
113
+ content: " ";
113
114
  }
115
+
116
+ @include modifiers(color, (muted: $muted));
114
117
  }
118
+
119
+ .card__text--category{
120
+ display: block;
121
+ margin-top: $global-margin / 2;
122
+ }
123
+ }
124
+
125
+ .card__image{
126
+ width: 100%;
127
+ max-height: 10rem;
128
+ object-fit: cover;
115
129
  }
116
130
 
117
131
  /* Card datetime */
132
+ // NOTE: Possible deprecated
118
133
  .card__datetime{
119
134
  flex-shrink: 0;
120
135
  text-align: center;
@@ -184,8 +199,12 @@ $datetime-bg: $primary;
184
199
  }
185
200
 
186
201
  .card__author{
187
- margin-top: -.3rem;
188
202
  margin-bottom: .5rem;
203
+
204
+ // Hack when there's a toggler list
205
+ [data-toggler]{
206
+ margin-bottom: -.5rem;
207
+ }
189
208
  }
190
209
 
191
210
  .card__voting{
@@ -214,7 +233,7 @@ $datetime-bg: $primary;
214
233
  flex-grow: 1;
215
234
  text-align: center;
216
235
  text-transform: uppercase;
217
- font-size: 85%;
236
+ font-size: rem-calc(15);
218
237
  line-height: 1;
219
238
  color: $muted;
220
239
  padding: .5em;
@@ -267,8 +286,11 @@ $datetime-bg: $primary;
267
286
  padding: $card-padding;
268
287
  }
269
288
 
289
+ > *:only-child{
290
+ margin-left: auto;
291
+ }
292
+
270
293
  .card__button{
271
- //margin-left: auto;
272
294
  font-size: $small-font-size;
273
295
  }
274
296
  }
@@ -308,7 +330,11 @@ $datetime-bg: $primary;
308
330
 
309
331
  /* Card Link */
310
332
  .card__link{
311
- color: inherit;
333
+ color: $anchor-color;
334
+
335
+ @include breakpoint(small only){
336
+ word-break: break-all;
337
+ }
312
338
 
313
339
  &:hover{
314
340
  color: $anchor-color;
@@ -421,6 +447,15 @@ $datetime-bg: $primary;
421
447
  }
422
448
  }
423
449
 
450
+ .card--list__data__icon--lg{
451
+ @extend .card--list__data__icon;
452
+
453
+ .icon{
454
+ width: 36px;
455
+ height: 36px;
456
+ }
457
+ }
458
+
424
459
  .card--list__data__number{
425
460
  @extend .card-data__item__number;
426
461
 
@@ -606,10 +641,76 @@ $datetime-bg: $primary;
606
641
  }
607
642
  }
608
643
  }
644
+ }
645
+
646
+ // card label
647
+ .card__label{
648
+ display: inline-flex;
649
+ color: $card-id;
650
+ padding: 0 .5rem;
651
+ text-transform: uppercase;
652
+ font-size: $small-font-size;
653
+ font-weight: bold;
654
+ position: absolute;
655
+ background-color: $card-bg;
656
+ margin-top: -$global-margin * .75;
657
+ margin-left: $card-padding-small;
658
+
659
+ .icon{
660
+ // Reduces some icon space
661
+ margin-left: -.25rem;
662
+ }
609
663
 
610
- .card-status__text{
611
- font-weight: bold;
664
+ @include breakpoint(medium){
665
+ margin-left: $card-padding;
666
+ }
612
667
 
613
- @include modifiers(color, (muted: $muted));
668
+ @include modifiers(color, (muted: tint($muted, 50))){
669
+ margin-top: -$global-margin * .95;
670
+ }
671
+ }
672
+
673
+ // card metadata with icon
674
+ .card__icondata{
675
+ ul{
676
+ align-items: stretch;
677
+ border-top: $border;
678
+
679
+ li{
680
+ border-top: 0;
681
+ display: flex;
682
+ align-items: center;
683
+ justify-content: center;
684
+
685
+ > *{
686
+ margin: .5rem;
687
+ }
688
+ }
689
+
690
+ li:first-child{
691
+ color: $primary;
692
+ flex: 0;
693
+ }
694
+
695
+ li:not(:first-child){
696
+ font-size: $global-font-size;
697
+ text-transform: none;
698
+ justify-content: left;
699
+
700
+ strong{
701
+ color: $body-font-color;
702
+ text-transform: uppercase;
703
+ }
704
+
705
+ .card__icondata--address{
706
+ color: $body-font-color;
707
+ line-height: 120%;
708
+
709
+ & + a{
710
+ display: block;
711
+ margin-top: $global-margin;
712
+ }
713
+ }
714
+ }
614
715
  }
615
716
  }