blacklight-spotlight 3.0.0.alpha.10 → 3.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (339) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/images/blacklight/arrow-alt-circle-left.svg +1 -0
  4. data/app/assets/images/blacklight/arrow-alt-circle-right.svg +1 -0
  5. data/app/assets/images/blacklight/close.svg +1 -0
  6. data/app/assets/images/blacklight/zoom_in.svg +1 -0
  7. data/app/assets/images/blacklight/zoom_out.svg +1 -0
  8. data/app/assets/javascripts/spotlight/admin/{add_new_page_button.js → add_new_button.js} +7 -0
  9. data/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +4 -4
  10. data/app/assets/javascripts/spotlight/admin/blocks/browse_group_categories_block.js +88 -0
  11. data/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +1 -1
  12. data/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +1 -1
  13. data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +8 -1
  14. data/app/assets/javascripts/spotlight/admin/catalog_edit.js +13 -47
  15. data/app/assets/javascripts/spotlight/admin/crop.es6 +6 -0
  16. data/app/assets/javascripts/spotlight/admin/croppable.js +1 -1
  17. data/app/assets/javascripts/spotlight/admin/exhibit_tag_autocomplete.js +37 -0
  18. data/app/assets/javascripts/spotlight/admin/index.js +0 -2
  19. data/app/assets/javascripts/spotlight/admin/{reindex_monitor.js → progress_monitor.js} +26 -4
  20. data/app/assets/javascripts/spotlight/admin/search_typeahead.js +2 -2
  21. data/app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js +21 -12
  22. data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +9 -2
  23. data/app/assets/javascripts/spotlight/user/browse_group_categories.js +59 -0
  24. data/app/assets/javascripts/spotlight/user/index.js +1 -0
  25. data/app/assets/javascripts/spotlight/user/zpr_links.js.erb +29 -14
  26. data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +8 -0
  27. data/app/assets/stylesheets/spotlight/_browse.scss +8 -0
  28. data/app/assets/stylesheets/spotlight/_catalog.scss +34 -8
  29. data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +9 -0
  30. data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +211 -83
  31. data/app/assets/stylesheets/spotlight/_item_text_block.scss +6 -0
  32. data/app/assets/stylesheets/spotlight/_modals.scss +3 -0
  33. data/app/assets/stylesheets/spotlight/_nestable.scss +8 -0
  34. data/app/assets/stylesheets/spotlight/_pages.scss +9 -4
  35. data/app/assets/stylesheets/spotlight/_report_a_problem.scss +5 -2
  36. data/app/assets/stylesheets/spotlight/_spotlight.scss +4 -0
  37. data/app/assets/stylesheets/spotlight/_translations.scss +6 -0
  38. data/app/assets/stylesheets/spotlight/_view_larger.scss +22 -0
  39. data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +92 -0
  40. data/app/assets/stylesheets/spotlight/typeahead.css +23 -23
  41. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +5 -4
  42. data/app/controllers/concerns/spotlight/catalog.rb +7 -1
  43. data/app/controllers/concerns/spotlight/search_helper.rb +2 -8
  44. data/app/controllers/spotlight/appearances_controller.rb +0 -13
  45. data/app/controllers/spotlight/browse_controller.rb +12 -3
  46. data/app/controllers/spotlight/bulk_actions_controller.rb +62 -0
  47. data/app/controllers/spotlight/bulk_updates_controller.rb +67 -0
  48. data/app/controllers/spotlight/catalog_controller.rb +10 -9
  49. data/app/controllers/spotlight/concerns/application_controller.rb +13 -2
  50. data/app/controllers/spotlight/dashboards_controller.rb +2 -1
  51. data/app/controllers/spotlight/exhibits_controller.rb +1 -1
  52. data/app/controllers/spotlight/featured_images_controller.rb +1 -1
  53. data/app/controllers/spotlight/groups_controller.rb +80 -0
  54. data/app/controllers/spotlight/job_trackers_controller.rb +17 -0
  55. data/app/controllers/spotlight/pages_controller.rb +5 -8
  56. data/app/controllers/spotlight/resources/csv_upload_controller.rb +1 -1
  57. data/app/controllers/spotlight/searches_controller.rb +4 -17
  58. data/app/controllers/spotlight/tags_controller.rb +39 -5
  59. data/app/helpers/spotlight/application_helper.rb +21 -2
  60. data/app/helpers/spotlight/crud_link_helpers.rb +1 -1
  61. data/app/helpers/spotlight/job_trackers_helper.rb +31 -0
  62. data/app/helpers/spotlight/main_app_helpers.rb +1 -1
  63. data/app/helpers/spotlight/pages_helper.rb +1 -8
  64. data/app/helpers/spotlight/roles_helper.rb +1 -1
  65. data/app/jobs/concerns/spotlight/gather_documents.rb +35 -0
  66. data/app/jobs/concerns/spotlight/job_tracking.rb +64 -0
  67. data/app/jobs/concerns/spotlight/limit_concurrency.rb +33 -0
  68. data/app/jobs/spotlight/add_tags_job.rb +31 -0
  69. data/app/jobs/spotlight/add_uploads_from_csv.rb +32 -6
  70. data/app/jobs/spotlight/application_job.rb +8 -0
  71. data/app/jobs/spotlight/change_visibility_job.rb +33 -0
  72. data/app/jobs/spotlight/cleanup_job_trackers_job.rb +13 -0
  73. data/app/jobs/spotlight/default_thumbnail_job.rb +1 -3
  74. data/app/jobs/spotlight/process_bulk_updates_csv_job.rb +82 -0
  75. data/app/jobs/spotlight/reindex_exhibit_job.rb +39 -0
  76. data/app/jobs/spotlight/reindex_job.rb +64 -44
  77. data/app/jobs/spotlight/remove_tags_job.rb +31 -0
  78. data/app/jobs/spotlight/rename_sidecar_field_job.rb +3 -2
  79. data/app/jobs/spotlight/rename_tags_job.rb +33 -0
  80. data/app/jobs/spotlight/update_job_trackers_job.rb +20 -0
  81. data/app/mailers/spotlight/indexing_complete_mailer.rb +3 -2
  82. data/app/models/concerns/spotlight/exhibit_analytics.rb +2 -6
  83. data/app/models/concerns/spotlight/exhibit_defaults.rb +1 -1
  84. data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
  85. data/app/models/concerns/spotlight/resources/web.rb +1 -1
  86. data/app/models/concerns/spotlight/solr_document.rb +1 -1
  87. data/app/models/concerns/spotlight/solr_document/atomic_updates.rb +2 -2
  88. data/app/models/concerns/spotlight/user.rb +7 -2
  89. data/app/models/sir_trevor_rails/blocks/browse_group_categories_block.rb +25 -0
  90. data/app/models/sir_trevor_rails/blocks/uploaded_items_block.rb +4 -0
  91. data/app/models/spotlight/ability.rb +8 -2
  92. data/app/models/spotlight/about_page.rb +1 -1
  93. data/app/models/spotlight/attachment.rb +1 -1
  94. data/app/models/spotlight/background_job_progress.rb +96 -0
  95. data/app/models/spotlight/blacklight_configuration.rb +19 -7
  96. data/app/models/spotlight/bulk_update.rb +8 -0
  97. data/app/models/spotlight/contact.rb +1 -1
  98. data/app/models/spotlight/custom_field.rb +3 -3
  99. data/app/models/spotlight/event.rb +13 -0
  100. data/app/models/spotlight/exhibit.rb +15 -12
  101. data/app/models/spotlight/feature_page.rb +1 -3
  102. data/app/models/spotlight/featured_image.rb +9 -3
  103. data/app/models/spotlight/field_metadata.rb +4 -8
  104. data/app/models/spotlight/group.rb +22 -0
  105. data/app/models/spotlight/group_member.rb +11 -0
  106. data/app/models/spotlight/home_page.rb +1 -1
  107. data/app/models/spotlight/job_tracker.rb +114 -0
  108. data/app/models/spotlight/page.rb +3 -5
  109. data/app/models/spotlight/page_configurations.rb +6 -0
  110. data/app/models/spotlight/page_content.rb +2 -0
  111. data/app/models/spotlight/resource.rb +28 -62
  112. data/app/models/spotlight/resources/csv_upload.rb +2 -1
  113. data/app/models/spotlight/resources/iiif_harvester.rb +12 -3
  114. data/app/models/spotlight/resources/iiif_manifest.rb +11 -7
  115. data/app/models/spotlight/resources/iiif_service.rb +9 -2
  116. data/app/models/spotlight/resources/json_upload.rb +12 -0
  117. data/app/models/spotlight/resources/upload.rb +25 -2
  118. data/app/models/spotlight/role.rb +1 -2
  119. data/app/models/spotlight/search.rb +5 -0
  120. data/app/models/spotlight/solr_document_sidecar.rb +2 -1
  121. data/app/presenters/spotlight/iiif_manifest_presenter.rb +1 -1
  122. data/app/services/spotlight/bulk_updates_csv_template_service.rb +93 -0
  123. data/app/services/spotlight/etl.rb +7 -0
  124. data/app/services/spotlight/etl/context.rb +52 -0
  125. data/app/services/spotlight/etl/executor.rb +192 -0
  126. data/app/services/spotlight/etl/loaders.rb +12 -0
  127. data/app/services/spotlight/etl/pipeline.rb +81 -0
  128. data/app/services/spotlight/etl/solr_loader.rb +96 -0
  129. data/app/services/spotlight/etl/sources.rb +25 -0
  130. data/app/services/spotlight/etl/step.rb +82 -0
  131. data/app/services/spotlight/etl/transforms.rb +64 -0
  132. data/app/services/spotlight/exhibit_import_export_service.rb +50 -22
  133. data/app/services/spotlight/iiif_resource_resolver.rb +1 -1
  134. data/app/services/spotlight/validity_checker.rb +5 -5
  135. data/app/uploaders/spotlight/bulk_updates_uploader.rb +7 -0
  136. data/app/uploaders/spotlight/featured_image_uploader.rb +1 -1
  137. data/app/values/custom_field_name.rb +1 -0
  138. data/app/views/catalog/_add_tags.html.erb +28 -0
  139. data/app/views/catalog/_bulk_actions.html.erb +12 -0
  140. data/app/views/catalog/_change_visibility.html.erb +35 -0
  141. data/app/views/catalog/_curator_actions.html.erb +3 -0
  142. data/app/views/catalog/_remove_tags.html.erb +37 -0
  143. data/app/views/spotlight/about_pages/_empty.html.erb +5 -5
  144. data/app/views/spotlight/browse/_search.html.erb +2 -1
  145. data/app/views/spotlight/browse/index.html.erb +13 -0
  146. data/app/views/spotlight/bulk_updates/_download.html.erb +23 -0
  147. data/app/views/spotlight/bulk_updates/_overview.html.erb +1 -0
  148. data/app/views/spotlight/bulk_updates/_progress_panel.html.erb +19 -0
  149. data/app/views/spotlight/bulk_updates/_upload.html.erb +12 -0
  150. data/app/views/spotlight/bulk_updates/edit.html.erb +37 -0
  151. data/app/views/spotlight/catalog/_admin_header.html.erb +1 -1
  152. data/app/views/spotlight/catalog/_document.html.erb +2 -4
  153. data/app/views/spotlight/catalog/_edit_default.html.erb +2 -2
  154. data/app/views/spotlight/catalog/_reindex_progress_panel.html.erb +1 -1
  155. data/app/views/spotlight/catalog/index.iiif_json.jbuilder +22 -0
  156. data/app/views/spotlight/contacts/_form.html.erb +1 -1
  157. data/app/views/spotlight/custom_fields/_form.html.erb +1 -1
  158. data/app/views/spotlight/custom_search_fields/_form.html.erb +1 -1
  159. data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +6 -6
  160. data/app/views/spotlight/exhibits/_exhibit_card.html.erb +1 -1
  161. data/app/views/spotlight/feature_pages/_empty.html.erb +5 -5
  162. data/app/views/spotlight/featured_images/_form.html.erb +1 -1
  163. data/app/views/spotlight/featured_images/_upload_form.html.erb +1 -1
  164. data/app/views/spotlight/home_pages/_empty.html.erb +3 -3
  165. data/app/views/spotlight/indexing_complete_mailer/documents_indexed.html.erb +9 -0
  166. data/app/views/spotlight/job_trackers/show.html.erb +79 -0
  167. data/app/views/spotlight/pages/_form.html.erb +3 -3
  168. data/app/views/spotlight/resources/_form.html.erb +1 -1
  169. data/app/views/spotlight/resources/csv_upload/_form.html.erb +1 -1
  170. data/app/views/spotlight/resources/iiif/_form.html.erb +1 -1
  171. data/app/views/spotlight/resources/json_upload/_form.html.erb +2 -2
  172. data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
  173. data/app/views/spotlight/searches/_form.html.erb +12 -0
  174. data/app/views/spotlight/searches/_group.html.erb +27 -0
  175. data/app/views/spotlight/searches/index.html.erb +58 -17
  176. data/app/views/spotlight/shared/_curation_sidebar.html.erb +3 -0
  177. data/app/views/spotlight/shared/_honeypot_field.html.erb +4 -0
  178. data/app/views/spotlight/shared/_locale_picker.html.erb +1 -1
  179. data/app/views/spotlight/shared/_report_a_problem.html.erb +7 -10
  180. data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +45 -0
  181. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +3 -3
  182. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +2 -2
  183. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +2 -2
  184. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +2 -2
  185. data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +4 -0
  186. data/app/views/spotlight/tags/_tag.html.erb +24 -0
  187. data/app/views/spotlight/tags/index.html.erb +12 -16
  188. data/app/views/spotlight/translations/_groups.html.erb +34 -0
  189. data/app/views/spotlight/translations/_import.html.erb +5 -5
  190. data/app/views/spotlight/translations/edit.html.erb +6 -0
  191. data/app/views/spotlight/translations/show.yaml.yamlbuilder +6 -0
  192. data/config/i18n-tasks.yml +8 -0
  193. data/config/locales/spotlight.ar.yml +32 -18
  194. data/config/locales/spotlight.en.yml +296 -93
  195. data/config/routes.rb +38 -1
  196. data/db/migrate/20210113092223_create_spotlight_groups.rb +23 -0
  197. data/db/migrate/20210122082032_create_job_trackers.rb +22 -0
  198. data/db/migrate/20210126123041_create_events.rb +15 -0
  199. data/db/migrate/20210305070001_remove_class_from_sirtrevor_image_blocks.rb +20 -0
  200. data/db/migrate/20210305171150_create_bulk_updates.rb +9 -0
  201. data/lib/generators/spotlight/install_generator.rb +23 -2
  202. data/lib/generators/spotlight/scaffold_resource_generator.rb +5 -13
  203. data/lib/generators/spotlight/templates/config/initializers/riiif.rb +7 -5
  204. data/lib/generators/spotlight/templates/config/initializers/sir_trevor_rails.rb +10 -0
  205. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +3 -1
  206. data/lib/generators/spotlight/templates/solr/config/schema.xml +1 -1
  207. data/lib/migration/iiif.rb +3 -3
  208. data/lib/spotlight/engine.rb +29 -4
  209. data/lib/spotlight/upload_field_config.rb +1 -0
  210. data/lib/spotlight/version.rb +1 -1
  211. data/spec/controllers/spotlight/about_pages_controller_spec.rb +3 -3
  212. data/spec/controllers/spotlight/browse_controller_spec.rb +24 -1
  213. data/spec/controllers/spotlight/bulk_actions_controller_spec.rb +124 -0
  214. data/spec/controllers/spotlight/bulk_updates_controller_spec.rb +77 -0
  215. data/spec/controllers/spotlight/catalog_controller_spec.rb +15 -13
  216. data/spec/controllers/spotlight/contacts_controller_spec.rb +2 -2
  217. data/spec/controllers/spotlight/feature_pages_controller_spec.rb +11 -0
  218. data/spec/controllers/spotlight/featured_images_controller_spec.rb +3 -3
  219. data/spec/controllers/spotlight/groups_controller_spec.rb +103 -0
  220. data/spec/controllers/spotlight/home_pages_controller_spec.rb +1 -1
  221. data/spec/controllers/spotlight/job_trackers_controller_spec.rb +37 -0
  222. data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +4 -4
  223. data/spec/controllers/spotlight/searches_controller_spec.rb +10 -3
  224. data/spec/controllers/spotlight/tags_controller_spec.rb +5 -1
  225. data/spec/controllers/spotlight/view_configurations_controller_spec.rb +1 -1
  226. data/spec/examples.txt +1500 -125
  227. data/spec/factories/bulk_updates.rb +15 -0
  228. data/spec/factories/exhibits.rb +4 -0
  229. data/spec/factories/group.rb +17 -0
  230. data/spec/factories/job_trackers.rb +11 -0
  231. data/spec/factories/searches.rb +11 -1
  232. data/spec/factories/users.rb +27 -8
  233. data/spec/features/add_contacts_spec.rb +1 -1
  234. data/spec/features/add_items_spec.rb +10 -5
  235. data/spec/features/browse_category_admin_spec.rb +39 -7
  236. data/spec/features/browse_category_navigation_spec.rb +44 -0
  237. data/spec/features/browse_category_spec.rb +2 -2
  238. data/spec/features/bulk_actions_spec.rb +72 -0
  239. data/spec/features/catalog_spec.rb +3 -2
  240. data/spec/features/create_exhibit_spec.rb +5 -4
  241. data/spec/features/dashboard_spec.rb +7 -7
  242. data/spec/features/edit_search_fields_spec.rb +2 -2
  243. data/spec/features/exhibits/administration_spec.rb +3 -3
  244. data/spec/features/exhibits/edit_metadata_fields_spec.rb +1 -1
  245. data/spec/features/exhibits/language_create_edit_spec.rb +3 -3
  246. data/spec/features/exhibits/translation_editing_spec.rb +55 -6
  247. data/spec/features/home_page_spec.rb +5 -5
  248. data/spec/features/import_exhibit_spec.rb +5 -1
  249. data/spec/features/item_admin_spec.rb +4 -4
  250. data/spec/features/javascript/about_page_admin_spec.rb +1 -1
  251. data/spec/features/javascript/block_controls_spec.rb +3 -1
  252. data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +64 -0
  253. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +3 -3
  254. data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +27 -1
  255. data/spec/features/javascript/browse_group_admin_spec.rb +45 -0
  256. data/spec/features/javascript/edit_in_place_spec.rb +3 -3
  257. data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
  258. data/spec/features/javascript/reindex_monitor_spec.rb +1 -1
  259. data/spec/features/javascript/search_config_admin_spec.rb +1 -1
  260. data/spec/features/report_a_problem_spec.rb +6 -5
  261. data/spec/features/site_users_management_spec.rb +5 -5
  262. data/spec/fixtures/bulk-update-template.csv +57 -0
  263. data/spec/fixtures/updated-bulk-update-template-w-tags.csv +4 -0
  264. data/spec/fixtures/updated-bulk-update-template.csv +4 -0
  265. data/spec/helpers/spotlight/application_helper_spec.rb +0 -1
  266. data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -3
  267. data/spec/helpers/spotlight/pages_helper_spec.rb +10 -17
  268. data/spec/helpers/spotlight/roles_helper_spec.rb +1 -1
  269. data/spec/i18n_spec.rb +1 -0
  270. data/spec/jobs/spotlight/add_tags_job_spec.rb +34 -0
  271. data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +16 -1
  272. data/spec/jobs/spotlight/change_visibility_job_spec.rb +30 -0
  273. data/spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb +78 -0
  274. data/spec/jobs/spotlight/reindex_exhibit_job_spec.rb +43 -0
  275. data/spec/jobs/spotlight/reindex_job_spec.rb +34 -60
  276. data/spec/jobs/spotlight/remove_tags_job_spec.rb +39 -0
  277. data/spec/lib/migration/iiif_spec.rb +1 -1
  278. data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +11 -1
  279. data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +41 -0
  280. data/spec/models/solr_document_spec.rb +2 -3
  281. data/spec/models/spotlight/ability_spec.rb +27 -0
  282. data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +1 -0
  283. data/spec/models/spotlight/background_job_progress_spec.rb +137 -0
  284. data/spec/models/spotlight/blacklight_configuration_spec.rb +8 -3
  285. data/spec/models/spotlight/exhibit_spec.rb +13 -59
  286. data/spec/models/spotlight/featured_image_spec.rb +1 -2
  287. data/spec/models/spotlight/group_spec.rb +19 -0
  288. data/spec/models/spotlight/main_navigation_spec.rb +1 -1
  289. data/spec/models/spotlight/resource_spec.rb +89 -87
  290. data/spec/models/spotlight/resources/iiif_harvester_spec.rb +9 -10
  291. data/spec/models/spotlight/role_spec.rb +3 -3
  292. data/spec/models/spotlight/search_spec.rb +30 -3
  293. data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +10 -0
  294. data/spec/models/spotlight/solr_document_sidecar_spec.rb +1 -0
  295. data/spec/services/spotlight/bulk_updates_csv_template_service_spec.rb +26 -0
  296. data/spec/services/spotlight/etl/context_spec.rb +66 -0
  297. data/spec/services/spotlight/etl/executor_spec.rb +149 -0
  298. data/spec/services/spotlight/etl/pipeline_spec.rb +22 -0
  299. data/spec/services/spotlight/etl/solr_loader_spec.rb +76 -0
  300. data/spec/services/spotlight/etl/step_spec.rb +70 -0
  301. data/spec/services/spotlight/exhibit_import_export_service_spec.rb +62 -3
  302. data/spec/services/spotlight/iiif_resource_resolver_spec.rb +1 -1
  303. data/spec/spec_helper.rb +3 -6
  304. data/spec/support/features/test_features_helpers.rb +15 -0
  305. data/spec/test_app_templates/Gemfile.extra +2 -3
  306. data/spec/test_app_templates/catalog_controller.rb +6 -3
  307. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  308. data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +2 -2
  309. data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +1 -1
  310. data/spec/views/spotlight/browse/index.html.erb_spec.rb +2 -0
  311. data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +1 -1
  312. data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +1 -1
  313. data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +30 -25
  314. data/spec/views/spotlight/job_trackers/show.html.erb_spec.rb +65 -0
  315. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -3
  316. data/spec/views/spotlight/pages/show.html.erb_spec.rb +1 -0
  317. data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +1 -1
  318. data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +7 -8
  319. data/spec/views/spotlight/tags/index.html.erb_spec.rb +5 -2
  320. data/vendor/assets/javascripts/leaflet-iiif.js +46 -21
  321. data/vendor/assets/javascripts/tiny-slider.js +3218 -0
  322. data/vendor/assets/stylesheets/tiny-slider.css +1 -0
  323. metadata +511 -296
  324. data/app/assets/images/blacklight/add_circle.svg +0 -1
  325. data/app/assets/images/blacklight/custom_fullscreen.svg +0 -1
  326. data/app/assets/images/blacklight/remove_circle.svg +0 -1
  327. data/app/assets/images/blacklight/resize_small.svg +0 -1
  328. data/app/models/concerns/spotlight/resources/open_graph.rb +0 -36
  329. data/app/models/spotlight/reindex_progress.rb +0 -78
  330. data/app/models/spotlight/reindexing_log_entry.rb +0 -42
  331. data/app/services/spotlight/resources/iiif_builder.rb +0 -19
  332. data/app/services/spotlight/solr_document_builder.rb +0 -76
  333. data/app/services/spotlight/upload_solr_document_builder.rb +0 -57
  334. data/spec/factories/reindexing_log_entries.rb +0 -54
  335. data/spec/models/spotlight/reindex_progress_spec.rb +0 -122
  336. data/spec/models/spotlight/reindexing_log_entry_spec.rb +0 -129
  337. data/spec/models/spotlight/resources/open_graph_spec.rb +0 -65
  338. data/spec/services/spotlight/solr_document_builder_spec.rb +0 -66
  339. data/vendor/assets/javascripts/handlebars-v1.3.0.js +0 -2746
