Skip to content

Commit

Permalink
Remove the application name from an h1, and bump up page titles (and …
Browse files Browse the repository at this point in the history
…other headers) as appropriate
  • Loading branch information
cbeer committed Mar 30, 2018
1 parent a79ddeb commit d43e24a
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 deletions.
7 changes: 3 additions & 4 deletions app/views/bookmarks/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<% @page_title = t('blacklight.bookmarks.page_title', :application_name => application_name) %>

<div id="content" class="col-md-12">
<h2 class='page-heading'><%= t('blacklight.bookmarks.title') %></h2>
<h1 class='page-heading'><%= t('blacklight.bookmarks.title') %></h1>

<%- if current_or_guest_user.blank? -%>

<h3 class='section-heading'><%= t('blacklight.bookmarks.need_login') %></h3>
<h2 class='section-heading'><%= t('blacklight.bookmarks.need_login') %></h2>

<%- elsif @response.documents.blank? -%>

<h3 class='section-heading'><%= t('blacklight.bookmarks.no_bookmarks') %></h3>
<h2 class='section-heading'><%= t('blacklight.bookmarks.no_bookmarks') %></h2>
<% else %>
<%= render 'sort_and_per_page' %>
<%= render partial: 'tools', locals: { document_list: @response.documents } %>
Expand All @@ -18,4 +18,3 @@
<%= render 'results_pagination' %>
<% end %>
</div>

8 changes: 4 additions & 4 deletions app/views/catalog/_citation.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<% @documents.each do |document| %>

<h3 class="modal-title"><%= document_heading(document) %></h3>
<h1 class="modal-title"><%= document_heading(document) %></h1>

<% if document.respond_to?(:export_as_mla_citation_txt) %>
<h4><%= t('blacklight.citation.mla') %></h4>
<h2><%= t('blacklight.citation.mla') %></h2>
<%= document.send(:export_as_mla_citation_txt).html_safe %><br/><br/>
<% end %>
<% if document.respond_to?(:export_as_apa_citation_txt) %>
<h4><%= t('blacklight.citation.apa') %></h4>
<h2><%= t('blacklight.citation.apa') %></h2>
<%= document.send(:export_as_apa_citation_txt).html_safe %><br/><br/>
<% end %>
<%- if document.respond_to?(:export_as_chicago_citation_txt) -%>
<h4><%= t('blacklight.citation.chicago') %></h4>
<h2><%= t('blacklight.citation.chicago') %></h2>
<%= document.send(:export_as_chicago_citation_txt).html_safe %>
<%- end -%>
Expand Down
3 changes: 2 additions & 1 deletion app/views/catalog/_did_you_mean.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% if should_show_spellcheck_suggestions? @response %>
<div id="spell">
<h4 class="suggest"><em><%= t('blacklight.did_you_mean', :options => safe_join(@response.spelling.words.map { |word| link_to_query(word) }, " #{t('blacklight.or')} ")).html_safe %></em></h4>
<!-- TODO -->
<h3 class="suggest"><em><%= t('blacklight.did_you_mean', :options => safe_join(@response.spelling.words.map { |word| link_to_query(word) }, " #{t('blacklight.or')} ")).html_safe %></em></h3>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/catalog/_group.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% # container for all groups in index view -%>
<div id="groups">
<%- @response.groups.each do |g| %>
<h3 class="group-key"><%= g.key %></h3>
<h2 class="group-key"><%= g.key %></h2>
<div class="grouped-documents">
<%= render_document_index g.docs %>
</div>
Expand Down
8 changes: 4 additions & 4 deletions app/views/catalog/_home_text.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<div class="jumbotron text-center">
<h2 class="jumbotron-heading"><%= t('blacklight.welcome') %></h2>
<h1 class="jumbotron-heading"><%= t('blacklight.welcome') %></h1>

<p class="lead">Blacklight is a multi-institutional open-source collaboration building a better discovery platform framework.</p>

<p>
<%= link_to 'Read the Documentation', 'https://github.com/projectblacklight/blacklight/wiki', class: 'btn btn-primary' %>
<%= link_to 'See Examples', 'http://projectblacklight.org', class: 'btn btn-secondary' %>
</p>
</div>

<div id="getting-started">
<h3>Here’s how to get started customizing your application:</h3>
<h2>Here’s how to get started customizing your application:</h2>

<p>There are many ways to override specific behaviors and views in Blacklight. Because Blacklight is distributed as a Rails engine-based gem, all customization of Blacklight behavior should be done within your application by overriding Blacklight-provided behaviors with your own.</p>

Expand All @@ -31,7 +31,7 @@

