Skip to content

Commit 868d4d2

Browse files
dnoneillcorylown
authored andcommitted
initial style-library update
1 parent 0956715 commit 868d4d2

14 files changed

+38
-251
lines changed

app/assets/stylesheets/sulHeader.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
background-color: var(--stanford-black);
1717
border-top: none;
1818
margin-bottom: 0;
19-
20-
.form-select {
21-
background-size: 1.125rem 1.125rem;
22-
padding-top: 0;
23-
padding-bottom: 0;
24-
}
2519

2620
/* fill entire width on small screens, 75% when larger */
2721
.search-query-form {
@@ -57,12 +51,6 @@
5751
}
5852
}
5953

60-
.masthead ~ .navbar-search .custom-select.form-select {
61-
width: auto;
62-
flex: 0 0 auto;
63-
border: none;
64-
}
65-
6654
/* Misc other styles */
6755
.searchtips-link a {
6856
color: white;

app/assets/stylesheets/sulLanding.css

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,35 +43,6 @@
4343
}
4444
}
4545

46-
.input-group > .search-autocomplete-wrapper input:focus {
47-
box-shadow: none;
48-
}
49-
50-
.search-query-form .input-group:focus-within {
51-
box-shadow: 0 0 0 0.25rem rgba(var(--stanford-digital-blue-rgb), 0.25);
52-
}
53-
54-
/* Remove left border from the search input on the landing page */
55-
.input-group .search-autocomplete-wrapper::before {
56-
width: 0px;
57-
}
58-
59-
.input-group input {
60-
background-image: none;
61-
background-repeat: no-repeat;
62-
background-position: 0.5rem center;
63-
padding-left: 0.75rem;
64-
}
65-
66-
@media (min-width: 768px) {
67-
.input-group input {
68-
background-image: url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" width="32" height="32" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path fill="%23585754" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
69-
background-repeat: no-repeat;
70-
background-position: 0.5rem center;
71-
padding-left: 2.75rem;
72-
}
73-
}
74-
7546
li a {
7647
font-size: 1.125rem;
7748
font-weight: 350;
@@ -121,12 +92,6 @@
12192
border-radius: 0;
12293
}
12394

124-
.input-group {
125-
input {
126-
font-style: italic;
127-
}
128-
}
129-
13095
.landing-page-access,
13196
.landing-page-info {
13297
--bs-border-color: var(--stanford-70-black);
Lines changed: 2 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,3 @@
1-
/* Input group styles -- make sure to only impact input-groups within .navbar-search */
2-
.search-query-form {
3-
.input-group {
4-
height: 2.75rem;
5-
border-radius: var(--bs-border-radius);
6-
7-
.search-autocomplete-wrapper,
8-
input,
9-
select {
10-
border: none;
11-
}
12-
13-
.search-autocomplete-wrapper ul li:active {
14-
color: var(--stanford-black);
15-
background-color: var(--grey-lighter);
16-
}
17-
}
18-
19-
.input-group.within-collection-dropdown {
20-
background-color: var(--bs-body-bg);
21-
border-radius: var(--bs-border-radius);
22-
position: relative;
23-
}
24-
25-
.input-group.within-collection-dropdown select {
26-
border: none;
27-
}
28-
29-
.input-group.within-collection-dropdown .input-group-text {
30-
padding-left: 0;
31-
padding-right: 1.25rem;
32-
background-color: var(--stanford-black);
33-
border: none;
34-
color: white;
35-
font-weight: 700;
36-
padding-top: 0.25rem;
37-
padding-bottom: 0.25rem;
38-
}
39-
40-
/* make dividers 80% of height to match designs */
41-
.input-group.within-collection-dropdown::after,
42-
.input-group:has(.custom-select)::after {
43-
content: "";
44-
position: absolute;
45-
top: 50%;
46-
transform: translateY(-50%);
47-
height: 80%;
48-
width: 1px;
49-
background-color: var(--stanford-40-black);
50-
pointer-events: none;
51-
}
52-
53-
.input-group.within-collection-dropdown::after {
54-
right: 0;
55-
}
56-
57-
.input-group:has(.custom-select)::after {
58-
left: 0;
59-
}
60-
61-
@media(min-width: 768px) {
62-
.input-group:has(.custom-select)::after {
63-
left: 8rem;
64-
}
65-
}
1+
#search .submit-search-text {
2+
margin-right: 0!important;
663
}
67-
68-
/* Bootstrap overrides -- needs to be this specific in order to work */
69-
.input-group.within-collection-dropdown> :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
70-
border-top-left-radius: var(--bs-border-radius);
71-
border-bottom-left-radius: var(--bs-border-radius);
72-
border-top-right-radius: 0;
73-
border-bottom-right-radius: 0;
74-
}
75-
76-
/* Search button -- says "Search" or displays magnifying glass icon depending on size
77-
See SearchButtonComponent
78-
*/
79-
.input-group>.search-btn-wrapper {
80-
background-color: var(--bs-body-bg);
81-
border: none;
82-
height: 100%;
83-
align-items: center;
84-
align-self: center;
85-
}
86-
87-
.input-group>.search-btn-wrapper .search-btn {
88-
border-radius: var(--bs-btn-border-radius);
89-
margin: 0.5rem;
90-
padding: 0.25rem 0.5rem;
91-
max-height: 2.25rem;
92-
align-items: center;
93-
}
94-
95-
@media (min-width: 768px) {
96-
.input-group .search-btn-wrapper .search-btn {
97-
padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
98-
}
99-
}
100-
101-
/* Search icon -- the magnifying glass on left side of bar */
102-
.blacklight-icons-search {
103-
background-color: transparent;
104-
}
105-
106-
.blacklight-icons-search svg {
107-
margin: 0;
108-
fill: var(--grey-lighter);
109-
width: 1.5rem;
110-
}
111-
112-
@media (min-width: 768px) {
113-
.blacklight-icons-search {
114-
align-self: center;
115-
background-color: var(--bs-body-bg);
116-
}
117-
118-
.blacklight-icons-search svg {
119-
margin: 0 0 0 0.5rem;
120-
fill: var(--stanford-80-black);
121-
}
122-
}