@@ -9,9 +9,16 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
9
9
  item_counts: "Include item counts?"
10
10
  },
11
11
 
12
+ browse_group_categories: {
13
+ autocomplete: "Enter a browse group title...",
14
+ title: "Browse Group Categories",
15
+ description: "This widget displays all browse categories associated with a selected browse group as a horizontally-scrolling row. Each selected browse group is displayed as a separate row. Each displayed category in a group links to the corresponding browse category results page.",
16
+ item_counts: "Include category item counts?"
17
+ },
18
+
12
19
  link_to_search: {
13
20
  title: "Saved Searches",
14
- description: "This widget highlights saved searches. Each highlighted saved search links to the search results page generated by the saved search parameters. Any saved search listed on the Curation > Browse Categories page, whether published or not, can be highlighted as a saved search.",
21
+ description: "This widget highlights saved searches. Each highlighted saved search links to the search results page generated by the saved search parameters. Any saved search listed on the Curation > Browse categories page, whether published or not, can be highlighted as a saved search.",
15
22
  item_counts: "Include item counts?"
16
23
  },
17
24
 
@@ -65,7 +72,7 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
65
72
  secondary: "Secondary caption"
66
73
  },
67
74
  zpr: {
68
- title: 'Display ZPR link'
75
+ title: 'Offer "View larger" option'
69
76
  }
