Skip to content

Commit

Permalink
Updated GraphAcademy links, fixes nav bug when resizing in and out of…
Browse files Browse the repository at this point in the history
… mobile view (#76)
  • Loading branch information
adam-cowley committed Jan 11, 2022
1 parent 5b354fd commit 2416c96
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ html.is-clipped--nav {
overflow-y: hidden;
}

@media screen and (max-width: 1023px) {
html.is-clipped--nav .toolbar {
position: fixed;
width: 100%;
}
}

.nav-panel-menu {
overflow-y: scroll;
display: flex;
Expand Down
10 changes: 10 additions & 0 deletions src/js/01-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,14 @@
if (!el) return
return selector ? el[el.matches ? 'matches' : 'msMatchesSelector'](selector) && el : el
}

// Remove clipped nav
function removeClippedNav () {
var html = document.querySelector('html')
if (window.innerWidth >= 1024 && html.classList.has('is-clipped--nav')) {
html.classList.remove('is-clipped--nav')
}
}

window.addEventListener('resize', removeClippedNav)
})()
6 changes: 5 additions & 1 deletion src/partials/header-content.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@
</ul>
</div>
<div class="navbar-item project">
<a class="project-name" href="/developer/graphacademy/">GraphAcademy</a>
<a class="project-name" href="https://graphacademy.neo4j.com/?ref=docs" target="_blank">GraphAcademy</a>
<ul class="project-links">
<li><a class="project-link" href="https://graphacademy.neo4j.com/?ref=docs">Self Paced Training</a></li>
<li><a class="project-link" href="https://graphacademy.neo4j.com/categories/certification/" target="_blank">Certification</a></li>
</ul>
</div>
<div class="navbar-item project">
<a class="project-name" href="/graphgists/">GraphGists</a>
Expand Down

0 comments on commit 2416c96

Please sign in to comment.