Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/assets/javascripts/spotlight/spotlight.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/javascripts/spotlight/spotlight.esm.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions app/assets/javascripts/spotlight/spotlight.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/javascripts/spotlight/spotlight.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions app/javascript/spotlight/admin/blocks/heading_block.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SirTrevor.Blocks.Heading = (function () {
return SirTrevor.Blocks.Heading.extend({
editorHTML: function() {
return `<p>${i18n.t("blocks:heading:description")}</p><hr><h2 class="st-required st-text-block st-text-block--heading" contenteditable="true"></h2>`;
}
});
})();
1 change: 1 addition & 0 deletions app/javascript/spotlight/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import 'spotlight/admin/blocks/block'
import 'spotlight/admin/blocks/resources_block' // This is a base class of several other blocks, so must come first
import 'spotlight/admin/blocks/browse_block'
import 'spotlight/admin/blocks/browse_group_categories_block'
import 'spotlight/admin/blocks/heading_block'
import 'spotlight/admin/blocks/iframe_block'
import 'spotlight/admin/blocks/link_to_search_block'
import 'spotlight/admin/blocks/oembed_block'
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/spotlight/admin/sir-trevor/locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ SirTrevor.Locales.en.blocks = $.extend(SirTrevor.Locales.en.blocks, {
item_counts: "Include category item counts?"
},

heading: {
description: "This widget produces an H2 heading"
},

link_to_search: {
title: "Saved Searches",
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.",
Expand Down