blacklight-spotlight 3.0.0.alpha.7 → 3.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/javascripts/spotlight/admin/blocks/browse_block.js +55 -1
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +7 -2
- data/app/assets/javascripts/spotlight/admin/crop.es6 +11 -0
- data/app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js +21 -12
- data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +4 -3
- data/app/assets/stylesheets/spotlight/_accessibility.scss +1 -1
- data/app/assets/stylesheets/spotlight/_browse.scss +16 -0
- data/app/assets/stylesheets/spotlight/_catalog.scss +6 -6
- data/app/assets/stylesheets/spotlight/_curation.scss +6 -0
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +182 -84
- data/app/assets/stylesheets/spotlight/_header.scss +1 -1
- data/app/assets/stylesheets/spotlight/_item_text_block.scss +6 -0
- data/app/assets/stylesheets/spotlight/_pages.scss +10 -5
- data/app/assets/stylesheets/spotlight/_report_a_problem.scss +5 -2
- data/app/assets/stylesheets/spotlight/_translations.scss +7 -0
- data/app/controllers/spotlight/admin_users_controller.rb +4 -1
- data/app/controllers/spotlight/appearances_controller.rb +1 -0
- data/app/controllers/spotlight/browse_controller.rb +1 -1
- data/app/controllers/spotlight/exhibits_controller.rb +4 -3
- data/app/controllers/spotlight/featured_images_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +1 -1
- data/app/controllers/spotlight/resources/csv_upload_controller.rb +1 -1
- data/app/controllers/spotlight/searches_controller.rb +3 -2
- data/app/controllers/spotlight/sites_controller.rb +8 -2
- data/app/controllers/spotlight/translations_controller.rb +46 -0
- data/app/helpers/spotlight/crop_helper.rb +4 -1
- data/app/helpers/spotlight/title_helper.rb +12 -2
- data/app/jobs/spotlight/add_uploads_from_csv.rb +30 -5
- data/app/mailers/spotlight/indexing_complete_mailer.rb +3 -2
- data/app/models/concerns/spotlight/exhibit_defaults.rb +1 -1
- data/app/models/concerns/spotlight/translatables.rb +17 -1
- data/app/models/spotlight/about_page.rb +3 -1
- data/app/models/spotlight/contact.rb +1 -1
- data/app/models/spotlight/custom_field.rb +3 -3
- data/app/models/spotlight/exhibit.rb +4 -2
- data/app/models/spotlight/feature_page.rb +3 -1
- data/app/models/spotlight/featured_image.rb +29 -12
- data/app/models/spotlight/home_page.rb +3 -1
- data/app/models/spotlight/main_navigation.rb +2 -2
- data/app/models/spotlight/masthead.rb +1 -1
- data/app/models/spotlight/page.rb +5 -1
- data/app/models/spotlight/page_configurations.rb +1 -0
- data/app/models/spotlight/page_content.rb +2 -0
- data/app/models/spotlight/resources/csv_upload.rb +2 -1
- data/app/models/spotlight/resources/iiif_manifest.rb +2 -0
- data/app/models/spotlight/resources/upload.rb +1 -1
- data/app/models/spotlight/search.rb +5 -1
- data/app/models/spotlight/solr_document_sidecar.rb +7 -5
- data/app/models/spotlight/temporary_image.rb +8 -0
- data/app/services/spotlight/exhibit_import_export_service.rb +454 -0
- data/app/services/spotlight/solr_document_builder.rb +1 -0
- data/app/values/custom_field_name.rb +1 -0
- data/app/views/catalog/_save_search.html.erb +1 -1
- data/app/views/shared/_site_sidebar.html.erb +1 -1
- data/app/views/spotlight/about_pages/_empty.html.erb +5 -5
- data/app/views/spotlight/admin_users/index.html.erb +1 -1
- data/app/views/spotlight/browse/_search.html.erb +3 -2
- data/app/views/spotlight/browse/_search_title.html.erb +2 -1
- data/app/views/spotlight/contacts/_form.html.erb +1 -1
- data/app/views/spotlight/exhibits/new.html.erb +1 -1
- data/app/views/spotlight/feature_pages/_empty.html.erb +5 -5
- data/app/views/spotlight/featured_images/_form.html.erb +1 -1
- data/app/views/spotlight/featured_images/_upload_form.html.erb +1 -1
- data/app/views/spotlight/home_pages/_empty.html.erb +3 -3
- data/app/views/spotlight/indexing_complete_mailer/documents_indexed.html.erb +9 -0
- data/app/views/spotlight/pages/_form.html.erb +2 -2
- data/app/views/spotlight/searches/_form.html.erb +1 -0
- data/app/views/spotlight/searches/_search.html.erb +1 -0
- data/app/views/spotlight/shared/_honeypot_field.html.erb +4 -0
- data/app/views/spotlight/shared/_report_a_problem.html.erb +7 -10
- data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +7 -1
- data/app/views/spotlight/sites/edit.html.erb +1 -1
- data/app/views/spotlight/sites/edit_exhibits.html.erb +1 -1
- data/app/views/spotlight/translations/_browse_categories.html.erb +29 -3
- data/app/views/spotlight/translations/_general.html.erb +7 -7
- data/app/views/spotlight/translations/_import.html.erb +24 -0
- data/app/views/spotlight/translations/_metadata.html.erb +1 -1
- data/app/views/spotlight/translations/_page.html.erb +5 -5
- data/app/views/spotlight/translations/_pages.html.erb +4 -4
- data/app/views/spotlight/translations/_pages_table.html.erb +5 -5
- data/app/views/spotlight/translations/_search_fields.html.erb +3 -3
- data/app/views/spotlight/translations/edit.html.erb +8 -6
- data/app/views/spotlight/translations/show.yaml.yamlbuilder +81 -0
- data/config/i18n-tasks.yml +2 -0
- data/config/locales/spotlight.ar.yml +47 -24
- data/config/locales/spotlight.en.yml +147 -133
- data/config/routes.rb +6 -1
- data/db/migrate/20200403161512_add_subtitle_to_searches.rb +7 -0
- data/lib/generators/spotlight/install_generator.rb +22 -1
- data/lib/generators/spotlight/templates/config/initializers/sir_trevor_rails.rb +10 -0
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +2 -0
- data/lib/spotlight/engine.rb +23 -0
- data/lib/spotlight/upload_field_config.rb +1 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +3 -3
- data/spec/controllers/spotlight/browse_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/catalog_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/contacts_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +4 -4
- data/spec/controllers/spotlight/resources/upload_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/translations_controller_spec.rb +53 -2
- data/spec/examples.txt +136 -1389
- data/spec/factories/featured_images.rb +4 -0
- data/spec/factories/searches.rb +1 -1
- data/spec/features/add_contacts_spec.rb +1 -1
- data/spec/features/browse_category_admin_spec.rb +3 -3
- data/spec/features/catalog_spec.rb +2 -2
- data/spec/features/create_exhibit_spec.rb +6 -6
- data/spec/features/dashboard_spec.rb +7 -7
- data/spec/features/edit_search_fields_spec.rb +2 -2
- data/spec/features/exhibits/administration_spec.rb +3 -3
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +1 -1
- data/spec/features/exhibits/language_create_edit_spec.rb +3 -3
- data/spec/features/exhibits/translation_editing_spec.rb +8 -8
- data/spec/features/home_page_spec.rb +10 -1
- data/spec/features/item_admin_spec.rb +4 -4
- data/spec/features/javascript/block_controls_spec.rb +2 -0
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +4 -1
- data/spec/features/javascript/edit_in_place_spec.rb +1 -1
- data/spec/features/javascript/search_config_admin_spec.rb +1 -1
- data/spec/features/report_a_problem_spec.rb +6 -5
- data/spec/helpers/spotlight/pages_helper_spec.rb +2 -2
- data/spec/helpers/spotlight/title_helper_spec.rb +13 -0
- data/spec/i18n_spec.rb +0 -2
- data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +13 -1
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +11 -1
- data/spec/models/solr_document_spec.rb +2 -3
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +1 -0
- data/spec/models/spotlight/exhibit_spec.rb +10 -2
- data/spec/models/spotlight/featured_image_spec.rb +27 -0
- data/spec/models/spotlight/main_navigation_spec.rb +1 -1
- data/spec/models/spotlight/page_spec.rb +6 -1
- data/spec/models/spotlight/resources/upload_spec.rb +43 -79
- data/spec/models/spotlight/role_spec.rb +2 -2
- data/spec/{serializers/spotlight/exhibit_export_serializer_spec.rb → services/spotlight/exhibit_import_export_service_spec.rb} +120 -22
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +0 -3
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +6 -6
- data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -3
- data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +7 -8
- data/spec/views/spotlight/translations/_import.html.erb_spec.rb +24 -0
- data/vendor/assets/javascripts/leaflet-iiif.js +46 -21
- metadata +73 -34
- data/app/serializers/spotlight/exhibit_export_serializer.rb +0 -205
- data/app/serializers/spotlight/featured_image_representer.rb +0 -29
- data/app/serializers/spotlight/main_navigation_representer.rb +0 -13
- data/app/serializers/spotlight/page_representer.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7004b788de24eca3d6f0b429b184c56ef6831ca2c161f5472cd6e9b5279bc9d6
|
4
|
+
data.tar.gz: fc95ee6947c984a4789a449986f3d6f2c7d6c10005c5f42039c89b6690cb92eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48af92f233fc293a2d3b1fb3783f12102e0851d0fcd5ddfd188e9e2313b3389742efcd67cc256186e3252cfe0722bc0a0f961bd1665f591396add0bccc22437f
|
7
|
+
data.tar.gz: 5073b54f60041abff381552ff072cfe1c07e6faa61719500c2f85a0e5de8e72a5852dc6571452225c5a27573cb76546b8c703b3f2149e2e4b3e57ab3a82fbcc9
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Read more about what Spotlight is, our motivations for creating it, and how to i
|
|
9
9
|
|
10
10
|
## Requirements
|
11
11
|
|
12
|
-
1. Ruby (2.
|
12
|
+
1. Ruby (2.5.0 or greater)
|
13
13
|
2. Rails (5.1 or greater)
|
14
14
|
3. Java (7 or greater) *for Solr*
|
15
15
|
4. ImageMagick (http://www.imagemagick.org/script/index.php) due to [carrierwave](https://github.com/carrierwaveuploader/carrierwave#adding-versions)
|
@@ -93,7 +93,7 @@ Spotlight ships with [`i18n-tasks`](https://github.com/glebm/i18n-tasks) to help
|
|
93
93
|
$ bundle exec i18n-tasks health
|
94
94
|
```
|
95
95
|
|
96
|
-
See [developer-facing instructions for enabling translation](https://github.com/projectblacklight/spotlight/wiki/Translations) on the wiki.
|
96
|
+
See [developer-facing instructions for enabling translation](https://github.com/projectblacklight/spotlight/wiki/Translations) on the wiki.
|
97
97
|
|
98
98
|
## Community
|
99
99
|
|
@@ -10,7 +10,7 @@ SirTrevor.Blocks.Browse = (function(){
|
|
10
10
|
autocomplete_url: function() {
|
11
11
|
return $(this.inner).closest('form[data-autocomplete-exhibit-searches-path]').data('autocomplete-exhibit-searches-path').replace("%25QUERY", "%QUERY");
|
12
12
|
},
|
13
|
-
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">{{
|
13
|
+
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">{{full_title}}</span><br/><small> {{description}}</small></div>' },
|
14
14
|
|
15
15
|
bloodhoundOptions: function() {
|
16
16
|
return {
|
@@ -21,6 +21,60 @@ SirTrevor.Blocks.Browse = (function(){
|
|
21
21
|
};
|
22
22
|
},
|
23
23
|
|
24
|
+
_itemPanel: function(data) {
|
25
|
+
var index = "item_" + this.globalIndex++;
|
26
|
+
var checked;
|
27
|
+
if (data.display == "true") {
|
28
|
+
checked = "checked='checked'"
|
29
|
+
} else {
|
30
|
+
checked = "";
|
31
|
+
}
|
32
|
+
var resource_id = data.slug || data.id;
|
33
|
+
var markup = [
|
34
|
+
'<li class="field form-inline dd-item dd3-item" data-resource-id="' + resource_id + '" data-id="' + index + '" id="' + this.formId("item_" + data.id) + '">',
|
35
|
+
'<input type="hidden" name="item[' + index + '][id]" value="' + resource_id + '" />',
|
36
|
+
'<input type="hidden" name="item[' + index + '][full_title]" value="' + (data.full_title || data.title) + '" />',
|
37
|
+
'<input data-property="weight" type="hidden" name="item[' + index + '][weight]" value="' + data.weight + '" />',
|
38
|
+
'<div class="card d-flex dd3-content">',
|
39
|
+
'<div class="dd-handle dd3-handle"><%= i18n.t("blocks:resources:panel:drag") %></div>',
|
40
|
+
'<div class="card-header item-grid">',
|
41
|
+
'<div class="d-flex">',
|
42
|
+
'<div class="checkbox">',
|
43
|
+
'<input name="item[' + index + '][display]" type="hidden" value="false" />',
|
44
|
+
'<input name="item[' + index + '][display]" id="'+ this.formId(this.display_checkbox + '_' + data.id) + '" type="checkbox" ' + checked + ' class="item-grid-checkbox" value="true" />',
|
45
|
+
'<label class="sr-only" for="'+ this.formId(this.display_checkbox + '_' + data.id) +'"><%= i18n.t("blocks:resources:panel:display") %></label>',
|
46
|
+
'</div>',
|
47
|
+
'<div class="pic">',
|
48
|
+
'<img class="img-thumbnail" src="' + (data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg"))) + '" />',
|
49
|
+
'</div>',
|
50
|
+
'<div class="main">',
|
51
|
+
'<div class="title card-title">' + (data.full_title || data.title) + '</div>',
|
52
|
+
'<div>' + (data.slug || data.id) + '</div>',
|
53
|
+
'</div>',
|
54
|
+
'<div class="remove float-right">',
|
55
|
+
'<a data-item-grid-panel-remove="true" href="#"><%= i18n.t("blocks:resources:panel:remove") %></a>',
|
56
|
+
'</div>',
|
57
|
+
'</div>',
|
58
|
+
'</div>',
|
59
|
+
'</div>',
|
60
|
+
'</li>'
|
61
|
+
].join("\n");
|
62
|
+
|
63
|
+
var panel = $(_.template(markup)(this));
|
64
|
+
var context = this;
|
65
|
+
|
66
|
+
$('.remove a', panel).on('click', function(e) {
|
67
|
+
e.preventDefault();
|
68
|
+
$(this).closest('.field').remove();
|
69
|
+
context.afterPanelDelete();
|
70
|
+
|
71
|
+
});
|
72
|
+
|
73
|
+
this.afterPanelRender(data, panel);
|
74
|
+
|
75
|
+
return panel;
|
76
|
+
},
|
77
|
+
|
24
78
|
item_options: function() { return [
|
25
79
|
'<label>',
|
26
80
|
'<input type="hidden" name="display-item-counts" value="false" />',
|
@@ -85,9 +85,13 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
85
85
|
'</div>',
|
86
86
|
'<div class="main form-horizontal">',
|
87
87
|
'<div class="title card-title">' + dataTitle + '</div>',
|
88
|
-
'<div class="field">',
|
88
|
+
'<div class="field row mr-3">',
|
89
89
|
'<label for="' + this.formId('caption_' + dataId) + '" class="col-form-label col-md-3"><%= i18n.t("blocks:uploaded_items:caption") %></label>',
|
90
|
-
'<input type="text" class="form-control" id="' + this.formId('caption_' + dataId) + '" name="item[' + index + '][caption]" data-field="caption"/>',
|
90
|
+
'<input type="text" class="form-control col" id="' + this.formId('caption_' + dataId) + '" name="item[' + index + '][caption]" data-field="caption"/>',
|
91
|
+
'</div>',
|
92
|
+
'<div class="field row mr-3">',
|
93
|
+
'<label for="' + this.formId('link_' + dataId) + '" class="col-form-label col-md-3"><%= i18n.t("blocks:uploaded_items:link") %></label>',
|
94
|
+
'<input type="text" class="form-control col" id="' + this.formId('link_' + dataId) + '" name="item[' + index + '][link]" data-field="link"/>',
|
91
95
|
'</div>',
|
92
96
|
'</div>',
|
93
97
|
'<div class="remove float-right">',
|
@@ -99,6 +103,7 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
99
103
|
|
100
104
|
var panel = $(_.template(markup)(this));
|
101
105
|
panel.find('[data-field="caption"]').val(data.caption);
|
106
|
+
panel.find('[data-field="link"]').val(data.link);
|
102
107
|
var context = this;
|
103
108
|
|
104
109
|
$('.remove a', panel).on('click', function(e) {
|
@@ -40,6 +40,12 @@ export default class Crop {
|
|
40
40
|
this.renderCropperMap();
|
41
41
|
|
42
42
|
if (this.imageLayer) {
|
43
|
+
// Force a broken layer's container to be an element before removing.
|
44
|
+
// Code in leaflet-iiif land calls delete on the image layer's container when removing,
|
45
|
+
// which errors if there is an issue fetching the info.json and stops further necessary steps to execute.
|
46
|
+
if(!this.imageLayer._container) {
|
47
|
+
this.imageLayer._container = $('<div></div>');
|
48
|
+
}
|
43
49
|
this.cropperMap.removeLayer(this.imageLayer);
|
44
50
|
}
|
45
51
|
|
@@ -269,6 +275,11 @@ export default class Crop {
|
|
269
275
|
|
270
276
|
successHandler(data, stat, xhr) {
|
271
277
|
this.setIiifFields({ tilesource: data.tilesource });
|
278
|
+
this.setUploadId(data.id);
|
279
|
+
}
|
280
|
+
|
281
|
+
setUploadId(id) {
|
282
|
+
$('#' + this.formPrefix + "_upload_id").val(id);
|
272
283
|
}
|
273
284
|
|
274
285
|
aspectRatioPreservingRectangleEditor(aspect) {
|
@@ -40,19 +40,28 @@
|
|
40
40
|
}
|
41
41
|
}
|
42
42
|
|
43
|
-
|
44
|
-
var group = groups[
|
45
|
-
var groupEl = $("<div class='st-controls-group'><div class='st-group-col-form-label'>" +
|
43
|
+
function generateBlock(groups, key) {
|
44
|
+
var group = groups[key];
|
45
|
+
var groupEl = $("<div class='st-controls-group'><div class='st-group-col-form-label'>" + key + "</div></div>");
|
46
46
|
var buttons = group.reduce(function(memo, btn) {
|
47
47
|
return memo += btn;
|
48
48
|
}, "");
|
49
49
|
groupEl.append(buttons);
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
return groupEl[0].outerHTML;
|
51
|
+
}
|
52
|
+
|
53
|
+
var standardWidgets = generateBlock(groups, i18n.t("blocks:group:undefined"));
|
54
|
+
|
55
|
+
var exhibitWidgets = Object.keys(groups).map(function(key) {
|
56
|
+
if (key !== i18n.t("blocks:group:undefined")) {
|
57
|
+
return generateBlock(groups, key);
|
54
58
|
}
|
55
|
-
}
|
59
|
+
}).filter(function (element) {
|
60
|
+
return element != null;
|
61
|
+
});
|
62
|
+
|
63
|
+
var blocks = [standardWidgets].concat(exhibitWidgets).join("<hr />");
|
64
|
+
return blocks;
|
56
65
|
}
|
57
66
|
|
58
67
|
function render(Blocks, availableTypes) {
|
@@ -65,7 +74,7 @@
|
|
65
74
|
elButtons.appendChild(el);
|
66
75
|
return elButtons;
|
67
76
|
}
|
68
|
-
|
77
|
+
|
69
78
|
global.Spotlight.BlockControls = function() { };
|
70
79
|
global.Spotlight.BlockControls.create = function(editor) {
|
71
80
|
// REFACTOR - should probably not know about blockManager
|
@@ -83,10 +92,10 @@
|
|
83
92
|
SirTrevor = null;
|
84
93
|
el = null;
|
85
94
|
}
|
86
|
-
|
95
|
+
|
87
96
|
function insert(e) {
|
88
97
|
e.stopPropagation();
|
89
|
-
|
98
|
+
|
90
99
|
var parent = this.parentNode;
|
91
100
|
if (!parent || hide() === parent) { return; }
|
92
101
|
$('.st-block__inner', parent).after(el);
|
@@ -101,7 +110,7 @@
|
|
101
110
|
|
102
111
|
$(editor.wrapper).delegate(".st-block-replacer", "click", insert);
|
103
112
|
$(editor.wrapper).delegate(".st-block-controls__button", "click", insert);
|
104
|
-
|
113
|
+
|
105
114
|
return {
|
106
115
|
el: el,
|
107
116
|
hide: hide,
|
@@ -11,7 +11,7 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
|
|
11
11
|
|
12
12
|
link_to_search: {
|
13
13
|
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
|
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.",
|
15
15
|
item_counts: "Include item counts?"
|
16
16
|
},
|
17
17
|
|
@@ -29,8 +29,9 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
|
|
29
29
|
|
30
30
|
uploaded_items: {
|
31
31
|
title: "Uploaded Item Row",
|
32
|
-
description: "This widget displays uploaded items in a horizontal row. Optionally, you can add a heading and/or text to be displayed adjacent to the items.",
|
33
|
-
caption: 'Caption'
|
32
|
+
description: "This widget displays uploaded items in a horizontal row. Optionally, you can add a heading and/or text to be displayed adjacent to the items. The item caption and link URL fields are also optional.",
|
33
|
+
caption: 'Caption',
|
34
|
+
link: 'Link URL'
|
34
35
|
},
|
35
36
|
|
36
37
|
featured_pages: {
|
@@ -26,6 +26,18 @@ $image-overlay-max-height: 300px;
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
29
|
+
.blacklight-browse-show {
|
30
|
+
.subtitle {
|
31
|
+
padding-right: $spacer;
|
32
|
+
|
33
|
+
&::before {
|
34
|
+
content: " \000B7 ";
|
35
|
+
color: $text-muted;
|
36
|
+
padding-right: $spacer / 2;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
29
41
|
.browse-landing {
|
30
42
|
text-align: center;
|
31
43
|
// Placeholder for vertically alignment - might already be available from use in another feature
|
@@ -70,6 +82,10 @@ $image-overlay-max-height: 300px;
|
|
70
82
|
font-size: $h3-font-size;
|
71
83
|
@extend %vertical-align;
|
72
84
|
|
85
|
+
.category-subtitle {
|
86
|
+
display: block;
|
87
|
+
}
|
88
|
+
|
73
89
|
small {
|
74
90
|
display: block;
|
75
91
|
color: $white;
|
@@ -122,14 +122,14 @@ form.edit_solr_document {
|
|
122
122
|
margin-right: $spacer * 0.1;
|
123
123
|
}
|
124
124
|
|
125
|
-
#document
|
126
|
-
|
127
|
-
color: $body-bg;
|
128
|
-
line-height: 2em;
|
129
|
-
}
|
130
|
-
|
125
|
+
#document,
|
126
|
+
.document {
|
131
127
|
.blacklight-exhibit_tags a {
|
132
128
|
@extend .badge;
|
133
129
|
@extend .badge-secondary;
|
130
|
+
|
131
|
+
&:not(:last-child) {
|
132
|
+
@extend .mr-2;
|
133
|
+
}
|
134
134
|
}
|
135
135
|
}
|
@@ -1,138 +1,236 @@
|
|
1
1
|
$featured-browse-category-border-color: $border-color;
|
2
2
|
$featured-browse-category-caption-color: $white;
|
3
|
-
|
4
|
-
|
5
|
-
$container-
|
6
|
-
//
|
7
|
-
$
|
8
|
-
$
|
9
|
-
$
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
//
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
$
|
22
|
-
|
23
|
-
//
|
24
|
-
$
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
$
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
$
|
34
|
-
$
|
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
|
-
|
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
|
68
|
+
text-shadow: 0 1px 0 $black;
|
50
69
|
width: 100%;
|
51
70
|
}
|
71
|
+
|
52
72
|
.category-title {
|
53
73
|
font-size: $font-size-lg;
|
54
74
|
line-height: 1.2;
|
55
75
|
margin: 0;
|
56
76
|
padding: $spacer / 4;
|
57
77
|
}
|
78
|
+
|
79
|
+
.category-subtitle {
|
80
|
+
display: block;
|
81
|
+
}
|
82
|
+
|
58
83
|
.item-count {
|
59
84
|
font-size: $font-size-base;
|
60
85
|
text-transform: uppercase;
|
61
86
|
}
|
62
87
|
}
|
63
88
|
|
64
|
-
|
65
|
-
|
89
|
+
.spotlight-flexbox.browse-categories {
|
90
|
+
justify-content: space-around;
|
91
|
+
|
92
|
+
.box {
|
93
|
+
flex: none;
|
94
|
+
margin-bottom: 1rem;
|
95
|
+
min-width: 150px;
|
96
|
+
padding: 0;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
// Most tile sizing works regardless of sidebar or not, because
|
101
|
+
// only "lg" and "xl" have a sidebar, and "lg" with a sidebar
|
102
|
+
// is the same width as "md" without a sidebar.
|
103
|
+
[data-sidebar="false"],
|
104
|
+
[data-sidebar="true"] {
|
105
|
+
&.categories-1, &.categories-2, &.categories-3,
|
106
|
+
&.categories-4, &.categories-5 {
|
66
107
|
.browse-category {
|
67
|
-
width: $
|
68
|
-
height: $
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
108
|
+
max-width: $maximum-tile-width;
|
109
|
+
max-height: $maximum-tile-width * $aspect-ratio-factor-4x3;
|
110
|
+
width: $xs-one-tile-width;
|
111
|
+
height: $xs-one-tile-width * $aspect-ratio-factor-4x3;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
&.categories-2 {
|
115
|
+
.browse-category {
|
116
|
+
@media (min-width: breakpoint-min("sm")) {
|
117
|
+
width: $sm-two-tile-width;
|
118
|
+
height: $sm-two-tile-width * $aspect-ratio-factor-4x3;
|
76
119
|
}
|
77
|
-
|
78
|
-
|
79
|
-
|
120
|
+
|
121
|
+
@media (min-width: breakpoint-min("md")) {
|
122
|
+
width: $md-two-tile-width;
|
123
|
+
height: $md-two-tile-width * $aspect-ratio-factor-4x3;
|
80
124
|
}
|
81
125
|
}
|
82
126
|
}
|
83
|
-
&.categories-
|
127
|
+
&.categories-3 {
|
84
128
|
.browse-category {
|
85
|
-
width:
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
129
|
+
@media (min-width: breakpoint-min("sm")) {
|
130
|
+
width: $sm-three-tile-width;
|
131
|
+
height: $sm-three-tile-width * $aspect-ratio-factor-4x3;
|
132
|
+
}
|
133
|
+
|
134
|
+
@media (min-width: breakpoint-min("md")) {
|
135
|
+
width: $md-three-tile-width;
|
136
|
+
height: $md-three-tile-width * $aspect-ratio-factor-4x3;
|
137
|
+
}
|
138
|
+
|
139
|
+
@media (min-width: breakpoint-min("lg")) {
|
140
|
+
width: $lg-three-tile-width;
|
141
|
+
height: $lg-three-tile-width * $aspect-ratio-factor-4x3;
|
90
142
|
}
|
91
143
|
}
|
92
|
-
|
93
|
-
|
144
|
+
}
|
145
|
+
&.categories-4 {
|
146
|
+
.browse-category {
|
147
|
+
@media (min-width: breakpoint-min("sm")) {
|
148
|
+
width: $sm-two-tile-width;
|
149
|
+
height: $sm-two-tile-width * $aspect-ratio-factor-4x3;
|
150
|
+
}
|
151
|
+
|
152
|
+
@media (min-width: breakpoint-min("md")) {
|
153
|
+
width: $md-two-tile-width;
|
154
|
+
height: $md-two-tile-width * $aspect-ratio-factor-4x3;
|
155
|
+
}
|
156
|
+
|
157
|
+
@media (min-width: breakpoint-min("lg")) {
|
158
|
+
width: $lg-four-tile-width;
|
159
|
+
height: $lg-four-tile-width * $aspect-ratio-factor-4x3;
|
160
|
+
}
|
161
|
+
|
162
|
+
@media (min-width: breakpoint-min("xl")) {
|
163
|
+
width: $xl-four-tile-width;
|
164
|
+
height: $xl-four-tile-width * $aspect-ratio-factor-4x3;
|
165
|
+
}
|
94
166
|
}
|
95
|
-
|
96
|
-
|
97
|
-
|
167
|
+
}
|
168
|
+
&.categories-5 {
|
169
|
+
.browse-category {
|
170
|
+
@media (min-width: breakpoint-min("sm")) {
|
171
|
+
width: $sm-three-tile-width;
|
172
|
+
height: $sm-three-tile-width * $aspect-ratio-factor-4x3;
|
173
|
+
}
|
174
|
+
|
175
|
+
@media (min-width: breakpoint-min("md")) {
|
176
|
+
width: $md-three-tile-width;
|
177
|
+
height: $md-three-tile-width * $aspect-ratio-factor-4x3;
|
178
|
+
}
|
179
|
+
|
180
|
+
@media (min-width: breakpoint-min("lg")) {
|
181
|
+
width: $lg-five-tile-width;
|
182
|
+
height: $lg-five-tile-width * $aspect-ratio-factor-4x3;
|
183
|
+
}
|
184
|
+
|
185
|
+
@media (min-width: breakpoint-min("xl")) {
|
186
|
+
width: $xl-five-tile-width;
|
187
|
+
height: $xl-five-tile-width * $aspect-ratio-factor-4x3;
|
188
|
+
}
|
98
189
|
}
|
99
190
|
}
|
100
191
|
}
|
101
192
|
|
193
|
+
// Special cases where the sizing above doesn't work when there is a sidebar.
|
194
|
+
// Note that "lg" with a sidebar has the same available width as "md"
|
195
|
+
// without a sidebar.
|
102
196
|
[data-sidebar="true"] {
|
103
|
-
&.categories-
|
197
|
+
&.categories-3 {
|
104
198
|
.browse-category {
|
105
|
-
width:
|
106
|
-
|
107
|
-
|
108
|
-
width: $with-sidebar-tablet-large-image-width;
|
109
|
-
height: $with-sidebar-tablet-large-image-width * $aspect-ratio-factor-large-image;
|
110
|
-
}
|
111
|
-
@media (min-width: breakpoint-min("md")) and (max-width: breakpoint-max("xl")) {
|
112
|
-
width: $with-sidebar-desktop-large-image-width;
|
113
|
-
height: $with-sidebar-desktop-large-image-width * $aspect-ratio-factor-large-image;
|
199
|
+
@media (min-width: breakpoint-min("lg")) {
|
200
|
+
width: $md-three-tile-width;
|
201
|
+
height: $md-three-tile-width * $aspect-ratio-factor-4x3;
|
114
202
|
}
|
203
|
+
|
115
204
|
@media (min-width: breakpoint-min("xl")) {
|
116
|
-
width: $
|
117
|
-
height: $
|
205
|
+
width: $xl-sidebar-three-tile-width;
|
206
|
+
height: $xl-sidebar-three-tile-width * $aspect-ratio-factor-4x3;
|
118
207
|
}
|
119
208
|
}
|
120
209
|
}
|
121
|
-
&.categories-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
width: $with-sidebar-xs-image-width;
|
127
|
-
height: $with-sidebar-xs-image-width * $aspect-ratio-factor-medium-image;
|
210
|
+
&.categories-4 {
|
211
|
+
.browse-category {
|
212
|
+
@media (min-width: breakpoint-min("lg")) {
|
213
|
+
width: $md-two-tile-width;
|
214
|
+
height: $md-two-tile-width * $aspect-ratio-factor-4x3;
|
128
215
|
}
|
216
|
+
|
129
217
|
@media (min-width: breakpoint-min("xl")) {
|
130
|
-
width: $
|
131
|
-
height: $
|
218
|
+
width: $xl-sidebar-four-tile-width;
|
219
|
+
height: $xl-sidebar-four-tile-width * $aspect-ratio-factor-4x3;
|
132
220
|
}
|
133
221
|
}
|
134
222
|
}
|
135
|
-
|
136
|
-
|
223
|
+
&.categories-5 {
|
224
|
+
.browse-category {
|
225
|
+
@media (min-width: breakpoint-min("lg")) {
|
226
|
+
width: $md-three-tile-width;
|
227
|
+
height: $md-three-tile-width * $aspect-ratio-factor-4x3;
|
228
|
+
}
|
229
|
+
|
230
|
+
@media (min-width: breakpoint-min("xl")) {
|
231
|
+
width: $xl-sidebar-five-tile-width;
|
232
|
+
height: $xl-sidebar-five-tile-width * $aspect-ratio-factor-4x3;
|
233
|
+
}
|
234
|
+
}
|
137
235
|
}
|
138
236
|
}
|