blacklight-spotlight 3.0.0.rc2 → 3.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) 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/javascripts/spotlight/admin/{add_new_page_button.js → add_new_button.js} +7 -0
  6. data/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +4 -4
  7. data/app/assets/javascripts/spotlight/admin/blocks/browse_group_categories_block.js +88 -0
  8. data/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +1 -1
  9. data/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +1 -1
  10. data/app/assets/javascripts/spotlight/admin/croppable.js +1 -1
  11. data/app/assets/javascripts/spotlight/admin/index.js +0 -2
  12. data/app/assets/javascripts/spotlight/admin/search_typeahead.js +2 -2
  13. data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +7 -0
  14. data/app/assets/javascripts/spotlight/user/browse_group_categories.js +59 -0
  15. data/app/assets/javascripts/spotlight/user/index.js +1 -0
  16. data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +8 -0
  17. data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +34 -1
  18. data/app/assets/stylesheets/spotlight/_spotlight.scss +2 -0
  19. data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +69 -0
  20. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +1 -2
  21. data/app/controllers/concerns/spotlight/search_helper.rb +2 -8
  22. data/app/controllers/spotlight/appearances_controller.rb +0 -13
  23. data/app/controllers/spotlight/browse_controller.rb +7 -3
  24. data/app/controllers/spotlight/catalog_controller.rb +1 -1
  25. data/app/controllers/spotlight/concerns/application_controller.rb +13 -2
  26. data/app/controllers/spotlight/groups_controller.rb +80 -0
  27. data/app/controllers/spotlight/pages_controller.rb +5 -8
  28. data/app/controllers/spotlight/searches_controller.rb +4 -17
  29. data/app/helpers/spotlight/application_helper.rb +1 -1
  30. data/app/helpers/spotlight/crud_link_helpers.rb +1 -1
  31. data/app/helpers/spotlight/main_app_helpers.rb +1 -1
  32. data/app/models/sir_trevor_rails/blocks/browse_group_categories_block.rb +25 -0
  33. data/app/models/spotlight/ability.rb +2 -0
  34. data/app/models/spotlight/about_page.rb +1 -1
  35. data/app/models/spotlight/blacklight_configuration.rb +2 -1
  36. data/app/models/spotlight/exhibit.rb +14 -2
  37. data/app/models/spotlight/feature_page.rb +1 -1
  38. data/app/models/spotlight/featured_image.rb +1 -1
  39. data/app/models/spotlight/group.rb +22 -0
  40. data/app/models/spotlight/group_member.rb +11 -0
  41. data/app/models/spotlight/home_page.rb +1 -1
  42. data/app/models/spotlight/page.rb +2 -2
  43. data/app/models/spotlight/page_configurations.rb +5 -0
  44. data/app/models/spotlight/resources/iiif_manifest.rb +6 -6
  45. data/app/models/spotlight/search.rb +5 -0
  46. data/app/services/spotlight/exhibit_import_export_service.rb +50 -22
  47. data/app/views/spotlight/browse/_search.html.erb +2 -1
  48. data/app/views/spotlight/browse/index.html.erb +13 -0
  49. data/app/views/spotlight/catalog/_document.html.erb +2 -4
  50. data/app/views/spotlight/catalog/index.iiif_json.jbuilder +22 -0
  51. data/app/views/spotlight/searches/_form.html.erb +12 -0
  52. data/app/views/spotlight/searches/_group.html.erb +27 -0
  53. data/app/views/spotlight/searches/index.html.erb +58 -17
  54. data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +44 -0
  55. data/app/views/spotlight/translations/_groups.html.erb +34 -0
  56. data/app/views/spotlight/translations/edit.html.erb +6 -0
  57. data/config/i18n-tasks.yml +5 -0
  58. data/config/locales/spotlight.en.yml +37 -1
  59. data/config/routes.rb +10 -0
  60. data/db/migrate/20210113092223_create_spotlight_groups.rb +23 -0
  61. data/lib/generators/spotlight/install_generator.rb +3 -3
  62. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +1 -1
  63. data/lib/spotlight/engine.rb +4 -3
  64. data/lib/spotlight/version.rb +1 -1
  65. data/spec/controllers/spotlight/browse_controller_spec.rb +23 -0
  66. data/spec/controllers/spotlight/feature_pages_controller_spec.rb +11 -0
  67. data/spec/controllers/spotlight/groups_controller_spec.rb +103 -0
  68. data/spec/controllers/spotlight/searches_controller_spec.rb +10 -3
  69. data/spec/controllers/spotlight/view_configurations_controller_spec.rb +1 -1
  70. data/spec/examples.txt +1437 -136
  71. data/spec/factories/group.rb +17 -0
  72. data/spec/factories/searches.rb +10 -0
  73. data/spec/features/browse_category_admin_spec.rb +36 -4
  74. data/spec/features/browse_category_navigation_spec.rb +44 -0
  75. data/spec/features/browse_category_spec.rb +2 -2
  76. data/spec/features/exhibits/translation_editing_spec.rb +49 -0
  77. data/spec/features/home_page_spec.rb +4 -4
  78. data/spec/features/javascript/about_page_admin_spec.rb +1 -1
  79. data/spec/features/javascript/block_controls_spec.rb +1 -1
  80. data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +64 -0
  81. data/spec/features/javascript/browse_group_admin_spec.rb +45 -0
  82. data/spec/features/javascript/edit_in_place_spec.rb +2 -2
  83. data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
  84. data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -3
  85. data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +41 -0
  86. data/spec/models/spotlight/exhibit_spec.rb +8 -0
  87. data/spec/models/spotlight/group_spec.rb +19 -0
  88. data/spec/models/spotlight/role_spec.rb +1 -1
  89. data/spec/models/spotlight/search_spec.rb +30 -3
  90. data/spec/services/spotlight/exhibit_import_export_service_spec.rb +48 -1
  91. data/spec/services/spotlight/solr_document_builder_spec.rb +1 -1
  92. data/spec/spec_helper.rb +1 -1
  93. data/spec/support/features/test_features_helpers.rb +15 -0
  94. data/spec/test_app_templates/Gemfile.extra +1 -0
  95. data/spec/test_app_templates/catalog_controller.rb +6 -3
  96. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  97. data/spec/views/spotlight/browse/index.html.erb_spec.rb +2 -0
  98. data/spec/views/spotlight/pages/show.html.erb_spec.rb +1 -0
  99. data/vendor/assets/javascripts/tiny-slider.js +3218 -0
  100. data/vendor/assets/stylesheets/tiny-slider.css +1 -0
  101. metadata +339 -263
  102. data/vendor/assets/javascripts/handlebars-v1.3.0.js +0 -2746
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7004b788de24eca3d6f0b429b184c56ef6831ca2c161f5472cd6e9b5279bc9d6
4
- data.tar.gz: fc95ee6947c984a4789a449986f3d6f2c7d6c10005c5f42039c89b6690cb92eb
3
+ metadata.gz: a8fb1d422302a15b42343a0f7afb8c545869d0c872e355762a7cea998469b12b
4
+ data.tar.gz: df63403ced5aa975097224a0e298562d216c427fcab43aba7640eeee18dc8ea9
5
5
  SHA512:
