decidim-core 0.11.2 → 0.12.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/notifications.js.es6 +8 -6
  3. data/app/assets/javascripts/decidim/user_registrations.js.es6 +25 -1
  4. data/app/assets/stylesheets/decidim/application.scss.erb +4 -0
  5. data/app/assets/stylesheets/decidim/layouts/_home.scss +79 -0
  6. data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +2 -1
  7. data/app/assets/stylesheets/decidim/modules/_cards.scss +82 -38
  8. data/app/assets/stylesheets/decidim/modules/_collapsible-list.scss +16 -0
  9. data/app/assets/stylesheets/decidim/modules/_definition-data.scss +27 -0
  10. data/app/assets/stylesheets/decidim/modules/_fingerprint.scss +8 -0
  11. data/app/assets/stylesheets/decidim/modules/_horizontal-tabs.scss +51 -0
  12. data/app/assets/stylesheets/decidim/modules/_inline-filters.scss +5 -3
  13. data/app/assets/stylesheets/decidim/modules/_margins.scss +6 -4
  14. data/app/assets/stylesheets/decidim/modules/_modules.scss +3 -0
  15. data/app/assets/stylesheets/decidim/modules/_navbar.scss +113 -7
  16. data/app/assets/stylesheets/decidim/modules/_signup.scss +22 -5
  17. data/app/assets/stylesheets/decidim/modules/_toggle.scss +9 -0
  18. data/app/assets/stylesheets/decidim/modules/_typography.scss +5 -1
  19. data/app/assets/stylesheets/decidim/utils/_helpers.scss +42 -0
  20. data/app/assets/stylesheets/decidim/utils/_mixins.scss +6 -0
  21. data/app/assets/stylesheets/decidim/utils/_settings.scss +3 -2
  22. data/app/cells/decidim/announcement/show.erb +11 -0
  23. data/app/cells/decidim/announcement_cell.rb +32 -0
  24. data/app/cells/decidim/author/comments.erb +6 -0
  25. data/app/cells/decidim/author/contact.erb +3 -0
  26. data/app/cells/decidim/author/date.erb +5 -0
  27. data/app/cells/decidim/author/flag.erb +5 -0
  28. data/app/cells/decidim/author/profile.erb +9 -0
  29. data/app/cells/decidim/{profile → author}/profile_inline.erb +1 -1
  30. data/app/cells/decidim/author/show.erb +18 -0
  31. data/app/cells/decidim/author/withdraw.erb +6 -0
  32. data/app/cells/decidim/author_cell.rb +109 -0
  33. data/app/cells/decidim/card/show.erb +18 -16
  34. data/app/cells/decidim/card_cell.rb +17 -4
  35. data/app/cells/decidim/card_m/author.erb +3 -0
  36. data/app/cells/decidim/card_m/badge.erb +1 -0
  37. data/app/cells/decidim/card_m/comments_counter.erb +3 -0
  38. data/app/cells/decidim/card_m/data.erb +0 -0
  39. data/app/cells/decidim/card_m/footer.erb +0 -0
  40. data/app/cells/decidim/card_m/header.erb +17 -0
  41. data/app/cells/decidim/card_m/image.erb +5 -0
  42. data/app/cells/decidim/card_m/label.erb +3 -0
  43. data/app/cells/decidim/card_m/show.erb +24 -0
  44. data/app/cells/decidim/card_m/status.erb +9 -0
  45. data/app/cells/decidim/card_m/tags.erb +0 -0
  46. data/app/cells/decidim/card_m_cell.rb +136 -0
  47. data/app/cells/decidim/collapsible_list/show.erb +20 -0
  48. data/app/cells/decidim/collapsible_list_cell.rb +66 -0
  49. data/app/cells/decidim/fingerprint/show.erb +22 -0
  50. data/app/cells/decidim/fingerprint_cell.rb +17 -0
  51. data/app/cells/decidim/follow_button/show.erb +34 -0
  52. data/app/cells/decidim/follow_button_cell.rb +40 -0
  53. data/app/cells/decidim/followers/show.erb +9 -0
  54. data/app/cells/decidim/followers_cell.rb +18 -0
  55. data/app/cells/decidim/following/show.erb +9 -0
  56. data/app/cells/decidim/following_cell.rb +24 -0
  57. data/app/cells/decidim/notifications/show.erb +48 -0
  58. data/app/cells/decidim/notifications_cell.rb +21 -0
  59. data/app/cells/decidim/progress_bar/show.erb +17 -0
  60. data/app/cells/decidim/progress_bar_cell.rb +68 -0
  61. data/app/cells/decidim/tags/category.erb +1 -0
  62. data/app/cells/decidim/tags/scope.erb +1 -0
  63. data/app/cells/decidim/tags/show.erb +5 -0
  64. data/app/cells/decidim/tags_cell.rb +62 -0
  65. data/app/cells/decidim/tos_page/announcement.erb +2 -0
  66. data/app/cells/decidim/tos_page/refuse_btn_modal.erb +23 -0
  67. data/app/cells/decidim/tos_page/sticky_form.erb +29 -0
  68. data/app/cells/decidim/tos_page_cell.rb +39 -0
  69. data/app/cells/decidim/user_profile/footer.erb +5 -0
  70. data/app/cells/decidim/user_profile/header.erb +20 -0
  71. data/app/cells/decidim/user_profile_cell.rb +26 -0
  72. data/app/commands/decidim/create_omniauth_registration.rb +1 -1
  73. data/app/commands/decidim/create_registration.rb +2 -1
  74. data/app/commands/decidim/search.rb +45 -0
  75. data/app/controllers/concerns/decidim/devise_controllers.rb +15 -12
  76. data/app/controllers/concerns/decidim/http_caching_disabler.rb +21 -0
  77. data/app/controllers/concerns/decidim/impersonate_users.rb +1 -6
  78. data/app/controllers/concerns/decidim/locale_switcher.rb +1 -1
  79. data/app/controllers/concerns/decidim/needs_permission.rb +70 -0
  80. data/app/controllers/concerns/decidim/needs_tos_accepted.rb +42 -0
  81. data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -7
  82. data/app/controllers/concerns/decidim/user_profile.rb +3 -1
  83. data/app/controllers/decidim/account_controller.rb +4 -4
  84. data/app/controllers/decidim/application_controller.rb +17 -8
  85. data/app/controllers/decidim/components/base_controller.rb +14 -9
  86. data/app/controllers/decidim/cookie_policy_controller.rb +0 -2
  87. data/app/controllers/decidim/devise/confirmations_controller.rb +13 -0
  88. data/app/controllers/decidim/devise/invitations_controller.rb +3 -1
  89. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +9 -3
  90. data/app/controllers/decidim/devise/passwords_controller.rb +1 -1
  91. data/app/controllers/decidim/devise/registrations_controller.rb +1 -7
  92. data/app/controllers/decidim/doorkeeper/authorizations_controller.rb +0 -2
  93. data/app/controllers/decidim/doorkeeper/credentials_controller.rb +0 -1
  94. data/app/controllers/decidim/errors_controller.rb +0 -2
  95. data/app/controllers/decidim/follows_controller.rb +4 -2
  96. data/app/controllers/decidim/locales_controller.rb +1 -1
  97. data/app/controllers/decidim/messaging/conversations_controller.rb +5 -5
  98. data/app/controllers/decidim/newsletters_controller.rb +0 -2
  99. data/app/controllers/decidim/notifications_controller.rb +3 -19
  100. data/app/controllers/decidim/notifications_settings_controller.rb +2 -2
  101. data/app/controllers/decidim/pages_controller.rb +12 -10
  102. data/app/controllers/decidim/profiles_controller.rb +10 -4
  103. data/app/controllers/decidim/reports_controller.rb +14 -1
  104. data/app/controllers/decidim/scopes_controller.rb +3 -3
  105. data/app/controllers/decidim/searches_controller.rb +39 -0
  106. data/app/controllers/decidim/static_map_controller.rb +0 -2
  107. data/app/controllers/decidim/tos_controller.rb +20 -0
  108. data/app/controllers/decidim/widgets_controller.rb +0 -1
  109. data/app/forms/decidim/follow_form.rb +1 -0
  110. data/app/forms/decidim/registration_form.rb +2 -1
  111. data/app/helpers/decidim/card_helper.rb +2 -0
  112. data/app/helpers/decidim/cells_paginate_helper.rb +16 -0
  113. data/app/helpers/decidim/cta_button_helper.rb +1 -1
  114. data/app/helpers/decidim/decidim_form_helper.rb +4 -0
  115. data/app/helpers/decidim/icon_helper.rb +2 -0
  116. data/app/helpers/decidim/resource_helper.rb +1 -2
  117. data/app/helpers/decidim/scopes_helper.rb +17 -10
  118. data/app/helpers/decidim/searches_helper.rb +16 -0
  119. data/app/helpers/decidim/tooltip_helper.rb +12 -0
  120. data/app/models/decidim/organization.rb +10 -0
  121. data/app/models/decidim/permission_action.rb +40 -0
  122. data/app/models/decidim/searchable_resource.rb +37 -0
  123. data/app/models/decidim/static_page.rb +4 -0
  124. data/app/models/decidim/user.rb +39 -3
  125. data/app/permissions/decidim/default_permissions.rb +61 -0
  126. data/app/permissions/decidim/permissions.rb +106 -0
  127. data/app/permissions/decidim/user_manager_permissions.rb +24 -0
  128. data/app/presenters/decidim/admin_log/organization_presenter.rb +2 -1
  129. data/app/presenters/decidim/home_stats_presenter.rb +2 -8
  130. data/app/presenters/decidim/user_presenter.rb +8 -0
  131. data/app/services/decidim/traceability.rb +6 -9
  132. data/app/types/decidim/core/user_type.rb +1 -1
  133. data/app/views/decidim/devise/invitations/edit.html.erb +56 -10
  134. data/app/views/decidim/devise/registrations/new.html.erb +36 -14
  135. data/app/views/decidim/devise/shared/_newsletter_modal.html.erb +25 -0
  136. data/app/views/decidim/follows/update_button.js.erb +2 -2
  137. data/app/views/decidim/messaging/conversations/_message.html.erb +1 -1
  138. data/app/views/{pages → decidim/pages}/decidim_page.html.erb +5 -0
  139. data/app/views/decidim/pages/home.html.erb +17 -0
  140. data/app/views/{pages → decidim/pages}/home/_extended.html.erb +0 -0
  141. data/app/views/{pages → decidim/pages}/home/_footer_sub_hero.html.erb +0 -0
  142. data/app/views/{pages → decidim/pages}/home/_hero.html.erb +0 -0
  143. data/app/views/{pages → decidim/pages}/home/_highlighted_content_banner.html.erb +0 -0
  144. data/app/views/{pages → decidim/pages}/home/_highlighted_processes.html.erb +0 -0
  145. data/app/views/{pages → decidim/pages}/home/_statistics.html.erb +0 -0
  146. data/app/views/{pages → decidim/pages}/home/_sub_hero.html.erb +0 -0
  147. data/app/views/decidim/profiles/_followers.html.erb +5 -0
  148. data/app/views/decidim/profiles/_following.html.erb +5 -0
  149. data/app/views/decidim/profiles/_notifications.html.erb +0 -0
  150. data/app/views/decidim/profiles/_user.html.erb +59 -0
  151. data/app/views/decidim/profiles/_user_follow.erb +32 -0
  152. data/app/views/decidim/profiles/show.html.erb +32 -59
  153. data/app/views/decidim/searches/_count.html.erb +1 -0
  154. data/app/views/decidim/searches/_filters.html.erb +20 -0
  155. data/app/views/decidim/searches/_filters_small_view.html.erb +18 -0
  156. data/app/views/decidim/searches/_results.html.erb +5 -0
  157. data/app/views/decidim/searches/index.html.erb +20 -0
  158. data/app/views/decidim/searches/index.js.erb +5 -0
  159. data/app/views/decidim/shared/_address_details.html.erb +7 -9
  160. data/app/views/decidim/shared/_announcement.html.erb +1 -6
  161. data/app/views/decidim/shared/_author_reference.html.erb +1 -1
  162. data/app/views/decidim/shared/_follow_button.html.erb +1 -34
  163. data/app/views/decidim/shared/_static_map.html.erb +3 -1
  164. data/app/views/decidim/shared/_tags.html.erb +1 -11
  165. data/app/views/kaminari/decidim/_paginator.html.erb +16 -15
  166. data/app/views/layouts/decidim/_head.html.erb +1 -0
  167. data/app/views/layouts/decidim/_topbar_search.html.erb +8 -0
  168. data/app/views/layouts/decidim/_user_menu.html.erb +2 -2
  169. data/app/views/layouts/decidim/_wrapper.html.erb +3 -2
  170. data/config/initializers/devise.rb +1 -1
  171. data/config/initializers/rack_attack.rb +28 -0
  172. data/config/locales/ca.yml +136 -55
  173. data/config/locales/en.yml +135 -54
  174. data/config/locales/es.yml +136 -55
  175. data/config/locales/eu.yml +136 -54
  176. data/config/locales/fi.yml +135 -54
  177. data/config/locales/fr.yml +136 -54
  178. data/config/locales/gl.yml +136 -54
  179. data/config/locales/it.yml +136 -54
  180. data/config/locales/nl.yml +136 -54
  181. data/config/locales/pl.yml +144 -54
  182. data/config/locales/pt-BR.yml +136 -54
  183. data/config/locales/pt.yml +136 -54
  184. data/config/locales/ru.yml +150 -60
  185. data/config/locales/sv.yml +136 -54
  186. data/config/locales/uk.yml +146 -57
  187. data/config/routes.rb +11 -1
  188. data/db/migrate/20180209122819_create_decidim_searchable_resource.rb +21 -0
  189. data/db/migrate/20180508111640_add_tos_version_to_organization.rb +19 -0
  190. data/db/migrate/20180508111710_add_accepted_tos_version_field_to_users.rb +25 -0
  191. data/db/seeds.rb +33 -26
  192. data/lib/decidim/component_manifest.rb +35 -27
  193. data/lib/decidim/content_processor.rb +21 -3
  194. data/lib/decidim/core.rb +27 -16
  195. data/lib/decidim/core/engine.rb +8 -19
  196. data/lib/decidim/core/test.rb +2 -0
  197. data/lib/decidim/core/test/factories.rb +34 -4
  198. data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +15 -0
  199. data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +27 -0
  200. data/lib/decidim/core/version.rb +1 -1
  201. data/lib/decidim/events/base_event.rb +5 -1
  202. data/lib/decidim/fingerprint_calculator.rb +42 -0
  203. data/lib/decidim/fingerprintable.rb +63 -0
  204. data/lib/decidim/form_builder.rb +1 -0
  205. data/lib/decidim/manifest_registry.rb +4 -10
  206. data/lib/decidim/participable.rb +4 -0
  207. data/lib/decidim/participatory_space_manifest.rb +36 -0
  208. data/lib/decidim/participatory_space_resourceable.rb +11 -0
  209. data/lib/decidim/resource_manifest.rb +10 -11
  210. data/lib/decidim/resourceable.rb +3 -2
  211. data/lib/decidim/search_resource_fields_mapper.rb +93 -0
  212. data/lib/decidim/searchable.rb +85 -0
  213. data/lib/decidim/settings_manifest.rb +3 -2
  214. data/lib/decidim/traceable.rb +2 -0
  215. data/lib/decidim/view_model.rb +9 -0
  216. data/lib/tasks/decidim_tasks.rake +79 -1
  217. metadata +149 -76
  218. data/app/assets/stylesheets/decidim/extras/_register_form.scss +0 -9
  219. data/app/cells/decidim/author_box/show.erb +0 -10
  220. data/app/cells/decidim/author_box_cell.rb +0 -21
  221. data/app/cells/decidim/profile/show.erb +0 -13
  222. data/app/cells/decidim/profile_cell.rb +0 -17
  223. data/app/controllers/concerns/decidim/needs_authorization.rb +0 -46
  224. data/app/models/decidim/abilities/admin_ability.rb +0 -29
  225. data/app/models/decidim/abilities/base_ability.rb +0 -56
  226. data/app/models/decidim/abilities/everyone_ability.rb +0 -25
  227. data/app/models/decidim/abilities/participatory_process_admin_ability.rb +0 -28
  228. data/app/models/decidim/abilities/participatory_process_collaborator_ability.rb +0 -28
  229. data/app/models/decidim/abilities/participatory_process_moderator_ability.rb +0 -15
  230. data/app/models/decidim/abilities/user_manager_ability.rb +0 -35
  231. data/app/views/decidim/notifications/_notification.html.erb +0 -20
  232. data/app/views/decidim/notifications/index.html.erb +0 -36
  233. data/app/views/decidim/shared/_author.html.erb +0 -21
  234. data/app/views/pages/home.html.erb +0 -17
  235. data/db/migrate/20180613080638_rename_missing_features_to_components.rb +0 -15
  236. data/lib/decidim/abilities.rb +0 -7
  237. data/lib/decidim/abilities/participatory_process_role_ability.rb +0 -60
  238. data/lib/decidim/page_finder.rb +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c938b913ac377c051536707a486ad119a8e4a2cbaba41c72d77f1fd8968e8e6