70
77
  },
71
78
 
@@ -0,0 +1,59 @@
1
+ (function( $ ){
2
+
3
+ $.fn.browseGroupCategories = function( options ) {
4
+ // Create some defaults, extending them with any options that were provided
5
+ var settings = $.extend( { }, options);
6
+ var $container, slider;
7
+
8
+ function init() {
9
+ var data = $container.data();
10
+ var sidebar = $container.data().sidebar;
11
+ var items = data.browseGroupCategoriesCount;
12
+ var dir = $('html').attr('dir');
13
+ var controls = $container.parent().find('.browse-group-categories-controls')[0];
14
+
15
+ slider = tns({
16
+ container: $container[0],
17
+ controlsContainer: controls,
18
+ loop: false,
19
+ nav: false,
20
+ items: 1,
21
+ slideBy: 'page',
22
+ textDirection: dir,
23
+ responsive: {
24
+ 576: {
25
+ items: itemCount(items, sidebar)
26
+ }
27
+ }
28
+ });
29
+ }
30
+
31
+ // Destroy the slider instance, as tns will change the dom elements, causing some issues with turbolinks
32
+ function setupDestroy() {
33
+ document.addEventListener('turbolinks:before-cache', function() {
34
+ if (slider && slider.destroy) {
35
+ slider.destroy();
36
+ }
37
+ });
38
+ }
39
+
40
+ function itemCount(items, sidebar) {
41
+ if (items < 3) {
42
+ return items;
43
+ }
44
+ return sidebar ? 3 : 4;
45
+ }
46
+
47
+ return this.each(function() {
48
+ $container = $(this);
49
+ init();
50
+ setupDestroy();
51
+ });
52
+ }
53
+ })( jQuery );
54
+
55
+ Spotlight.onLoad(function() {
56
+ $('[data-browse-group-categories-carousel]').each(function(i, el) {
57
+ $(el).browseGroupCategories();
58
+ });
59
+ });
@@ -4,4 +4,5 @@
4
4
  //= require bootstrap/tooltip
