Skip to content

Commit f5aa111

Browse files
committed
Adjusting primo results to match TIMDEX
1 parent 50321d5 commit f5aa111

File tree

2 files changed

+38
-21
lines changed

2 files changed

+38
-21
lines changed

app/assets/stylesheets/partials/_results.scss

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ li.result {
131131
background-color: $color-highlight;
132132
}
133133

134-
&.use {
134+
&.use, &.primo {
135135
.result-metadata {
136136
margin-bottom: 16px;
137137
}
@@ -155,7 +155,20 @@ li.result {
155155
}
156156
}
157157

158+
.inner-heading {
159+
font-size: 1.6rem;
160+
font-family: $base-font; // Since we're using 16px, override to use body font
161+
}
162+
163+
// Make result buttons present as underlined links
158164
a.button {
165+
@include underlinedLinks;
166+
font-weight: $fw-medium;
167+
margin-right: 16px;
168+
}
169+
170+
// Except the first button, which should present as a secondary button
171+
a.button:first-child {
159172
@include buttonSecondary;
160173
}
161174

app/views/search/_result_primo.html.erb

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<li class="result">
1+
<li class="result primo">
22
<div class="result-content">
33
<p class="eyebrow">Eyebrow Text</p>
44
<h3 class="record-title">
@@ -10,30 +10,34 @@
1010
<% end %>
1111
</h3>
1212

13-
<p class="pub-info">
14-
<span><%= result[:format] %></span>
15-
<span><%= result[:year] %></span>
16-
</p>
13+
<div class="result-metadata">
1714

18-
<% if result[:creators].present? %>
19-
<span class="sr">Contributors: </span>
20-
<ul class="list-inline truncate-list contributors">
21-
<% result[:creators].each do |creator| %>
22-
<li>
23-
<% if creator[:link] %>
24-
<%= link_to creator[:value], creator[:link] %>
25-
<% else %>
26-
<%= creator[:value] %>
27-
<% end %>
28-
</li>
29-
<% end %>
30-
</ul>
31-
<% end %>
15+
<p class="pub-info">
16+
<span><%= result[:format] %></span>
17+
<span><%= result[:year] %></span>
18+
</p>
19+
20+
<% if result[:creators].present? %>
21+
<span class="sr">Contributors: </span>
22+
<ul class="list-inline truncate-list contributors">
23+
<% result[:creators].each do |creator| %>
24+
<li>
25+
<% if creator[:link] %>
26+
<%= link_to creator[:value], creator[:link] %>
27+
<% else %>
28+
<%= creator[:value] %>
29+
<% end %>
30+
</li>
31+
<% end %>
32+
</ul>
33+
<% end %>
34+
35+
</div>
3236

3337
<div class="result-get">
3438
<% if result[:links].present? %>
3539
<% result[:links].each do |link| %>
36-
<%= link_to link['kind'].titleize, link['url'], class: 'link-button' %>
40+
<%= link_to link['kind'].titleize, link['url'], class: 'button' %>
3741
<% end %>
3842
<% end %>
3943
</div>

0 commit comments

Comments
 (0)