Skip to content

Commit

Permalink
Merge pull request #1785 from sul-dlss/1755-home-page-headings
Browse files Browse the repository at this point in the history
use h1/h3 for bento home pages
  • Loading branch information
Jessie Keck authored Sep 15, 2017
2 parents 9a8ade5 + 727f1b7 commit 5de2770
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
13 changes: 7 additions & 6 deletions app/assets/stylesheets/modules/home-page.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.article-home-page, .catalog-home-page {
h2, h4 {
.article-home-page, .catalog-home-page, .home-page-bento {
h2, h3, h4 {
font-weight: 400;
border-bottom: none;
}
Expand Down Expand Up @@ -54,12 +54,13 @@
margin: auto;
}

h4 {
font-weight: normal;
h3, p {
padding: 2px 10px;
}

h4, p {
padding: 2px 10px;
h3 {
padding-top: 5px;
padding-bottom: 0px;
}

.home-page-you-are-here {
Expand Down
14 changes: 7 additions & 7 deletions app/views/shared/_home_page_bento.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="home-page-bento">
<h4>Search Stanford's library resources</h4>
<h1>Search Stanford's library resources</h1>
<div class="row">
<div class="col-sm-3 col-xs-6 home-page-catalog <%= 'home-page-you-are-here' unless article_search? %>">
<div class="panel panel-default">
<div class="panel-body">
<%= image_tag 'homepage/catalog.jpg' %>
<h4><%= link_to_unless controller_name == 'catalog', 'Catalog', root_path %></h4>
<h3><%= link_to_unless controller_name == 'catalog', 'Catalog', root_path %></h3>
<p class="hidden-xs">Search the physical collections and digital resources of Stanford’s libraries. Find books, media, and <%= link_to 'topic-specific databases', databases_path %>.</p>
</div>
</div>
Expand All @@ -14,7 +14,7 @@
<div class="panel panel-default">
<div class="panel-body">
<%= image_tag 'homepage/articles.jpg' %>
<h4><%= link_to_unless article_search?, 'Articles+', articles_path %></h4>
<h3><%= link_to_unless article_search?, 'Articles+', articles_path %></h3>
<p class="hidden-xs">Search a combined index of 100s of databases, and connect directly to the article or resource.</p>
</div>
</div>
Expand All @@ -24,7 +24,7 @@
<div class="panel panel-default">
<div class="panel-body">
<%= image_tag 'homepage/website.jpg' %>
<h4><%= link_to 'Library website', 'https://library.stanford.edu' %></h4>
<h3><%= link_to 'Library website', 'https://library.stanford.edu' %></h3>
<p class="hidden-xs">Find topic specialists, blog posts, descriptions of our notable collections, as well as libraries, hours, and policies.</p>
</div>
</div>
Expand All @@ -33,7 +33,7 @@
<div class="panel panel-default">
<div class="panel-body">
<%= image_tag 'homepage/yewno.jpg' %>
<h4><%= link_to 'Yewno', 'https://yewno.com/edu' %></h4>
<h3><%= link_to 'Yewno', 'https://yewno.com/edu' %></h3>
<p class="hidden-xs">Explore concepts and connections, and understand interdisciplinary subjects, in a graph interface.</p>
</div>
</div>
Expand All @@ -43,7 +43,7 @@
<div class="col-md-12 home-page-bento bento-search-panel">
<div class="panel panel-default">
<div class="panel-body text-center">
<h4><%= link_to 'All of the above', root_path %></h4>
<h3><%= link_to 'All of the above', root_path %></h3>
<p class="hidden-xs">Get an overview of what’s available in all these sources for your search topic.</p>
</div>
</div>
Expand All @@ -58,7 +58,7 @@
<%= image_tag 'homepage/search.svg', class: 'media-object' %>
</div>
<div class="search-tools-body media-body">
<h4><%= link_to 'More search tools', 'https://library.stanford.edu/search-services' %></h4>
<h3><%= link_to 'More search tools', 'https://library.stanford.edu/search-services' %></h3>
<p class="hidden-xs">Discover and access library and archival materials, journals, databases, data, and e-resources beyond SearchWorks.</p>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions spec/views/shared/_home_page_bento.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

it 'links the "Articles+" section' do
render
expect(rendered).to have_css('h4 a', text: 'Articles+')
expect(rendered).to have_css('h3 a', text: 'Articles+')
end

it 'does not link the "Catalog" section' do
render
expect(rendered).to have_css('h4', text: 'Catalog')
expect(rendered).not_to have_css('h4 a', text: 'Catalog')
expect(rendered).to have_css('h3', text: 'Catalog')
expect(rendered).not_to have_css('h3 a', text: 'Catalog')
end
end

Expand All @@ -21,13 +21,13 @@

it 'links the "Catalog" section' do
render
expect(rendered).to have_css('h4 a', text: 'Catalog')
expect(rendered).to have_css('h3 a', text: 'Catalog')
end

it 'does not link the "Articles+" section' do
render
expect(rendered).to have_css('h4', text: 'Articles+')
expect(rendered).not_to have_css('h4 a', text: 'Articles+')
expect(rendered).to have_css('h3', text: 'Articles+')
expect(rendered).not_to have_css('h3 a', text: 'Articles+')
end
end
end

0 comments on commit 5de2770

Please sign in to comment.