Skip to content

Commit 2cbfc1f

Browse files
authored
Merge pull request #403 from MITLibraries/use-471
USE-471: Adding About to USE navigation
2 parents 64ec037 + f8c7527 commit 2cbfc1f

5 files changed

Lines changed: 26 additions & 28 deletions

File tree

app/assets/stylesheets/partials/_header.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@
9292
font-size: 1.8rem;
9393
font-weight: $fw-medium;
9494
@include text-decoration-animation;
95-
96-
&:hover {
97-
text-decoration: underline;
98-
color: $color-white;
99-
}
95+
@include headerUnderlinedLinks;
10096
}
10197
}
10298
}

app/assets/stylesheets/partials/_search.scss

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22
// #SEARCH BITS
33
// ------------------------
44

5-
/* Shared link styling */
6-
@mixin searchUnderlinedLinks {
7-
color: $color-text-oncolor;
8-
font-weight: $fw-medium;
9-
text-decoration: underline;
10-
text-decoration-color: $color-red-500;
11-
text-underline-offset: 0.5rem;
12-
13-
&:hover {
14-
color: $color-red-400;
15-
}
16-
}
17-
185
/* New USE UI search styles */
196
#search-form {
207
margin: 0;
@@ -299,7 +286,7 @@
299286
gap: 24px;
300287

301288
a {
302-
@include searchUnderlinedLinks();
289+
@include headerUnderlinedLinks();
303290
}
304291

305292
.semantic-search-toggle {
@@ -310,7 +297,7 @@
310297
background-color: transparent;
311298
border: none;
312299
cursor: pointer;
313-
@include searchUnderlinedLinks();
300+
@include headerUnderlinedLinks();
314301

315302
&::before {
316303
background-color: $color-gray-800;

app/assets/stylesheets/partials/_source_tabs.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
border-bottom: 0;
3838
white-space: nowrap;
3939

40-
@include searchUnderlinedLinks;
40+
@include headerUnderlinedLinks;
4141

4242
&:hover {
4343
border-color: $color-gray-700;
@@ -87,7 +87,7 @@
8787
width: 100%;
8888

8989
&.active {
90-
@include searchUnderlinedLinks;
90+
@include headerUnderlinedLinks;
9191
}
9292

9393
&:hover {

app/assets/stylesheets/partials/_typography.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@
2222
}
2323
}
2424

25+
/* Shared link styling */
26+
@mixin headerUnderlinedLinks {
27+
color: $color-text-oncolor;
28+
font-weight: $fw-medium;
29+
text-decoration: underline;
30+
text-decoration-color: $color-red-500;
31+
text-underline-offset: 0.5rem;
32+
33+
&:hover {
34+
color: $color-red-400;
35+
}
36+
}
37+
2538
// Override fonts from the theme gem, done temporarily for USE UI
2639
body {
2740
font-family: $base-font;

app/views/layouts/_site_header.html.erb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
<a href="/" class="platform-name"><%= ENV.fetch('PLATFORM_NAME') %></a>
1919
<% end %>
2020
</h1>
21-
<% if Feature.enabled?(:geodata) %>
22-
<nav class="main-navigation" aria-label="Main navigation">
23-
<%= nav_link_to("GIS at MIT", "https://libraries.mit.edu/gis") %>
24-
<%= nav_link_to("Ask GIS", "https://libraries.mit.edu/ask-gis") %>
25-
</nav>
26-
<% end %>
21+
<nav class="main-navigation" aria-label="Main navigation">
22+
<% if Feature.enabled?(:geodata) %>
23+
<%= nav_link_to("GIS at MIT", "https://libraries.mit.edu/gis") %>
24+
<%= nav_link_to("Ask GIS", "https://libraries.mit.edu/ask-gis") %>
25+
<% else %>
26+
<%= nav_link_to("About", "https://libraries.mit.edu/new-search/") %>
27+
<% end %>
28+
</nav>
2729
</header>
2830
<%= render partial: 'search/form' unless Feature.enabled?(:geodata) %>
2931
</div>

0 commit comments

Comments
 (0)