<%# This is the same panel shown in the Rails welcome template %>
<div id="about" class="card">
<h3 class='card-header collapsed collapse-toggle' data-toggle="collapse" data-target="#about-content"><a href="/rails/info/properties">About your application&rsquo;s environment</a></h3>
<h2 class='card-header collapsed collapse-toggle' data-toggle="collapse" data-target="#about-content"><a href="/rails/info/properties">About your application&rsquo;s environment</a></h2>
<div id="about-content" class="card-block collapse"></div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/views/catalog/_index_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<%= render_index_doc_actions document, wrapping_class: "index-document-functions col-sm-3 col-lg-2" %>
<% end %>
<h3 class="index_title document-title-heading <%= document_actions.present? ? "col-sm-9 col-lg-10" : "col-md-12" %>">
<h2 class="index_title document-title-heading <%= document_actions.present? ? "col-sm-9 col-lg-10" : "col-md-12" %>">
<% if counter = document_counter_with_offset(document_counter) %>
<span class="document-counter">
<%= t('blacklight.search.documents.counter', counter: counter) %>
</span>
<% end %>
<%= link_to_document document, document_show_link_field(document), counter: counter %>
</h3>
</h2>
<%= document_actions %>
</header>
2 changes: 1 addition & 1 deletion app/views/catalog/_search_results.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h2 class="sr-only top-content-title"><%= t('blacklight.search.search_results_header') %></h2>
<h1 class="sr-only top-content-title"><%= t('blacklight.search.search_results_header') %></h1>

<% @page_title = t('blacklight.search.page_title.title', :constraints => render_search_to_page_title(params), :application_name => application_name) %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/catalog/_zero_results.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2><%= t 'blacklight.search.zero_results.title' %></h2>
<h1><%= t 'blacklight.search.zero_results.title' %></h1>
<div id="documents" class="noresults">
<h3><%= t 'blacklight.search.zero_results.modify_search' %></h3>
<h2><%= t 'blacklight.search.zero_results.modify_search' %></h2>
<ul>
<li><%= t 'blacklight.search.zero_results.use_fewer_keywords' %></li>

<%- if params[:q] and params[:search_field] and params[:search_field] != blacklight_config.default_search_field.try(:key) -%>
<li><%= t 'blacklight.search.zero_results.search_fields', :search_fields => search_field_label(params) %> -
<li><%= t 'blacklight.search.zero_results.search_fields', :search_fields => search_field_label(params) %> -
<%= link_to t('blacklight.search.zero_results.search_everything', field: blacklight_config.default_search_field.label), url_for(search_state.params_for_search(search_field: blacklight_config.default_search_field.key)) %>
</li>
<%- end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/catalog/citation.js.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="modal-header">
<h3><%= t('blacklight.tools.citation') %></h3>
<h1><%= t('blacklight.tools.citation') %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
Expand Down
4 changes: 2 additions & 2 deletions app/views/catalog/facet.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</div>

<div class="modal-header">
<h3 class="modal-title"><%= facet_field_label(@facet.key) %></h3>
<h1 class="modal-title"><%= facet_field_label(@facet.key) %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
Expand All @@ -15,7 +15,7 @@
<%= render_facet_limit(@display_facet, layout: false) %>
</div>
</div>

<div class="modal-footer">

<div class="facet-pagination bottom">
Expand Down
8 changes: 4 additions & 4 deletions app/views/layouts/blacklight.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<% content_for(:content) do %>
<% if content_for? :sidebar %>
<section id="sidebar" class="<%= sidebar_classes %>">
<%= content_for(:sidebar) %>
<section id="content" class="<%= main_content_classes %> order-last">
<%= yield %>
</section>

<section id="content" class="<%= main_content_classes %>">
<%= yield %>
<section id="sidebar" class="<%= sidebar_classes %> order-first">
<%= content_for(:sidebar) %>
</section>
<% else %>
<section class="col-md-12">
Expand Down
6 changes: 3 additions & 3 deletions app/views/search_history/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<% @page_title = t('blacklight.search_history.page_title', :application_name => application_name) %>

<div id="content" class="col-md-12">
<h2 class='page-heading'><%= t('blacklight.search_history.title') %></h2>
<h1 class='page-heading'><%= t('blacklight.search_history.title') %></h1>
<% if @searches.blank? %>
<h3 class='section-heading'><%= t('blacklight.search_history.no_history') %></h3>
<h2 class='section-heading'><%= t('blacklight.search_history.no_history') %></h2>
<% else %>
<%= link_to t('blacklight.search_history.clear.action_title'),
blacklight.clear_search_history_path,
method: :delete,
data: { confirm: t('blacklight.search_history.clear.action_confirm') },
class: 'btn btn-danger float-md-right' %>
<h3 class='section-heading'><%= t('blacklight.search_history.recent') %></h3>
<h2 class='section-heading'><%= t('blacklight.search_history.recent') %></h2>
<table class="table table-striped search-history">
<% @searches.each_with_index do |search,index| %>
<tr id="document_<%= index + 1 %>">
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_header_navbar.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nav class="navbar navbar-expand-md navbar-dark bg-dark topbar" role="navigation">
<div class="<%= container_classes %>">
<h1 class="mb-0 navbar-brand"><%= link_to application_name, root_path %></h1>
<%= link_to application_name, root_path, class: 'mb-0 navbar-brand' %>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
2 changes: 1 addition & 1 deletion spec/views/catalog/facet.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
it "has the facet title" do
allow(view).to receive(:render_facet_limit)
render
expect(rendered).to have_selector 'h3', text: "Facet title"
expect(rendered).to have_selector 'h2', text: "Facet title"
end

it "renders facet pagination" do
Expand Down

0 comments on commit d43e24a

Please sign in to comment.