Skip to content

Commit 2416c96

Browse files
committed
Updated GraphAcademy links, fixes nav bug when resizing in and out of mobile view (#76)
1 parent 5b354fd commit 2416c96

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/css/nav.css

+7
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ html.is-clipped--nav {
6262
overflow-y: hidden;
6363
}
6464

65+
@media screen and (max-width: 1023px) {
66+
html.is-clipped--nav .toolbar {
67+
position: fixed;
68+
width: 100%;
69+
}
70+
}
71+
6572
.nav-panel-menu {
6673
overflow-y: scroll;
6774
display: flex;

src/js/01-nav.js

+10
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,14 @@
148148
if (!el) return
149149
return selector ? el[el.matches ? 'matches' : 'msMatchesSelector'](selector) && el : el
150150
}
151+
152+
// Remove clipped nav
153+
function removeClippedNav () {
154+
var html = document.querySelector('html')
155+
if (window.innerWidth >= 1024 && html.classList.has('is-clipped--nav')) {
156+
html.classList.remove('is-clipped--nav')
157+
}
158+
}
159+
160+
window.addEventListener('resize', removeClippedNav)
151161
})()

src/partials/header-content.hbs

+5-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@
131131
</ul>
132132
</div>
133133
<div class="navbar-item project">
134-
<a class="project-name" href="/developer/graphacademy/">GraphAcademy</a>
134+
<a class="project-name" href="https://graphacademy.neo4j.com/?ref=docs" target="_blank">GraphAcademy</a>
135+
<ul class="project-links">
136+
<li><a class="project-link" href="https://graphacademy.neo4j.com/?ref=docs">Self Paced Training</a></li>
137+
<li><a class="project-link" href="https://graphacademy.neo4j.com/categories/certification/" target="_blank">Certification</a></li>
138+
</ul>
135139
</div>
136140
<div class="navbar-item project">
137141
<a class="project-name" href="/graphgists/">GraphGists</a>

0 commit comments

Comments
 (0)