Skip to content

Commit

Permalink
🧹 update partials to use alt tags for images
Browse files Browse the repository at this point in the history
This ticket was to confirm that the user can set
the alt text and that it is used in the html. We
discoverd that some of the settable alt text
options are not being used in the html and updated
the ones that were.

- Issue #43
  • Loading branch information
Shana Moore committed Jul 18, 2023
1 parent 25f8a88 commit 26294c1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/layouts/homepage.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% content_for(:navbar) do %>
<div class="image-masthead">
<!-- default repository homepage -->
<div class="background-container" title="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<div class="background-container" <%= alt: block_for(name: 'banner_image_text') %> style="background-image: url('<%= banner_image %>')"></div>
<span class="background-container-gradient"></span>

<div class="container site-title-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% content_for(:navbar) do %>
<div class="image-masthead cultural-homepage">
<!-- cultural repository homepage -->
<div class="background-container" style="background-image: url('<%= banner_image %>')" title="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="background-container" style="background-image: url('<%= banner_image %>')" alt="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="container">
<% if controller_name == 'homepage' %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/themes/dc_repository/_logo.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<a id="logo" class="navbar-brand d-flex" href="<%= hyrax.root_path %>" data-no-turbolink="true">
<span class="glyphicon glyphicon-globe" role="img" aria-label="<%= application_name %>" aria-hidden="true"></span>
<%# OVERRIDE: Hyrax v3.4.1 Change logo image for small screens %>
<%= image_tag logo_image, alt_text: block_for(name: 'logo_image_text'), class: "visible-md-lg-xl hidden-sm hidden-xs" %>
<%= image_tag logo_image, alt: block_for(name: 'logo_image_text'), class: "visible-md-lg-xl hidden-sm hidden-xs" %>
<%# OVERRIDE: Hyrax v3.4.1 add image tag for small logo %>
<%= image_tag "ut-square", alt_text: block_for(name: 'logo_image_text'), class: "visible-xs-sm hidden-md hidden-lg hidden-xl" %>
<%= image_tag "ut-square", alt: block_for(name: 'logo_image_text'), class: "visible-xs-sm hidden-md hidden-lg hidden-xl" %>
</a>
<% else %>
<a id="logo" class="navbar-brand logo d-flex" href="<%= hyrax.root_path %>" data-no-turbolink="true">
Expand Down
2 changes: 1 addition & 1 deletion app/views/themes/dc_repository/layouts/homepage.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% content_for(:navbar) do %>
<div class="image-masthead d-flex">
<!-- dc-repository homepage -->
<div class="background-container" title="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<div class="background-container" alt="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<% # OVERRIDE: Hyrax v3.4.1 - remove background-container-gradient %>
<% # OVERRIDE: Hyrax v3.4.1 - remove site-title-container %>
<% # OVERRIDE: Hyrax v3.4.1 - add divs and classes for custom styles %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% content_for(:navbar) do %>
<div class="image-masthead">
<!-- institutional repository homepage -->
<div class="background-container" style="background-image: url('<%= banner_image %>')" title="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="background-container" style="background-image: url('<%= banner_image %>')" alt="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="container site-title-container">
<div class="site-title h1" style="text-align: center;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% content_for(:navbar) do %>
<div class="image-masthead">
<!-- neutral repository homepage -->
<div class="background-container" title="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<div class="background-container" alt="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<div class="container site-title-container mb-40">
<div class="site-title h1" style="text-align: center;">
Expand Down

0 comments on commit 26294c1

Please sign in to comment.