Skip to content

Commit 6026751

Browse files
committed
Add site title partial
Why these changes are being introduced: The GeoData visual design includes a heading at the top of each page, along with some descriptive text. Relevant ticket(s): https://mitlibraries.atlassian.net/browse/GDT-182 How this addresses that need: This adds the requested element as a partial, with conditional copy for GDT versus non-GDT applications. It also moves the label text to the `title` attribute, as the label is is now visually redundant but may still be useful to screen reader users. Side effects of this change: * The input label before form submit is now the same as the placeholder text. This feels fine since screen readers might not read placeholder text, but they do consistently rely on labels. * The copy for non-GDT titles did not come from UXWS and is subject to change. * The conditional title-in-nav has been removed from `site_nav`. This seems superfluous since we now have h1 tags.
1 parent 4783334 commit 6026751

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

app/assets/stylesheets/partials/_search.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.basic-search {
77
background-color: #989898;
88
margin-bottom: 0rem;
9-
padding: 1.6rem 2rem;
9+
padding: 2.4rem 2rem 1rem 2.4rem;
1010

1111
details {
1212
margin-top: 1rem;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<%= content_for(:title, "Search | MIT Libraries") %>
22

33
<div class="space-wrap">
4+
<%= render partial: "shared/site_title" %>
45
<%= render partial: "search/form" %>
56
<%= render partial: "static/about" if ENV.fetch('ABOUT_APP', nil) %>
67
</div>

app/views/layouts/_site_nav.html.erb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<div class="wrap-outer-header-local layout-band">
22
<div class="wrap-header-local">
3-
<% unless ENV['PLATFORM_NAME'] %>
4-
<div class="local-identity">
5-
<h2 class="title title-site"><a href="/">TIMDEX UI</a></h2>
6-
</div>
7-
<% end %>
83
<div class="wrap-local-nav">
94
<nav class="local-nav" aria-label="Main menu">
105
<%= nav_link_to("Home", root_path) %>

app/views/record/view.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<%= render(partial: 'shared/error', collection: @errors) %>
44

5+
<%= render(partial: 'shared/site_title') %>
56
<%= render(partial: 'search/form')%>
67

78
<% if @record.nil? %>

app/views/search/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ end
1919

2020
<form id="basic-search" class="form-horizontal basic-search" action="<%= results_path %>" method="get">
2121
<div class="form-group">
22-
<label for="basic-search-main" class="field-label"><%= label %></label>
22+
<label for="basic-search-main" class="field-label" title="<%= label %>" />
2323
<input id="basic-search-main" type="search" class="field field-text basic-search-input <%= "required" if search_required %>" name="q" placeholder="Enter your search" value="<%= params[:q] %>" <%= 'required="required" aria-required="true"' if search_required %>>
2424
<div class="basic-search-submit">
2525
<button type="submit" class="btn button-primary">Search</button>

app/views/search/results.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<%= content_for(:title, "Search Results | MIT Libraries") %>
22

33
<div class="space-wrap">
4+
5+
<%= render partial: "shared/site_title" %>
46
<%= render partial: "form" %>
57
<%= render partial: "search_summary" %>
68

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<% if Flipflop.enabled?(:gdt) %>
2+
<h1 class="hd-2">Search for Geographic/GIS data</h1>
3+
<p>Find GIS data held at MIT and other universities</p>
4+
<% else %>
5+
<h1 class="hd-2">Search the MIT Libraries</h1>
6+
<% end %>

app/views/static/_forms.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%
2-
label = "Search the MIT Libraries"
2+
label = "Enter your search"
33
button = "Search"
44
%>
55
<form id="basic-search" class="form-horizontal basic-search" action="/results" method="get">

0 commit comments

Comments
 (0)