5
5
  //= require bootstrap/popover
6
6
  //= require bootstrap/carousel
7
+ //= require tiny-slider
7
8
  //= require_tree .
@@ -1,29 +1,44 @@
1
1
  Spotlight.onLoad(function(){
2
2
  $('.zpr-link').on('click', function() {
3
- $('#blacklight-modal .modal-content').html('<div id="osd-modal-container"></div>');
3
+ var modalDialog = $('#blacklight-modal .modal-dialog');
4
+ var modalContent = modalDialog.find('.modal-content')
5
+ modalDialog.removeClass('modal-lg')
6
+ modalDialog.addClass('modal-xl')
7
+ modalContent.html('<div id="osd-modal-container"></div>');
4
8
  var controls = [
5
- '<div class="controls">',
6
- ' <a id="osd-zoom-in"><%= Blacklight::Icon.new('add_circle').file_source.strip %></a>',
7
- ' <a id="osd-zoom-out"><%= Blacklight::Icon.new('remove_circle').file_source.strip %></a>',
8
- ' <a id="osd-home"><%= Blacklight::Icon.new('resize_small').file_source.strip %></a>',
9
- ' <a id="osd-full-page"><%= Blacklight::Icon.new('custom_fullscreen').file_source.strip %></a>',
9
+ '<div class="controls d-flex justify-content-center justify-content-md-end">',
10
+ ' <div class="custom-close-controls pr-3 pt-3">',
11
+ ' <button type="button" class="btn btn-dark" data-dismiss="modal" aria-hidden="true"><%= Blacklight::Icon.new('close').file_source.strip %></button>',
12
+ ' </div>',
13
+ ' <div class="zoom-controls mb-3 mr-md-3">',
14
+ ' <button id="osd-zoom-in" type="button" class="btn btn-dark"><%= Blacklight::Icon.new('zoom_in').file_source.strip %></button>',
15
+ ' <button id="osd-zoom-out" type="button" class="btn btn-dark"><%= Blacklight::Icon.new('zoom_out').file_source.strip %></button>',
16
+ ' </div>',
17
+ ' <div id="empty-div-required-by-osd"></div>',
10
18
  '</div>'
11
19
  ].join("\n");
12
20
 
13
- $('#osd-modal-container').append(controls);
21
+
14
22
  $('#osd-modal-container').append('<div id="osd-div"></div>');
15
- $('#osd-div').css('height', '400px');
23
+ $('#osd-modal-container').append(controls);
16
24
 
17
25
  $('#blacklight-modal').modal('show');
26
+
27
+ $('#blacklight-modal').one('hidden.bs.modal', function (event) {
28
+ modalDialog.removeClass('modal-xl')
29
+ modalDialog.addClass('modal-lg')
30
+ });
18
31
 
19
32
  OpenSeadragon({
20
33
  id: 'osd-div',
21
- zoomInButton: "osd-zoom-in",
22
- zoomOutButton: "osd-zoom-out",
23
- homeButton: "osd-home",
24
- fullPageButton: "osd-full-page",
25
- nextButton: "osd-next",
26
- previousButton: "osd-previous",
34
+ zoomInButton: "osd-zoom-in",
35
+ zoomOutButton: "osd-zoom-out",
36
+ // This is a hack where OpenSeadragon (if using mapped buttons) requires you
37
+ // to map all of the buttons.
38
+ homeButton: "empty-div-required-by-osd",
39
+ fullPageButton: "empty-div-required-by-osd",
40
+ nextButton: "empty-div-required-by-osd",
41
+ previousButton: "empty-div-required-by-osd",
27
42
  tileSources: [$(this).data('iiif-tilesource')]
28
43
  })
29
44
  });
@@ -0,0 +1,8 @@
1
+ .breadcrumb-item {
2
+ .truncated-value {
3
+ overflow: hidden;
4
+ text-overflow: ellipsis;
5
+ white-space: nowrap;
6
+ width: 30ex;
7
+ }
8
+ }
@@ -38,6 +38,14 @@ $image-overlay-max-height: 300px;
38
38
  }
39
39
  }
