From 727f1b7f51c1c4a43ca3348d4ee43ff93dac7c76 Mon Sep 17 00:00:00 2001 From: Darren Hardy Date: Thu, 14 Sep 2017 13:41:12 -0700 Subject: [PATCH] use h1/h3 for bento home pages --- app/assets/stylesheets/modules/home-page.scss | 13 +++++++------ app/views/shared/_home_page_bento.html.erb | 14 +++++++------- .../views/shared/_home_page_bento.html.erb_spec.rb | 12 ++++++------ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/assets/stylesheets/modules/home-page.scss b/app/assets/stylesheets/modules/home-page.scss index 3dfca39e2..495207623 100644 --- a/app/assets/stylesheets/modules/home-page.scss +++ b/app/assets/stylesheets/modules/home-page.scss @@ -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; } @@ -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 { diff --git a/app/views/shared/_home_page_bento.html.erb b/app/views/shared/_home_page_bento.html.erb index 500cc2d3b..5f5917d16 100644 --- a/app/views/shared/_home_page_bento.html.erb +++ b/app/views/shared/_home_page_bento.html.erb @@ -1,11 +1,11 @@
-

Search Stanford's library resources

+

Search Stanford's library resources

<%= image_tag 'homepage/catalog.jpg' %> -

<%= link_to_unless controller_name == 'catalog', 'Catalog', root_path %>

+

<%= link_to_unless controller_name == 'catalog', 'Catalog', root_path %>

@@ -14,7 +14,7 @@
<%= image_tag 'homepage/articles.jpg' %> -

<%= link_to_unless article_search?, 'Articles+', articles_path %>

+

<%= link_to_unless article_search?, 'Articles+', articles_path %>

@@ -24,7 +24,7 @@
<%= image_tag 'homepage/website.jpg' %> -

<%= link_to 'Library website', 'https://library.stanford.edu' %>

+

<%= link_to 'Library website', 'https://library.stanford.edu' %>

@@ -33,7 +33,7 @@
<%= image_tag 'homepage/yewno.jpg' %> -

<%= link_to 'Yewno', 'https://yewno.com/edu' %>

+

<%= link_to 'Yewno', 'https://yewno.com/edu' %>

@@ -43,7 +43,7 @@
-

<%= link_to 'All of the above', root_path %>

+

<%= link_to 'All of the above', root_path %>

@@ -58,7 +58,7 @@ <%= image_tag 'homepage/search.svg', class: 'media-object' %>
-

<%= link_to 'More search tools', 'https://library.stanford.edu/search-services' %>

+

<%= link_to 'More search tools', 'https://library.stanford.edu/search-services' %>

diff --git a/spec/views/shared/_home_page_bento.html.erb_spec.rb b/spec/views/shared/_home_page_bento.html.erb_spec.rb index 9128682fc..187e686b9 100644 --- a/spec/views/shared/_home_page_bento.html.erb_spec.rb +++ b/spec/views/shared/_home_page_bento.html.erb_spec.rb @@ -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 @@ -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