Skip to content

Commit

Permalink
Merge pull request #3180 from projectblacklight/alt-text-widget
Browse files Browse the repository at this point in the history
Add alt text fields to widgets
  • Loading branch information
corylown authored Oct 9, 2024
2 parents 88580b5 + e4f129a commit e98d75c
Show file tree
Hide file tree
Showing 23 changed files with 443 additions and 36 deletions.
92 changes: 91 additions & 1 deletion 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.

92 changes: 91 additions & 1 deletion 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/helpers/spotlight/pages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,12 @@ def render_contact_email_address(address)
def configurations_for_current_page
Spotlight::PageConfigurations.new(context: self, page: @page).as_json
end

def resource_alt_text(options, default)
return '' if options[:decorative].present?
return options[:alt_text] if options[:alt_text].present?

default
end
end
end
Loading

0 comments on commit e98d75c

Please sign in to comment.