app/components/arclight/search_bar_component.html.erb

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,15 @@
55
search_field: @search_field,
66
form_options: { data: { controller: "search-form" } })) do |c| %>
77

8-
<% c.with_before_input_group do %>
9-
<div class="input-group within-collection-dropdown">
10-
<%# don't show magnifying glass icon if screen smaller than md breakpoint %>
11-
<span class="d-none d-md-flex">
12-
<%= render(Blacklight::Icons::SearchComponent.new) %>
13-
</span>
14-
<label class="visually-hidden" for="within_collection">
15-
<%= t('arclight.within_collection_dropdown.label_html') %>
16-
</label>
17-
<%= select_tag ('f[collection][]' if collection_name.present?), within_collection_options, id: 'within_collection', class: 'form-select search-field' %>
18-
</div>
19-
<% end %>
20-
218
<% c.with_prepend do %>
9+
<label class="visually-hidden" for="within_collection">
10+
<%= t('arclight.within_collection_dropdown.label_html') %>
11+
</label>
12+
<%= select_tag ('f[collection][]' if collection_name.present?), within_collection_options, id: 'within_collection', class: 'form-select search-field' %>
2213
<%= prepend %>
2314
<% end %>
2415

2516
<% c.with_append do %>
2617
<%= append %>
2718
<% end if append? %>
28-
29-
<% c.with_search_button do %>
30-
<%= render SearchButtonComponent.new(id: "#{@prefix}search", text: scoped_t('submit')) %>
31-
<% end %>
3219
<% end %>

