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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/images/blacklight/arrow-alt-circle-left.svg +1 -0
- data/app/assets/images/blacklight/arrow-alt-circle-right.svg +1 -0
- data/app/assets/javascripts/spotlight/admin/{add_new_page_button.js → add_new_button.js} +7 -0
- data/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +4 -4
- data/app/assets/javascripts/spotlight/admin/blocks/browse_group_categories_block.js +88 -0
- data/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +1 -1
- data/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +1 -1
- data/app/assets/javascripts/spotlight/admin/croppable.js +1 -1
- data/app/assets/javascripts/spotlight/admin/index.js +0 -2
- data/app/assets/javascripts/spotlight/admin/search_typeahead.js +2 -2
- data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +7 -0
- data/app/assets/javascripts/spotlight/user/browse_group_categories.js +59 -0
- data/app/assets/javascripts/spotlight/user/index.js +1 -0
- data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +8 -0
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +34 -1
- data/app/assets/stylesheets/spotlight/_spotlight.scss +2 -0
- data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +69 -0
- data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +1 -2
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -8
- data/app/controllers/spotlight/appearances_controller.rb +0 -13
- data/app/controllers/spotlight/browse_controller.rb +7 -3
- data/app/controllers/spotlight/catalog_controller.rb +1 -1
- data/app/controllers/spotlight/concerns/application_controller.rb +13 -2
- data/app/controllers/spotlight/groups_controller.rb +80 -0
- data/app/controllers/spotlight/pages_controller.rb +5 -8
- data/app/controllers/spotlight/searches_controller.rb +4 -17
- data/app/helpers/spotlight/application_helper.rb +1 -1
- data/app/helpers/spotlight/crud_link_helpers.rb +1 -1
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/models/sir_trevor_rails/blocks/browse_group_categories_block.rb +25 -0
- data/app/models/spotlight/ability.rb +2 -0
- data/app/models/spotlight/about_page.rb +1 -1
- data/app/models/spotlight/blacklight_configuration.rb +2 -1
- data/app/models/spotlight/exhibit.rb +14 -2
- data/app/models/spotlight/feature_page.rb +1 -1
- data/app/models/spotlight/featured_image.rb +1 -1
- data/app/models/spotlight/group.rb +22 -0
- data/app/models/spotlight/group_member.rb +11 -0
- data/app/models/spotlight/home_page.rb +1 -1
- data/app/models/spotlight/page.rb +2 -2
- data/app/models/spotlight/page_configurations.rb +5 -0
- data/app/models/spotlight/resources/iiif_manifest.rb +6 -6
- data/app/models/spotlight/search.rb +5 -0
- data/app/services/spotlight/exhibit_import_export_service.rb +50 -22
- data/app/views/spotlight/browse/_search.html.erb +2 -1
- data/app/views/spotlight/browse/index.html.erb +13 -0
- data/app/views/spotlight/catalog/_document.html.erb +2 -4
- data/app/views/spotlight/catalog/index.iiif_json.jbuilder +22 -0
- data/app/views/spotlight/searches/_form.html.erb +12 -0
- data/app/views/spotlight/searches/_group.html.erb +27 -0
- data/app/views/spotlight/searches/index.html.erb +58 -17
- data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +44 -0
- data/app/views/spotlight/translations/_groups.html.erb +34 -0
- data/app/views/spotlight/translations/edit.html.erb +6 -0
- data/config/i18n-tasks.yml +5 -0
- data/config/locales/spotlight.en.yml +37 -1
- data/config/routes.rb +10 -0
- data/db/migrate/20210113092223_create_spotlight_groups.rb +23 -0
- data/lib/generators/spotlight/install_generator.rb +3 -3
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +1 -1
- data/lib/spotlight/engine.rb +4 -3
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/spotlight/browse_controller_spec.rb +23 -0
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +11 -0
- data/spec/controllers/spotlight/groups_controller_spec.rb +103 -0
- data/spec/controllers/spotlight/searches_controller_spec.rb +10 -3
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +1 -1
- data/spec/examples.txt +1437 -136
- data/spec/factories/group.rb +17 -0
- data/spec/factories/searches.rb +10 -0
- data/spec/features/browse_category_admin_spec.rb +36 -4
- data/spec/features/browse_category_navigation_spec.rb +44 -0
- data/spec/features/browse_category_spec.rb +2 -2
- data/spec/features/exhibits/translation_editing_spec.rb +49 -0
- data/spec/features/home_page_spec.rb +4 -4
- data/spec/features/javascript/about_page_admin_spec.rb +1 -1
- data/spec/features/javascript/block_controls_spec.rb +1 -1
- data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +64 -0
- data/spec/features/javascript/browse_group_admin_spec.rb +45 -0
- data/spec/features/javascript/edit_in_place_spec.rb +2 -2
- data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -3
- data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +41 -0
- data/spec/models/spotlight/exhibit_spec.rb +8 -0
- data/spec/models/spotlight/group_spec.rb +19 -0
- data/spec/models/spotlight/role_spec.rb +1 -1
- data/spec/models/spotlight/search_spec.rb +30 -3
- data/spec/services/spotlight/exhibit_import_export_service_spec.rb +48 -1
- data/spec/services/spotlight/solr_document_builder_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/features/test_features_helpers.rb +15 -0
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/catalog_controller.rb +6 -3
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
- data/spec/views/spotlight/browse/index.html.erb_spec.rb +2 -0
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +1 -0
- data/vendor/assets/javascripts/tiny-slider.js +3218 -0
- data/vendor/assets/stylesheets/tiny-slider.css +1 -0
- metadata +339 -263
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8fb1d422302a15b42343a0f7afb8c545869d0c872e355762a7cea998469b12b
|
4
|
+
data.tar.gz: df63403ced5aa975097224a0e298562d216c427fcab43aba7640eeee18dc8ea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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}}">{{
|
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> {{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 =
|
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 =
|
15
|
+
var Crop = spotlightAdminCrop;
|
16
16
|
$(croppables).each(function() {
|
17
17
|
var cropElement = $(this);
|
18
18
|
var c = new Crop(cropElement);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
//= require typeahead.bundle.min.js
|
2
|
-
//= require handlebars
|
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 =
|
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
|
+
});
|
@@ -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
|
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
|
+
}
|