4
- data.tar.gz: f1ec6bd3fbbfa831db0262bbd08587371a4dae31b1feb2a0a24b051e0d56750c
3
+ metadata.gz: f084c611918e66b6c38487ff54a283e4324622e4dfc964671e91bf1d474cab79
4
+ data.tar.gz: 3d824e63e64d4798907b90857a2313bd99cfe80c039d5bc4cc3ae78b0756d095
5
5
  SHA512:
6
- metadata.gz: 549042ceee9e335c2397281f41d7d5870e4b2bbaf678cf4af2c27ef311fcdbb592b83e72550b655ccaafa28951312088cf148e9bc8821d8fe810026ade60be64
7
- data.tar.gz: 1a3ba897c5e23368b56bc63b765fbe2304abd9d756c3fab2db45f60db7352b401882ee18783adc3016f1d057e4cf9264edf9a5040601738f6aff466a33b028ae
6
+ metadata.gz: 160d7796c4b7ed57f0a733cf840dfec87d7651e942b84c55598e9710cdca77144b12f719398f10cb6420dd80709272b603d0bd0964901f8c524ab28245883b10
7
+ data.tar.gz: 39a9aa3a953ec79e58c53f06cebf3caccbbb3411ee3e0a0bcfa001acb79953cade3327c080c1ca23f1de48e9bb2b32e739cdf76ab403d3c1d787a90d35ee5ba9
@@ -1,11 +1,12 @@
1
1
  $(() => {
2
- const $wrapper = $("#notifications");
3
- const $section = $wrapper.find("section#notifications-list");
4
- const $noNotificationsText = $wrapper.find(".empty-notifications");
2
+ const $notificationsBellIcon = $(".title-bar .topbar__notifications");
3
+ const $wrapper = $(".tabs-content");
4
+ const $section = $wrapper.find("#notifications");
5
+ const $noNotificationsText = $(".empty-notifications");
5
6
  const $pagination = $wrapper.find("ul.pagination");
6
7
  const FADEOUT_TIME = 500;
7
8
 
8
- const anyNotifications = () => $wrapper.find(".card--list__item").length > 0;
9
+ const anyNotifications = () => $wrapper.find(".card--widget").length > 0;
9
10
  const emptyNotifications = () => {
10
11
  if (!anyNotifications()) {
11
12
  $section.remove();
@@ -14,7 +15,7 @@ $(() => {
14
15
  };
15
16
 
16
17
  $section.on("click", ".mark-as-read-button", (event) => {
17
- const $item = $(event.target).parents(".card--list__item");
18
+ const $item = $(event.target).parents(".card--widget");
18
19
  $item.fadeOut(FADEOUT_TIME, () => {
19
20
  $item.remove();
20
21
  emptyNotifications();
@@ -24,7 +25,8 @@ $(() => {
24
25
  $wrapper.on("click", ".mark-all-as-read-button", () => {
25
26
  $section.fadeOut(FADEOUT_TIME, () => {
26
27
  $pagination.remove();
27
- $wrapper.find(".card--list__item").remove();
28
+ $notificationsBellIcon.removeClass("is-active");
29
+ $wrapper.find(".card--widget").remove();
28
30
  emptyNotifications();
29
31
  });
30
32
  });
@@ -1,7 +1,10 @@
1
1
  $(() => {
2
- const $userRegistrationForm = $(".register-form");
2
+ const $userRegistrationForm = $("#register-form");
3
3
  const $userGroupFields = $userRegistrationForm.find(".user-group-fields");
4
4
  const inputSelector = 'input[name="user[sign_up_as]"]';
5
+ const newsletterSelector = 'input[type="checkbox"][name="user[newsletter]"]';
6
+ const $newsletterModal = $("#sign-up-newsletter-modal");
7
+
5
8
 
6
9
  const setGroupFieldsVisibility = (value) => {
7
10
  if (value === "user") {
@@ -11,6 +14,13 @@ $(() => {
11
14
  }
12
15
  }
13
16
 
17
+ const checkNewsletter = (check) => {
18
+ $userRegistrationForm.find(newsletterSelector).prop("checked", check);
19
+ $newsletterModal.data("continue", true);
20
+ $newsletterModal.foundation("close");
21
+ $userRegistrationForm.submit();
22
+ }
23
+
14
24
  setGroupFieldsVisibility($userRegistrationForm.find(`${inputSelector}:checked`).val());
15
25
 
16
26
  $userRegistrationForm.on("change", inputSelector, (event) => {
@@ -18,4 +28,18 @@ $(() => {
18
28
 
19
29
  setGroupFieldsVisibility(value);
20
30
  });
31
+
32
+ $userRegistrationForm.on("submit", (event) => {
33
+ const newsletterChecked = $userRegistrationForm.find(newsletterSelector);
34
+ if (!$newsletterModal.data("continue")) {
35
+ if (!newsletterChecked.prop("checked")) {
36
+ event.preventDefault();
37
+ $newsletterModal.foundation("open");
38
+ }
39
+ }
40
+ });
41
+
42
+ $newsletterModal.find(".check-newsletter").on("click", (event) => {
43
+ checkNewsletter($(event.target).data("check"));
44
+ });
21
45
  });
@@ -4,3 +4,7 @@
4
4
  <% Decidim.component_manifests.map(&:stylesheet).compact.each do |stylesheet| %>
5
5
  @import "<%= stylesheet %>";
6
6
  <% end %>
7
+
8
+ <% Decidim.participatory_space_manifests.map(&:stylesheet).compact.each do |stylesheet| %>
9
+ @import "<%= stylesheet %>";
10
+ <% end %>
@@ -35,6 +35,85 @@
35
35
  }
36
36
  }
37
37
 
38
+ .hero__boxes{
39
+ text-align: center;
40
+ border-radius: 4px;
41
+ background-color: rgba($black, .5);
42
+ color: $white;
43
+ margin-top: 1rem;
44
+ padding: $global-padding;
45
+
46
+ @include breakpoint(medium){
47
+ text-align: left;
48
+ padding: 2rem 1.5rem;
49
+ margin-top: 2rem;
50
+ }
51
+
52
+ @include breakpoint(mediumlarge){
53
+ margin-top: 3rem;
54
+ }
55
+
56
+ @include breakpoint(large){
57
+ margin-top: 4rem;
58
+ }
59
+
60
+ p{
61
+ font-size: rem-calc(17);
62
+ }
63
+
64
+ .button{
65
+ display: block;
66
+ margin: 0 auto;
67
+ }
68
+
69
+ .box__search{
70
+ position: relative;
71
+ margin: 0 auto;
72
+
73
+ $color: rgba($body-font-color, .3);
74
+
75
+ input,
76
+ input:focus{
77
+ color: $body-font-color;
78
+ margin: 0;
79
+ box-shadow: none;
80
+ background: $white;
81
+
82
+ // NOTE: Input height same as button height
83
+ line-height: 1;
84
+ padding: $button-padding;
85
+ padding-left: $input-padding * 4;
86
+ height: auto;
87
+ border: 1px solid transparent;
88
+
89
+ &::-webkit-input-placeholder{ /* Chrome/Opera/Safari */
90
+ color: $color;
91
+ }
92
+
93
+ &::-moz-placeholder{ /* Firefox 19+ */
94
+ color: $color;
95
+ }
96
+
97
+ &:-ms-input-placeholder{ /* IE 10+ */
98
+ color: $color;
99
+ }
100
+
101
+ &:-moz-placeholder{ /* Firefox 18- */
102
+ color: $color;
103
+ }
104
+ }
105
+
106
+ svg{
107
+ color: $color;
108
+ position: absolute;
109
+ top: 50%;
110
+ left: $input-padding;
111
+ transform: translateY(-50%);
112
+ opacity: .5;
113
+ }
114
+ }
115
+ }
116
+
38
117
  .hero-heading{
39
118
  margin-bottom: 1.5rem;
40
119
  font-size: 2rem;
@@ -8,7 +8,8 @@ $author-data-color: $muted;
8
8
  //Styles
9
9
 
10
10
  .author-data{
11
- @include clearfix();
11
+ @include flex;
12
+ @include flex-align($x: left, $y: middle);
12
13
 
13
14
  color: $author-data-color;
14
15
  font-size: .9rem;
@@ -1,9 +1,10 @@
1
1
  /* Variables */
2
2
 
3
- $card-bg: $white;
3
+ $card-bg: $white !default;
4
4
  $card-secondary-bg: $light-gray-dark;
5
5
  $card-border: $border;
6
6
  $card-border-radius: $global-radius;
7
+ $card-border-top-width: 8px !default;
7
8
  $card-shadow: 0 2px 7px rgba(black, .1);
8
9
  $card-id: $medium-gray;
9
10
 
@@ -30,7 +31,7 @@ $datetime-bg: $primary;
30
31
  overflow: hidden;
31
32
 
32
33
  @include modifiers(border-top-color, (muted: rgba($muted, .3))){
33
- border-top-width: 8px;
34
+ border-top-width: $card-border-top-width;
34
35
  }
35
36
 
36
37
  &:hover{
@@ -57,14 +58,6 @@ $datetime-bg: $primary;
57
58
  }
58
59
  }
59
60
 
60
- .card__content--multiple{
61
- @extend .card__content;
62
-
63
- display: flex;
64
- justify-content: space-around;
65
- align-items: center;
66
- }
67
-
68
61
  .card__content--center{
69
62
  text-align: center;
70
63
  }
@@ -93,6 +86,7 @@ $datetime-bg: $primary;
93
86
 
94
87
  .card__button{
95
88
  margin-bottom: 0;
89
+ cursor: pointer;
96
90
  }
97
91
 
98
92
  .card__type{
@@ -145,10 +139,24 @@ $datetime-bg: $primary;
145
139
  }
146
140
  }
147
141
 
142
+ .card__text--separated-mid-dot{
143
+ @include inline-separator(' · ');
144
+ }
145
+
148
146
  .card__image{
149
147
  width: 100%;
150
148
  max-height: 10rem;
149
+ min-height: 5rem;
151
150
  object-fit: cover;
151
+
152
+ &.card__image--smaller{
153
+ max-height: 5rem;
154
+ }
155
+
156
+ &.card__image--larger{
157
+ max-height: 20rem;
158
+ min-height: 10rem;
159
+ }
152
160
  }
153
161
 
154
162
  /* Card datetime */
@@ -274,6 +282,10 @@ $datetime-bg: $primary;
274
282
  .card-data__item--centerblock{
275
283
  margin: 0 auto;
276
284
  }
285
+
286
+ &.card-data__item--expand{
287
+ line-height: $global-lineheight;
288
+ }
277
289
  }
278
290
 
279
291
  .card-data__item__number{
@@ -285,6 +297,19 @@ $datetime-bg: $primary;
285
297
  margin-bottom: .2rem;
286
298
  }
287
299
 
300
+ .card-data__item--multiple{
301
+ display: flex;
302
+ justify-content: space-between;
303
+ align-items: center;
304
+
305
+ @include flexgap(1rem);
306
+
307
+ > div{
308
+ text-align: left;
309
+ display: block;
310
+ }
311
+ }
312
+
288
313
  /* Card popularity */
289
314
 
290
315
  .card__popularity{
@@ -706,9 +731,39 @@ $datetime-bg: $primary;
706
731
  font-size: $small-font-size;
707
732
  font-weight: bold;
708
733
  position: absolute;
709
- background-color: $card-bg;
710
- margin-top: -$global-margin * .75;
734
+ background-color: transparent;
735
+ text-shadow:
736
+ -1px -1px 0 $card-bg,
737
+ 1px -1px 0 $card-bg,
738
+ -1px 1px 0 $card-bg,
739
+ 1px 1px 0 $card-bg;
740
+ margin-top: ($global-margin * .6) * -1;
711
741
  margin-left: $card-padding-small;
742
+ z-index: 0;
743
+
744
+ &::before{
745
+ content: " ";
746
+ height: $border-width;
747
+ display: inline-block;
748
+ background: $card-bg;
749
+ position: absolute;
750
+ left: 0;
751
+ right: 0;
752
+ z-index: -1;
753
+ top: $global-margin * .5;
754
+ }
755
+
756
+ .card.success &,
757
+ .card.muted &,
758
+ .card.warning &,
759
+ .card.alert &{
760
+ margin-top: ($global-margin * .95) * -1;
761
+
762
+ &::before{
763
+ height: $card-border-top-width;
764
+ top: $global-margin * .45;
765
+ }
766
+ }
712
767
 
713
768
  .icon{
714
769
  // Reduces some icon space
@@ -827,40 +882,29 @@ $datetime-bg: $primary;
827
882
  .card-data__item{
828
883
  color: $body-font-color;
829
884
  text-transform: none;
885
+ font-size: rem-calc(16);
886
+ text-align: left;
887
+ padding: $card-padding-small;
830
888
 
831
- strong{
832
- display: block;
833
- text-transform: uppercase;
834
- font-size: rem-calc(16);
835
-
836
- &:not(:first-child){
837
- margin-top: $global-margin;
838
- }
839
- }
889
+ @include modifiers(color);
840
890
 
841
- span{
842
- color: $muted;
843
- font-size: 90%;
891
+ @include breakpoint(medium){
892
+ padding: $card-padding;
844
893
  }
845
894
 
846
- @include modifiers(color);
847
-
848
895
  &:first-child{
849
- flex: 0;
896
+ flex-grow: 0;
897
+ flex-basis: 12%;
850
898
  background-color: $card-secondary-bg;
851
- }
852
- }
853
- }
899
+ position: relative;
854
900
 
855
- &.card--widget__list{
856
- @extend .card--list;
901
+ > div{
902
+ display: flex;
903
+ flex-direction: column;
904
+ align-items: center;
857
905
 
858
- .card--list__item{
859
- padding-left: $global-padding;
860
-
861
- > :first-child{
862
- flex-grow: 0;
863
- flex-shrink: 0;
906
+ @include absolute-center;
907
+ }
864
908
  }
865
909
  }
866
910
  }
@@ -10,6 +10,22 @@
10
10
  display: none;
11
11
  }
12
12
  }
13
+
14
+ .collapsible-list__see-more{
15
+ display: inline-block;
16
+ }
17
+
18
+ .collapsible-list__see-less{
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ .collapsible-list__see-less{
24
+ display: inline-block;
25
+ }
26
+
27
+ .collapsible-list__see-more{
28
+ display: none;
13
29
  }
14
30
 
15
31
  > *{
@@ -18,6 +18,33 @@
18
18
  display: block;
19
19
  }
20
20
  }
21
+
22
+ &.expanded{
23
+ display: flex;
24
+ justify-content: space-between;
25
+
26
+ > :first-child{
27
+ flex: 1 1 80%;
28
+ min-width: 0;
29
+
30
+ div{
31
+ display: inline;
32
+
33
+ @include ellipsis();
34
+
35
+ .author__name{
36
+ // Allow the ellipsis, otherwise it's not shown
37
+ display: inherit;
38
+ }
39
+ }
40
+ }
41
+
42
+ > :last-child{
43
+ flex: 1 0 40%;
44
+ }
45
+
46
+ @include flexgap(.5rem);
47
+ }
21
48
  }
22
49
 
23
50
  .definition-data__item--double{