Skip to content

Commit

Permalink
🔄 Revert homepage
Browse files Browse the repository at this point in the history
This commit will revert the homepage partials to use title tags instead
of alt because the image is a background image in a div and not an
actual <img> image.
  • Loading branch information
kirkkwang committed Jul 18, 2023
1 parent 5d21a37 commit cc055ec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions 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" <%= alt: block_for(name: 'banner_image_text') %> style="background-image: url('<%= banner_image %>')"></div>
<div class="background-container" title="<%= 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 All @@ -18,4 +18,4 @@
<%= render 'hyrax/homepage/announcement' if controller_name == 'homepage' %>
<% end %>
<%= render template: 'layouts/hyrax' %>
<%= render template: 'layouts/hyrax' %>
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 %>')" alt="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="background-container" style="background-image: url('<%= banner_image %>')" title="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="container">
<% if controller_name == 'homepage' %>
Expand All @@ -25,4 +25,4 @@
<%= render 'hyrax/homepage/announcement' if controller_name == 'homepage' || controller_name == 'hyrax_contact_form' || controller_name == 'pages' %>
<% end %>
<%= render template: 'layouts/hyrax' %>
<%= render template: 'layouts/hyrax' %>
12 changes: 6 additions & 6 deletions 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" alt="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<div class="background-container" title="<%= 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 All @@ -20,19 +20,19 @@
<div class="circle d-flex">
<div class='circle-text'>
<%# Dynamically show number of collections and works %>
<% collection_count = number_to_human(Collection.count, units: {thousand: "K"}) %>
<% collection_count = number_to_human(Collection.count, units: {thousand: "K"}) %>
<%= collection_count.gsub(/\s+/, "") %> Collections
<% work_count = GenericWork.count + Image.count + Audio.count + Book.count + CompoundObject.count + Newspaper.count + Pdf.count + Video.count %>
<% work_count_converted = number_to_human(work_count, units: {thousand: "K"}) %>
<% work_count_converted = number_to_human(work_count, units: {thousand: "K"}) %>
<%= work_count_converted.gsub(/\s+/, "") %> Works and more.
</div>
</div>
</div>
</div>
</div>
</div>
<div class='controls-container'>
<div class='controls-container'>
<div class='controls'>
<%= render '/controls' %>
</div>
Expand All @@ -44,4 +44,4 @@
<%= render 'hyrax/homepage/announcement' if controller_name == 'homepage' %>
<% end %>
<%= render template: 'layouts/hyrax' %>
<%= render template: 'layouts/hyrax' %>
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 %>')" alt="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="background-container" style="background-image: url('<%= banner_image %>')" title="<%= block_for(name: 'banner_image_text') %>"></div>
<div class="container site-title-container">
<div class="site-title h1" style="text-align: center;">
Expand Down Expand Up @@ -47,4 +47,4 @@
<%= render 'hyrax/homepage/announcement' if controller_name == 'homepage' %>
<% end %>
<%= render template: 'layouts/hyrax' %>
<%= render template: 'layouts/hyrax' %>
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" alt="<%= block_for(name: 'banner_image_text') %>" style="background-image: url('<%= banner_image %>')"></div>
<div class="background-container" title="<%= 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 cc055ec

Please sign in to comment.