Skip to content

Commit 241ffc6

Browse files
authored
Merge pull request #258 from MITLibraries/use-130
USE-130: Responsive navigation fix for smaller screen sizes
2 parents 56d75f6 + cf207b0 commit 241ffc6

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

app/assets/stylesheets/partials/_header.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@
5151
align-items: center;
5252
gap: 24px;
5353
}
54+
55+
@media (max-width: 550px) {
56+
flex-direction: column;
57+
58+
.main-navigation {
59+
width: 100%;
60+
justify-content: flex-start;
61+
padding-top: 28px;
62+
}
63+
}
5464
}
5565

5666
.divider {

app/views/layouts/_site_header.html.erb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
<a href="/" class="platform-name"><%= ENV.fetch('PLATFORM_NAME') %></a>
1919
<% end %>
2020
</h1>
21-
<nav class="main-navigation" aria-label="Main navigation">
22-
<%= nav_link_to("Home", root_path) %>
23-
<% if Feature.enabled?(:geodata) %>
24-
<%= nav_link_to("GIS at MIT", "https://libraries.mit.edu/gis") %>
25-
<%= nav_link_to("Ask GIS", "https://libraries.mit.edu/ask-gis") %>
26-
<% end %>
27-
</nav>
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 %>
2827
</header>
2928
<%= render partial: 'search/form' unless Feature.enabled?(:geodata) %>
3029
</div>

0 commit comments

Comments
 (0)