40
40
 
41
+ #main-container .browse-group-navigation.nav {
42
+ margin-bottom: $spacer;
43
+
44
+ .nav-link {
45
+ margin-bottom: $spacer * .75;
46
+ }
47
+ }
48
+
41
49
  .browse-landing {
42
50
  text-align: center;
43
51
  // Placeholder for vertically alignment - might already be available from use in another feature
@@ -73,7 +73,6 @@ form.edit_solr_document {
73
73
  .bootstrap-tagsinput {
74
74
  @extend .clearfix;
75
75
  cursor: text;
76
- display: block;
77
76
  }
78
77
  .bg-warning.form-text {
79
78
  font-size: 0.9em;
@@ -82,6 +81,7 @@ form.edit_solr_document {
82
81
  }
83
82
 
84
83
  .bootstrap-tagsinput {
84
+ display: block;
85
85
  .twitter-typeahead {
86
86
  width: auto;
87
87
  }
@@ -117,19 +117,45 @@ form.edit_solr_document {
117
117
  @extend .clearfix;
118
118
  }
119
119
 
120
- #save-this-search {
121
- float:left;
122
- margin-right: $spacer * 0.1;
120
+ #sortAndPerPage {
121
+ align-items: flex-end;
123
122
  }
124
123
 
125
- #document {
126
- dd.blacklight-exhibit_tags {
127
- color: $body-bg;
128
- line-height: 2em;
124
+ .search-widgets {
125
+ align-items: flex-start;
126
+ display: flex;
127
+ @media (min-width: breakpoint-min("md")) {
128
+ justify-content: flex-end;
129
129
  }
130
+ flex-wrap: wrap;
131
+ width: 60%;
132
+ margin-left: -1 * $spacer * 0.1;
130
133
 
134
+ .btn, .btn-group {
135
+ margin-left: $spacer * 0.1;
136
+ margin-top: $spacer * 0.25;
137
+ }
138
+ }
139
+
140
+ .curator-actions {
141
+ align-items: flex-start;
142
+ display: flex;
143
+ @media (min-width: breakpoint-min("md")) {
144
+ justify-content: flex-end;
145
+ }
146
+ order: -1;
147
+ width: 100%;
148
+ margin-left: -1 * $spacer * 0.1;
149
+ }
150
+
151
+ #document,
152
+ .document {
131
153
  .blacklight-exhibit_tags a {
132
154
  @extend .badge;
133
155
  @extend .badge-secondary;
156
+
157
+ &:not(:last-child) {
158
+ @extend .mr-2;
159
+ }
134
160
  }
135
161
  }
@@ -70,3 +70,12 @@
70
70
  display: inline;
71
71
  }
72
72
  }
73
+
74
+ .download-csv {
75
+ align-items: flex-end;
76
+ display: flex;
77
+
78
+ .btn-primary {
79
+ margin-bottom: $spacer;
80
+ }
81
+ }
@@ -1,141 +1,269 @@
1
1
  $featured-browse-category-border-color: $border-color;
2
2
  $featured-browse-category-caption-color: $white;
3
- $container-tablet: 720px;
4
- $container-desktop: 960px;
5
- $container-large-desktop: 1140px;
6
- // Large desktop
7
- $featured-browse-category-margin-large-desktop: 15px;
8
- $no-sidebar-large-desktop-large-image-width: floor(($container-large-desktop)/ 3) - $featured-browse-category-margin-large-desktop;
9
- $no-sidebar-large-desktop-medium-image-width: floor(($container-large-desktop)/ 5) - $featured-browse-category-margin-large-desktop;
10
-
11
- $with-sidebar-large-desktop-width: floor($container-large-desktop - ($container-large-desktop)/ 4); // sidebar space to remove
12
- $with-sidebar-large-desktop-large-image-width: floor(($with-sidebar-large-desktop-width)/ 2) - ($featured-browse-category-margin-large-desktop * 2);
13
- $with-sidebar-large-desktop-medium-image-width: 265px;
14
-
15
- // Desktop
16
- $featured-browse-category-margin-desktop: 20px;
17
- $no-sidebar-desktop-large-image-width: floor(($container-desktop)/ 3) - $featured-browse-category-margin-desktop;
18
-
19
- $with-sidebar-desktop-width: floor($container-desktop - ($container-desktop)/ 4); // sidebar space to remove
20
- $with-sidebar-desktop-large-image-width: floor(($with-sidebar-desktop-width)/ 2) - ($featured-browse-category-margin-desktop * 2);
21
- $with-sidebar-desktop-medium-image-width: floor(($with-sidebar-desktop-width)/ 3) - ($featured-browse-category-margin-desktop);
22
-
23
- // Tablet
24
- $featured-browse-category-margin-tablet: 20px;
25
- $no-sidebar-tablet-large-image-width: floor(($container-tablet)/ 3) - $featured-browse-category-margin-tablet;
26
- $with-sidebar-tablet-large-image-width: floor(($container-tablet)/ 2) - ($featured-browse-category-margin-tablet * 2);
27
-
28
- // Extra small
29
- $no-sidebar-xs-image-width: 190px;
30
- $with-sidebar-xs-image-width: $no-sidebar-xs-image-width;
31
-
32
- // Height adjustments
33
- $aspect-ratio-factor-large-image: 0.75; // 4:3 width:height
34
- $aspect-ratio-factor-medium-image: 1; // 1:1 width: height
3
+
4
+ // These are the widths of the main content area at each viewport width
5
+ $container-sm: 510px; // (Bootstrap 4 "sm")
6
+ $container-md: 690px; // (Bootstrap 4 "md")
7
+ $container-lg: 930px; // (Bootstrap 4 "lg")
8
+ $container-xl: 1100px; // (Bootstrap 4 "xl")
9
+ $container-xl-sidebar: 825px; // ("xl" main content area when sidebar present)
10
+
11
+ // The aspect ratio factor determines the height of the tile.
12
+ // Can use different values because images are background images
13
+ // and will fit the container without distortion.
14
+ $aspect-ratio-factor-4x3: 0.75; // 4:3 width:height
15
+ $aspect-ratio-factor-1x1: 1; // 1:1 width: height
16
+
17
+ // Horizontal space between tiles
18
+ $tile-margin: 16px;
19
+
20
+ // Limits size of tile in cases where calculations create unreasonably large tile
21
+ $maximum-tile-width: 290px;
22
+
23
+ // `xs` viewport width; always display one full-width tile, wrapping others
24
+ $xs-one-tile-width: $maximum-tile-width;
25
+
26
+ // `sm` viewport width
27
+ $sm-one-tile-width: $xs-one-tile-width;
28
+ $sm-two-tile-width: ($container-sm / 2) - $tile-margin;
29
+ $sm-three-tile-width: ($container-sm / 3) - $tile-margin;
30
+
31
+ // `md` viewport width
32
+ $md-one-tile-width: $xs-one-tile-width;
33
+ $md-two-tile-width: ($container-md/ 2) - $tile-margin;
34
+ $md-three-tile-width: ($container-md / 3) - $tile-margin;
35
+
36
+ // `lg` viewport width
37
+ $lg-one-tile-width: $xs-one-tile-width;
38
+ $lg-two-tile-width: ($container-lg/ 2) - $tile-margin;
39
+ $lg-three-tile-width: ($container-lg / 3) - $tile-margin;
40
+ $lg-four-tile-width: ($container-lg / 4) - $tile-margin;
41
+ $lg-five-tile-width: ($container-lg / 5) - $tile-margin;
42
+
43
+ // `xl` viewport width
44
+ $xl-one-tile-width: $xs-one-tile-width;
45
+ $xl-two-tile-width: ($container-xl/ 2) - $tile-margin;
46
+ $xl-three-tile-width: ($container-xl / 3) - $tile-margin;
47
+ $xl-four-tile-width: ($container-xl / 4) - $tile-margin;
48
+ $xl-five-tile-width: ($container-xl / 5) - $tile-margin;
49
+
50
+ // `xl` with sidebar viewport width
51
+ $xl-sidebar-three-tile-width: ($container-xl-sidebar / 3) - $tile-margin;
52
+ $xl-sidebar-four-tile-width: ($container-xl-sidebar / 4) - $tile-margin;
53
+ $xl-sidebar-five-tile-width: ($container-xl-sidebar / 5) - $tile-margin;
35
54
 
36
55
  .browse-category {
37
56
  background-size: cover;
38
57
  background-position: center;
58
+ background-repeat: no-repeat;
39
59
  border: 2px solid $featured-browse-category-border-color;
40
60
  border-radius: $border-radius-lg;
41
61
  position: relative;
42
- float: left;
43
- background-repeat: no-repeat;
62
+
44
63
  .category-caption {
64
+ bottom: 16px; // assumes default font-size of 16px, using browser default of 1 rem == 16px
45
65
  color: $featured-browse-category-caption-color;
46
66
  position: absolute;
47
- bottom: 16px; // assumes default font-size of 16px, using browser default of 1 rem == 16px
48
67
  text-align: center;
49
- text-shadow: 0 1px 0 #000000;
68
+ text-shadow: 0 1px 0 $black;
50
69
  width: 100%;
51
70
  }
71
+
52
72
  .category-title {
53
- font-size: $font-size-lg;
73
+ font-size: $h4-font-size;
54
74
  line-height: 1.2;
55
75
  margin: 0;
56
76
  padding: $spacer / 4;
77
+
78
+ @media (min-width: breakpoint-min("sm")) {
79
+ font-size: 1.125rem;
80
+ }
81
+
82
+ @media (min-width: breakpoint-min("md")) {
83
+ font-size: $h5-font-size;
84
+ }
85
+
86
+ @media (min-width: breakpoint-min("lg")) {
87
+ font-size: $h4-font-size;
88
+ }
57
89
  }
90
+
58
91
  .category-subtitle {
59
92
  display: block;
60
93
  }
94
+
61
95
  .item-count {
62
96
  font-size: $font-size-base;
63
97
  text-transform: uppercase;
98
+
99
+ @media (min-width: breakpoint-min("sm")) and (max-width: breakpoint-min("lg")) {
100
+ font-size: $font-size-sm;
101
+ }
102
+ }
103
+ }
104
+
105
+ .spotlight-flexbox.browse-categories {
106
+ justify-content: space-around;
107
+
108
+ .box {
109
+ flex: none;
110
+ margin-bottom: 1rem;
111
+ min-width: 150px;
112
+ padding: 0;
64
113
  }
65
114
  }
66
115
 
67
- [data-sidebar="false"] {
68
- &.categories-1, &.categories-2, &.categories-3 {
116
+ // Most tile sizing works regardless of sidebar or not, because
117
+ // only "lg" and "xl" have a sidebar, and "lg" with a sidebar
118
+ // is the same width as "md" without a sidebar.
119
+ [data-sidebar="false"],
120
+ [data-sidebar="true"] {
121
+ &.categories-1, &.categories-2, &.categories-3,
122
+ &.categories-4, &.categories-5 {
123
+ .browse-category {
124
+ max-width: $maximum-tile-width;
125
+ max-height: $maximum-tile-width * $aspect-ratio-factor-4x3;
126
+ width: $xs-one-tile-width;
127
+ height: $xs-one-tile-width * $aspect-ratio-factor-4x3;
128
+ }
129
+ }
130
+ &.categories-2 {
131
+ .browse-category {
132
+ @media (min-width: breakpoint-min("sm")) {
133
+ width: $sm-two-tile-width;
134
+ height: $sm-two-tile-width * $aspect-ratio-factor-4x3;
135
+ }
136
+
137
+ @media (min-width: breakpoint-min("md")) {
138
+ width: $md-two-tile-width;
139
+ height: $md-two-tile-width * $aspect-ratio-factor-4x3;
140
+ }
141
+ }
142
+ }
143
+ &.categories-3 {
144
+ .browse-category {
145
+ @media (min-width: breakpoint-min("sm")) {
146
+ width: $sm-three-tile-width;
147
+ height: $sm-three-tile-width * $aspect-ratio-factor-4x3;
148
+ }
149
+
150
+ @media (min-width: breakpoint-min("md")) {
151
+ width: $md-three-tile-width;
152
+ height: $md-three-tile-width * $aspect-ratio-factor-4x3;
153
+ }
154
+
155
+ @media (min-width: breakpoint-min("lg")) {
156
+ width: $lg-three-tile-width;
157
+ height: $lg-three-tile-width * $aspect-ratio-factor-4x3;
158
+ }
159
+ }
160
+ }
161
+ &.categories-4 {
69
162
  .browse-category {
70
- width: $no-sidebar-xs-image-width;
71
- height: $no-sidebar-xs-image-width * $aspect-ratio-factor-large-image;
72
- @media (min-width: breakpoint-min("sm")) and (max-width: breakpoint-max("md")) {
73
- width: $no-sidebar-tablet-large-image-width;
74
- height: $no-sidebar-tablet-large-image-width * $aspect-ratio-factor-large-image;
163
+ @media (min-width: breakpoint-min("sm")) {
164
+ width: $sm-two-tile-width;
165
+ height: $sm-two-tile-width * $aspect-ratio-factor-4x3;
75
166
  }
76
- @media (min-width: breakpoint-min("md")) and (min-width: breakpoint-min("lg")) {
77
- width: $no-sidebar-desktop-large-image-width;
78
- height: $no-sidebar-desktop-large-image-width * $aspect-ratio-factor-large-image;
167
+
168
+ @media (min-width: breakpoint-min("md")) {
169
+ width: $md-two-tile-width;
170
+ height: $md-two-tile-width * $aspect-ratio-factor-4x3;
171
+ }
172
+
173
+ @media (min-width: breakpoint-min("lg")) {
174
+ width: $lg-four-tile-width;
175
+ height: $lg-four-tile-width * $aspect-ratio-factor-4x3;
79
176
  }
177
+
80
178
  @media (min-width: breakpoint-min("xl")) {
81
- width: $no-sidebar-large-desktop-large-image-width;
82
- height: $no-sidebar-large-desktop-large-image-width * $aspect-ratio-factor-large-image;
179
+ width: $xl-four-tile-width;
180
+ height: $xl-four-tile-width * $aspect-ratio-factor-4x3;
83
181
  }
84
182
  }
85
183
  }
86
- &.categories-4, &.categories-5 {
184
+ &.categories-5 {
87
185
  .browse-category {
88
- width: $no-sidebar-large-desktop-medium-image-width;
89
- height: $no-sidebar-large-desktop-medium-image-width * $aspect-ratio-factor-medium-image;
90
- @media (max-width: breakpoint-max("sm")) {
91
- width: $no-sidebar-xs-image-width;
92
- height: $no-sidebar-xs-image-width * $aspect-ratio-factor-medium-image;
186
+ @media (min-width: breakpoint-min("sm")) {
187
+ width: $sm-three-tile-width;
188
+ height: $sm-three-tile-width * $aspect-ratio-factor-4x3;
189
+ }
190
+
191
+ @media (min-width: breakpoint-min("md")) {
192
+ width: $md-three-tile-width;
193
+ height: $md-three-tile-width * $aspect-ratio-factor-4x3;
194
+ }
195
+
196
+ @media (min-width: breakpoint-min("lg")) {
197
+ width: $lg-five-tile-width;
198
+ height: $lg-five-tile-width * $aspect-ratio-factor-4x3;
199
+ }
200
+
201
+ @media (min-width: breakpoint-min("xl")) {
202
+ width: $xl-five-tile-width;
203
+ height: $xl-five-tile-width * $aspect-ratio-factor-4x3;
93
204
  }
94
205
  }
95
- .category-4 {
96
- @extend .d-sm-none;
206
+ }
207
+ }
208
+
209
+ [data-sidebar="true"] {
210
+ // Font size smaller at "lg" breakpoint only when there is a sidebar
211
+ .browse-category {
212
+ .category-title {
213
+ @media (min-width: breakpoint-min("lg")) and (max-width: breakpoint-min("xl")) {
214
+ font-size: $h5-font-size;
215
+ }
97
216
  }
98
- .category-5 {
99
- @extend .d-md-none;
100
- @extend .d-sm-none;
217
+
218
+ .item-count {
219
+ @media (min-width: breakpoint-min("lg")) and (max-width: breakpoint-min("xl")) {
220
+ font-size: $font-size-sm;
221
+ }
101
222
  }
102
223
  }
103
224
  }
104
225
 
226
+ // Special cases where the sizing above doesn't work when there is a sidebar.
227
+ // Note that "lg" with a sidebar has the same available width as "md"
228
+ // without a sidebar.
105
229
  [data-sidebar="true"] {
106
- &.categories-1, &.categories-2 {
230
+ &.categories-3 {
107
231
  .browse-category {
108
- width: $with-sidebar-xs-image-width;
109
- height: $with-sidebar-xs-image-width * $aspect-ratio-factor-large-image;
110
- @media (min-width: breakpoint-min("sm")) and (max-width: breakpoint-max("md")) {
111
- width: $with-sidebar-tablet-large-image-width;
112
- height: $with-sidebar-tablet-large-image-width * $aspect-ratio-factor-large-image;
113
- }
114
- @media (min-width: breakpoint-min("md")) and (max-width: breakpoint-max("xl")) {
115
- width: $with-sidebar-desktop-large-image-width;
116
- height: $with-sidebar-desktop-large-image-width * $aspect-ratio-factor-large-image;
232
+ @media (min-width: breakpoint-min("lg")) {
233
+ width: $md-three-tile-width;
234
+ height: $md-three-tile-width * $aspect-ratio-factor-4x3;
117
235
  }
236
+
118
237
  @media (min-width: breakpoint-min("xl")) {
119
- width: $with-sidebar-large-desktop-large-image-width;
120
- height: $with-sidebar-large-desktop-large-image-width * $aspect-ratio-factor-large-image;
238
+ width: $xl-sidebar-three-tile-width;
239
+ height: $xl-sidebar-three-tile-width * $aspect-ratio-factor-4x3;
121
240
  }
122
241
  }
123
242
  }
124
- &.categories-3, &.categories-4, &.categories-5 {
125
- .browse-category {
126
- width: $with-sidebar-desktop-medium-image-width;
127
- height: $with-sidebar-desktop-medium-image-width * $aspect-ratio-factor-medium-image;
128
- @media (max-width: breakpoint-max("sm")) {
129
- width: $with-sidebar-xs-image-width;
130
- height: $with-sidebar-xs-image-width * $aspect-ratio-factor-medium-image;
243
+ &.categories-4 {
244
+ .browse-category {
245
+ @media (min-width: breakpoint-min("lg")) {
246
+ width: $md-two-tile-width;
247
+ height: $md-two-tile-width * $aspect-ratio-factor-4x3;
131
248
  }
249
+
132
250
  @media (min-width: breakpoint-min("xl")) {
133
- width: $with-sidebar-large-desktop-medium-image-width;
134
- height: $with-sidebar-large-desktop-medium-image-width * $aspect-ratio-factor-medium-image;
251
+ width: $xl-sidebar-four-tile-width;
252
+ height: $xl-sidebar-four-tile-width * $aspect-ratio-factor-4x3;
135
253
  }
136
254
  }
137
255
  }
138
- .category-4, .category-5 {
139
- display: none;
256
+ &.categories-5 {
257
+ .browse-category {
258
+ @media (min-width: breakpoint-min("lg")) {
259
+ width: $md-three-tile-width;
260
+ height: $md-three-tile-width * $aspect-ratio-factor-4x3;
261
+ }
262
+
263
+ @media (min-width: breakpoint-min("xl")) {
264
+ width: $xl-sidebar-five-tile-width;
265
+ height: $xl-sidebar-five-tile-width * $aspect-ratio-factor-4x3;
266
+ }
267
+ }
140
268
  }
141
269
  }