Skip to content

Commit

Permalink
Merge pull request #113 from MITLibraries/gdt-125-redesign-local-nav
Browse files Browse the repository at this point in the history
Redesign local nav for GDT
  • Loading branch information
jazairi authored Feb 9, 2024
2 parents b2c8911 + e927c36 commit 0c18643
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import "partials/_alerts";
@import "partials/_filters";
@import "partials/_global_alerts";
@import "partials/_local_nav";
@import "partials/_pagination";
@import "partials/_panels";
@import "partials/_search";
Expand Down
42 changes: 42 additions & 0 deletions app/assets/stylesheets/partials/_local_nav.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.wrap-outer-header-local {
.local-identity {
padding: 1rem 0;
}

.wrap-header-local {
padding-top: 1rem;
padding-bottom: 1rem;

.wrap-local-nav {
margin: 0;

.local-nav {
display: flex;
font-weight: $fw-bold;

.wrap-gis-links {
text-align: right;
margin-left: auto;

:first-child:after {
margin: 0 5px;
}

.nav-item {
padding-left: 5px;
padding-right: 5px;
margin: 0;
text-decoration: underline;
&:hover,
&:active,
&:focus {
transition: all .25s ease-in-out 0s;
color: $brand-primary-accent;
background-color: #fff;
}
}
}
}
}
}
}
23 changes: 15 additions & 8 deletions app/views/layouts/_site_nav.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<div class="wrap-outer-header-local layout-band">
<div class="wrap-header-local">
<div class="local-identity">
<h2 class="title title-site"><a href="/">TIMDEX UI</a></h2>
</div>
<div class="wrap-local-nav">
<div class="wrap-bar">
<nav class="local-nav" aria-label="Main menu">
<%= nav_link_to("Home", root_path) %>
</nav>
<% 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) %>
<% if Flipflop.enabled?(:gdt) %>
<div class="wrap-gis-links">
<%= nav_link_to("GIS at MIT", "https://libraries.mit.edu/gis") %>
<span class="nav-divider" aria-hidden="true">|</span>
<%= nav_link_to("Ask GIS", "https://libraries.mit.edu/ask-gis") %>
</div>
<% end %>
</nav>
</div>
</div>
</div>

0 comments on commit 0c18643

Please sign in to comment.