6
- metadata.gz: 48af92f233fc293a2d3b1fb3783f12102e0851d0fcd5ddfd188e9e2313b3389742efcd67cc256186e3252cfe0722bc0a0f961bd1665f591396add0bccc22437f
7
- data.tar.gz: 5073b54f60041abff381552ff072cfe1c07e6faa61719500c2f85a0e5de8e72a5852dc6571452225c5a27573cb76546b8c703b3f2149e2e4b3e57ab3a82fbcc9
6
+ metadata.gz: 3c6261c2edc4b04d331d0e3961f0a88ce15599314add02061475349e9c86cb5dcb7c1cb5bd9d89100266bfcbab4449160b7b662d66aece1d73e5a721d6d35914
7
+ data.tar.gz: 96fad663f5370e18de8a345ed3bbd9f7b6e7b774a76ca2d16342d66bdfa2bde41fe3eaef70b290bde32e35828f50bc3c71f0f7f75df20e8029c61fff29193ab1
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  spotlight
2
2
  =========
3
3
 
4
- [![Build Status](https://travis-ci.org/projectblacklight/spotlight.png?branch=master)](https://travis-ci.org/projectblacklight/spotlight) | [![Gem Version](https://badge.fury.io/rb/blacklight-spotlight.png)](http://badge.fury.io/rb/blacklight-spotlight) | [Release Notes](https://github.com/projectblacklight/spotlight/releases) | [Design Documents](https://github.com/projectblacklight/spotlight/releases/tag/v0.0.0)
4
+ ![CI](https://github.com/projectblacklight/spotlight/workflows/CI/badge.svg) | [![Gem Version](https://badge.fury.io/rb/blacklight-spotlight.png)](http://badge.fury.io/rb/blacklight-spotlight) | [Release Notes](https://github.com/projectblacklight/spotlight/releases) | [Design Documents](https://github.com/projectblacklight/spotlight/releases/tag/v0.0.0)
5
5
 
6
6
  Spotlight is open source software that enables librarians, curators, and other content experts to easily build feature-rich websites that showcase collections and objects from a digital repository, uploaded items, or a combination of the two. Spotlight is a plug-in for [Blacklight](https://github.com/projectblacklight/blacklight), an open source, Ruby on Rails Engine that provides a basic discovery interface for searching an Apache Solr index.
7
7
 
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm116-292H256v-70.9c0-10.7-13-16.1-20.5-8.5L121.2 247.5c-4.7 4.7-4.7 12.2 0 16.9l114.3 114.9c7.6 7.6 20.5 2.2 20.5-8.5V300h116c6.6 0 12-5.4 12-12v-64c0-6.6-5.4-12-12-12z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zM140 300h116v70.9c0 10.7 13 16.1 20.5 8.5l114.3-114.9c4.7-4.7 4.7-12.2 0-16.9l-114.3-115c-7.6-7.6-20.5-2.2-20.5 8.5V212H140c-6.6 0-12 5.4-12 12v64c0 6.6 5.4 12 12 12z"/></svg>
@@ -13,6 +13,7 @@
13
13
  var cancel = $("input[data-behavior='cancel']", target);
14
14
  var input = $("input[type='text']", target);
15
15
  var original_width = button.outerWidth();
16
+ var expanded = false;
16
17
 
17
18
  // Animate button open when the mouse enters or
18
19
  // the button is given focus (i.e. clicked/tabbed)
@@ -43,7 +44,13 @@
43
44
  }
44
45
  });
45
46
  function expandButton(){
47
+ // If this has not yet been expanded, recalculate original_width to
48
+ // handle things that may have been originally hidden.
49
+ if (!expanded) {
50
+ original_width = button.outerWidth();
51
+ }
46
52
  if(button.outerWidth() <= (original_width + 5)) {
53
+ expanded = true;
47
54
  button.animate(
48
55
  {width: settings.animate_width + 'px'}, settings.speed, function(){
49
56
  target.show(0, function(){
@@ -18,6 +18,10 @@
18
18
  this.transform_autocomplete_results = _.identity;
19
19
  }
20
20
 
21
+ if (_.isUndefined(this['autocomplete_control'])) {
22
+ this.autocomplete_control = function() { return '<input type="text" class="st-input-string form-control item-input-field" data-twitter-typeahead="true" placeholder="<%= i18n.t("blocks:autocompleteable:placeholder")%>"/>' };
23
+ }
24
+
21
25
  if (_.isUndefined(this['bloodhoundOptions'])) {
22
26
  this.bloodhoundOptions = function() {
23
27
  return {
@@ -30,10 +34,6 @@
30
34
  }
31
35
  },
32
36
 
33
- autocomplete_control: function() {
34
- return '<input type="text" class="st-input-string form-control item-input-field" data-twitter-typeahead="true" placeholder="<%= i18n.t("blocks:autocompleteable:placeholder")%>"/>';
35
- },
36
-
37
37
  addAutocompletetoSirTrevorForm: function() {
38
38
  $('[data-twitter-typeahead]', this.inner).spotlightSearchTypeAhead({bloodhound: this.bloodhound(), template: this.autocomplete_template()}).on('typeahead:selected typeahead:autocompleted', this.autocompletedHandler()).on( 'focus', function() {
39
39
  if($(this).val() === '') {
@@ -0,0 +1,88 @@
1
+ /*
2
+ Sir Trevor BrowseGroupCategories
3
+ */
4
+
5
+ SirTrevor.Blocks.BrowseGroupCategories = (function(){
6
+
7
+ return Spotlight.Block.Resources.extend({
8
+ type: "browse_group_categories",
9
+ icon_name: "browse",
10
+ bloodhoundOptions: function() {
11
+ var that = this;
12
+ return {
13
+ prefetch: {
14
+ url: this.autocomplete_url(),
15
+ ttl: 0,
16
+ filter: function(response) {
17
+ // Let the dom know that the response has been returned
18
+ $(that.inner).attr('data-browse-groups-fetched', true);
19
+ return response;
20
+ }
21
+ }
22
+ };
23
+ },
24
+
25
+ autocomplete_control: function() {
26
+ return '<input type="text" class="st-input-string form-control item-input-field" data-twitter-typeahead="true" placeholder="<%= i18n.t("blocks:browse_group_categories:autocomplete")%>"/>';
27
+ },
28
+ autocomplete_template: function() { return '<div class="autocomplete-item{{#unless published}} blacklight-private{{/unless}}"><span class="autocomplete-title">{{title}}</span><br/></div>' },
29
+ autocomplete_url: function() { return $(this.inner).closest('form[data-autocomplete-exhibit-browse-groups-path]').data('autocomplete-exhibit-browse-groups-path').replace("%25QUERY", "%QUERY"); },
30
+ _itemPanel: function(data) {
31
+ var index = "item_" + this.globalIndex++;
32
+ var checked;
33
+ if (data.display == "true") {
34
+ checked = "checked='checked'"
35
+ } else {
36
+ checked = "";
37
+ }
38
+ var resource_id = data.slug || data.id;
39
+ var markup = [
40
+ '<li class="field form-inline dd-item dd3-item" data-resource-id="' + resource_id + '" data-id="' + index + '" id="' + this.formId("item_" + data.id) + '">',
41
+ '<input type="hidden" name="item[' + index + '][id]" value="' + resource_id + '" />',
42
+ '<input type="hidden" name="item[' + index + '][title]" value="' + data.title + '" />',
43
+ '<input data-property="weight" type="hidden" name="item[' + index + '][weight]" value="' + data.weight + '" />',
44
+ '<div class="card d-flex dd3-content">',
45
+ '<div class="dd-handle dd3-handle"><%= i18n.t("blocks:resources:panel:drag") %></div>',
46
+ '<div class="d-flex card-header item-grid justify-content-between">',
47
+ '<div class="d-flex flex-grow-1">',
48
+ '<div class="checkbox">',
49
+ '<input name="item[' + index + '][display]" type="hidden" value="false" />',
50
+ '<input name="item[' + index + '][display]" id="'+ this.formId(this.display_checkbox + '_' + data.id) + '" type="checkbox" ' + checked + ' class="item-grid-checkbox" value="true" />',
51
+ '<label class="sr-only" for="'+ this.formId(this.display_checkbox + '_' + data.id) +'"><%= i18n.t("blocks:resources:panel:display") %></label>',
52
+ '</div>',
53
+ '<div class="main">',
54
+ '<div class="title card-title">' + data.title + '</div>',
55
+ '</div>',
56
+ '</div>',
57
+ '<div class="d-flex">',
58
+ '<a data-item-grid-panel-remove="true" href="#"><%= i18n.t("blocks:resources:panel:remove") %></a>',
59
+ '</div>',
60
+ '</div>',
61
+ '</div>',
62
+ '</li>'
63
+ ].join("\n");
64
+
65
+ var panel = $(_.template(markup)(this));
66
+ var context = this;
67
+
68
+ $('a[data-item-grid-panel-remove]', panel).on('click', function(e) {
69
+ e.preventDefault();
70
+ $(this).closest('.field').remove();
71
+ context.afterPanelDelete();
72
+
73
+ });
74
+
75
+ this.afterPanelRender(data, panel);
76
+
77
+ return panel;
78
+ },
79
+
80
+ item_options: function() { return [
81
+ '<label>',
82
+ '<input type="hidden" name="display-item-counts" value="false" />',
83
+ '<input type="checkbox" name="display-item-counts" value="true" checked />',
84
+ '<%= i18n.t("blocks:browse_group_categories:item_counts") %>',
85
+ '</label>'
86
+ ].join("\n") },
87
+ });
88
+ })();
@@ -8,7 +8,7 @@ SirTrevor.Blocks.FeaturedPages = (function(){
8
8
  icon_name: "pages",
9
9
 
10
10
  autocomplete_url: function() { return $(this.inner).closest('form[data-autocomplete-exhibit-pages-path]').data('autocomplete-exhibit-pages-path').replace("%25QUERY", "%QUERY"); },
11
- autocomplete_template: function() { return '<div class="autocomplete-item{{#unless published}} blacklight-private{{/unless}}">{{log "Look at me"}}{{log thumbnail_image_url}}{{#if thumbnail_image_url}}<div class="document-thumbnail"><img class="img-thumbnail" src="{{thumbnail_image_url}}" /></div>{{/if}}<span class="autocomplete-title">{{title}}</span><br/><small>&nbsp;&nbsp;{{description}}</small></div>' },
11
+ autocomplete_template: function() { return '<div class="autocomplete-item{{#unless published}} blacklight-private{{/unless}}">{{#if thumbnail_image_url}}<div class="document-thumbnail"><img class="img-thumbnail" src="{{thumbnail_image_url}}" /></div>{{/if}}<span class="autocomplete-title">{{title}}</span><br/><small>&nbsp;&nbsp;{{description}}</small></div>' },
12
12
  bloodhoundOptions: function() {
13
13
  return {
14
14
  prefetch: {
@@ -85,7 +85,7 @@ SirTrevor.Blocks.SolrDocumentsBase = (function(){
85
85
 
86
86
  $.ajax(manifestUrl).done(
87
87
  function(manifest) {
88
- var Iiif = require('spotlight/admin/iiif');
88
+ var Iiif = spotlightAdminIiif;
89
89
  var iiifManifest = new Iiif(manifestUrl, manifest);
90
90
 
91
91
  var thumbs = iiifManifest.imagesArray();
@@ -12,7 +12,7 @@ Spotlight.onLoad(function() {
12
12
  $.fn.croppable = function() {
13
13
  var croppables = this;
14
14
 
15
- var Crop = require('spotlight/admin/crop');
15
+ var Crop = spotlightAdminCrop;
16
16
  $(croppables).each(function() {
17
17
  var cropElement = $(this);
18
18
  var c = new Crop(cropElement);
@@ -12,7 +12,5 @@
12
12
  //= require Path.Drag
13
13
  //= require MutationObserver
14
14
 
15
- // Provide AMD module support
16
- //= require almond
17
15
  //= require polyfill.min.js
18
16
  //= require_tree .
@@ -1,5 +1,5 @@
1
1
  //= require typeahead.bundle.min.js
2
- //= require handlebars-v1.3.0.js
2
+ //= require handlebars
3
3
 
4
4
  (function($){
5
5
  $.fn.spotlightSearchTypeAhead = function( options ) {
@@ -73,7 +73,7 @@ function addImageSelector(input, panel, manifestUrl, initialize) {
73
73
  var cropper = input.data('iiifCropper');
74
74
  $.ajax(manifestUrl).done(
75
75
  function(manifest) {
76
- var Iiif = require('spotlight/admin/iiif');
76
+ var Iiif = spotlightAdminIiif;
77
77
  var iiifManifest = new Iiif(manifestUrl, manifest);
78
78
 
79
79
  var thumbs = iiifManifest.imagesArray();
@@ -9,6 +9,13 @@ 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
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.",
@@ -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 .
@@ -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
+ }
@@ -70,10 +70,22 @@ $xl-sidebar-five-tile-width: ($container-xl-sidebar / 5) - $tile-margin;
70
70
  }
71
71
 
72
72
  .category-title {
73
- font-size: $font-size-lg;
73
+ font-size: $h4-font-size;
74
74
  line-height: 1.2;
75
75
  margin: 0;
76
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
+ }
77
89
  }
78
90
 
79
91
  .category-subtitle {
@@ -83,6 +95,10 @@ $xl-sidebar-five-tile-width: ($container-xl-sidebar / 5) - $tile-margin;
83
95
  .item-count {
84
96
  font-size: $font-size-base;
85
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
+ }
86
102
  }
87
103
  }
88
104
 
@@ -190,6 +206,23 @@ $xl-sidebar-five-tile-width: ($container-xl-sidebar / 5) - $tile-margin;
190
206
  }
191
207
  }
192
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
+ }
216
+ }
217
+
218
+ .item-count {
219
+ @media (min-width: breakpoint-min("lg")) and (max-width: breakpoint-min("xl")) {
220
+ font-size: $font-size-sm;
221
+ }
222
+ }
223
+ }
224
+ }
225
+
193
226
  // Special cases where the sizing above doesn't work when there is a sidebar.
194
227
  // Note that "lg" with a sidebar has the same available width as "md"
195
228
  // without a sidebar.
@@ -5,7 +5,9 @@
5
5
  @import "spotlight/sir-trevor_overrides";
6
6
  @import "spotlight/attachments";
7
7
  @import "spotlight/pages";
8
+ @import "spotlight/breadcrumbs";
8
9
  @import "spotlight/browse";
10
+ @import "spotlight/browse_group_categories_block";
9
11
  @import "spotlight/header";
10
12
  @import "spotlight/footer";
11
13
  @import "spotlight/catalog";
@@ -0,0 +1,69 @@
1
+ @import "tiny-slider";
2
+
3
+ .browse-group-categories-block {
4
+ padding-bottom: $spacer * .75;
5
+ padding-top: $spacer * .75;
6
+
7
+ .spotlight-flexbox.browse-categories .box {
8
+ display: flex;
9
+ }
10
+
11
+ .browse-group-categories-controls {
12
+ list-style: none;
13
+ li {
14
+ display: inline-block;
15
+ cursor: pointer;
16
+ }
17
+
18
+ .blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right {
19
+ display: inline-block;
20
+ fill: $gray-600;
21
+ height: 44px;
22
+ width: 44px;
23
+
24
+ &:hover,&:focus {
25
+ fill: $gray-700;
26
+ }
27
+ }
28
+
29
+ li[aria-disabled="true"] {
30
+ cursor: auto;
31
+ }
32
+
33
+ [aria-disabled="true"] {
34
+ .blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right {
35
+ fill: $gray-400;
36
+
37
+ &:hover,&:focus {
38
+ fill: $gray-400;
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ // Coming from tiny-slider, make sure these disappear when navigating via turbolinks
45
+ .tns-controls {
46
+ display: none;
47
+ }
48
+
49
+ @media screen and (min-width: breakpoint-min("md")) {
50
+ .browse-group-categories-controls {
51
+ .blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right {
52
+ height: 32px;
53
+ width: 32px;
54
+ }
55
+ }
56
+
57
+ &[data-browse-group-categories-count="2"],&[data-browse-group-categories-count="3"] {
58
+ .browse-group-categories-controls {
59
+ display: none !important;
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ [dir="rtl"] {
66
+ .browse-group-categories-block .blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right{
67
+ transform: rotate(180deg);
68
+ }
69
+ }