Skip to content

Commit

Permalink
Merge pull request #118 from MITLibraries/gdt-182-new-title
Browse files Browse the repository at this point in the history
Add site title partial
  • Loading branch information
jazairi authored Feb 20, 2024
2 parents 4783334 + 6026751 commit 5c3f4d4
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/partials/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.basic-search {
background-color: #989898;
margin-bottom: 0rem;
padding: 1.6rem 2rem;
padding: 2.4rem 2rem 1rem 2.4rem;

details {
margin-top: 1rem;
Expand Down
1 change: 1 addition & 0 deletions app/views/basic_search/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<%= content_for(:title, "Search | MIT Libraries") %>

<div class="space-wrap">
<%= render partial: "shared/site_title" %>
<%= render partial: "search/form" %>
<%= render partial: "static/about" if ENV.fetch('ABOUT_APP', nil) %>
</div>
5 changes: 0 additions & 5 deletions app/views/layouts/_site_nav.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<div class="wrap-outer-header-local layout-band">
<div class="wrap-header-local">
<% unless ENV['PLATFORM_NAME'] %>
<div class="local-identity">
<h2 class="title title-site"><a href="/">TIMDEX UI</a></h2>
</div>
<% end %>
<div class="wrap-local-nav">
<nav class="local-nav" aria-label="Main menu">
<%= nav_link_to("Home", root_path) %>
Expand Down
1 change: 1 addition & 0 deletions app/views/record/view.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

<%= render(partial: 'shared/site_title') %>
<%= render(partial: 'search/form')%>

<% if @record.nil? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end

<form id="basic-search" class="form-horizontal basic-search" action="<%= results_path %>" method="get">
<div class="form-group">
<label for="basic-search-main" class="field-label"><%= label %></label>
<label for="basic-search-main" class="field-label" title="<%= label %>" />
<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 %>>
<div class="basic-search-submit">
<button type="submit" class="btn button-primary">Search</button>
Expand Down
2 changes: 2 additions & 0 deletions app/views/search/results.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<%= content_for(:title, "Search Results | MIT Libraries") %>

<div class="space-wrap">

<%= render partial: "shared/site_title" %>
<%= render partial: "form" %>
<%= render partial: "search_summary" %>

Expand Down
6 changes: 6 additions & 0 deletions app/views/shared/_site_title.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<% if Flipflop.enabled?(:gdt) %>
<h1 class="hd-2">Search for Geographic/GIS data</h1>
<p>Find GIS data held at MIT and other universities</p>
<% else %>
<h1 class="hd-2">Search the MIT Libraries</h1>
<% end %>
2 changes: 1 addition & 1 deletion app/views/static/_forms.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%
label = "Search the MIT Libraries"
label = "Enter your search"
button = "Search"
%>
<form id="basic-search" class="form-horizontal basic-search" action="/results" method="get">
Expand Down

0 comments on commit 5c3f4d4

Please sign in to comment.