app/components/blacklight/icons/search_component.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/components/blacklight/top_navbar_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<nav class="navbar navbar-expand-md navbar-dark topbar bg-dark" data-controller="analytics" role="navigation">
22
<div class="container">
3-
<%= logo_link(title: 'Stanford Libraries') %>
3+
<%= logo_link(title: 'Stanford University Libraries') %>
44
<button class="navbar-toggler navbar-toggler-right collapsed" type="button" data-toggle="collapse" data-bs-toggle="collapse" data-target="#user-util-collapse" data-bs-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="Toggle navigation">
55
<span class="navbar-toggler-icon"></span>
66
</button>
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
<%= form_with url: @url, local: true, method: @method, class: @classes.join(' '), scope: @prefix, role: 'search', **@form_options do |f| %>
2-
<%= render Blacklight::HiddenSearchStateComponent.new(params: @params) %>
3-
4-
<%= f.label @query_param, scoped_t('search.label'), class: 'sr-only visually-hidden' %>
5-
1+
<div class="container d-flex flex-wrap flex-column justify-content-start">
62
<div class="d-flex flex-column flex-lg-row">
7-
<div class="input-group rounded-2 flex-grow-1">
8-
<% if autocomplete_path.present? %>
9-
<auto-complete src="<%= autocomplete_path %>" for="autocomplete-popup" class="search-autocomplete-wrapper">
10-
<%= f.search_field @query_param, value: @q, placeholder: scoped_t('search.placeholder'), class: "search-q q form-control", autofocus: @autofocus, aria: { label: scoped_t('search.label'), autocomplete: 'list', controls: 'autocomplete-popup' } %>
11-
<ul id="autocomplete-popup" class="dropdown-menu" role="listbox" aria-label="<%= scoped_t('search.label') %>"></ul>
12-
</auto-complete>
13-
<% else %>
14-
<%= f.search_field @query_param, value: @q, placeholder: scoped_t('search.placeholder'), class: "search-q q form-control", autofocus: @autofocus, aria: { label: scoped_t('search.label') } %>
15-
<% end %>
16-
<%= append %>
17-
<%= with_search_button %>
18-
</div>
3+
<%= form_with url: @url, local: true, method: @method, class: @classes.join(' '), scope: @prefix, role: 'search', **@form_options do |f| %>
4+
<%= render Blacklight::HiddenSearchStateComponent.new(params: @params) %>
5+
6+
<%= f.label @query_param, scoped_t('search.label'), class: 'sr-only visually-hidden' %>
7+
8+
<div class="input-group rounded-2 flex-grow-1">
9+
<% if autocomplete_path.present? %>
10+
<auto-complete src="<%= autocomplete_path %>" for="autocomplete-popup" class="search-autocomplete-wrapper">
11+
<%= f.search_field @query_param, value: @q, placeholder: scoped_t('search.placeholder'), class: "search-q q form-control", autofocus: @autofocus, aria: { label: scoped_t('search.label'), autocomplete: 'list', controls: 'autocomplete-popup' } %>
12+
<ul id="autocomplete-popup" class="dropdown-menu" role="listbox" aria-label="<%= scoped_t('search.label') %>"></ul>
13+
</auto-complete>
14+
<% else %>
15+
<%= f.search_field @query_param, value: @q, placeholder: scoped_t('search.placeholder'), class: "search-q q form-control", autofocus: @autofocus, aria: { label: scoped_t('search.label') } %>
16+
<% end %>
17+
<%= append %>
18+
<%= render Blacklight::SearchButtonComponent.new(id: "#{@prefix}search", text: scoped_t('submit')) %>
19+
</div>
20+
<% end %>
1921
<%= render SearchTipsLinkComponent.new(custom_classes: 'd-flex text-nowrap align-self-start align-self-lg-center') %>
2022
</div>
21-
22-
2323
<div class="search-links">
2424
<ul class="ps-md-0 pt-3">
2525
<%# Temporarily removing Advanced Search link per https://github.com/sul-dlss/stanford-arclight/issues/554 %>
26-
<%# <li> link_to 'Advanced Search', advanced_search_catalog_path</li> %>
26+
<%# <li> link_to 'Advanced Search', advanced_search_catalog_path</li> %>
2727
<li><%= link_to 'Browse all collections', helpers.arclight_engine.collections_path %></li>
2828
<li><%= link_to 'Browse repositories', helpers.arclight_engine.repositories_path %></li>
2929
</ul>
3030
</div>
31-
<% end %>
31+
</div>

app/components/landing_page_search_bar_component.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@ def initialize(**kwargs)
88
# Default to grouping search results by collection.
99
@params = @params.merge(@params, group: true)
1010
end
11-
12-
def with_search_button
13-
render SearchButtonComponent.new(id: "#{@prefix}search", text: scoped_t('submit'))
14-
end
1511
end

app/components/search_button_component.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/components/using_these_materials_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="card-body">
44
<div class="d-flex align-items-center justify-content-between mb-3">
55
<h2 class="al-show-sub-heading fs-6 mb-0"><%= t("using_these_materials.heading") %></h2>
6-
<%= image_tag 'https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2025-07-28/styles/icon.png', alt: '', height: '42', width: '42', class: 'ms-2' %>
6+
<%= image_tag 'https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2026-01-27/styles/icon.png', alt: '', height: '42', width: '42', class: 'ms-2' %>
77
</div>
88
<ul>
99
<li>

0 commit comments

Comments
 (0)